Displaying 3 results from an estimated 3 matches for "fp2int".
2009 Feb 12
0
[LLVMdev] Eliminate PHI for non-copyable registers
On Feb 11, 2009, at 4:07 AM, Alex wrote:
> In my hardware there are two special registers cannot be copied but
> can only be assigned and referenced (read) in the other instruction.
> They are allocatable also.
>
> br i1 %if_cond, label %then, label %else
> then:
> %x1 = fptosi float %y1 to i32
> br label %endif
> else:
> %x2 = fptosi float %y2 to i32
>
2009 Feb 12
2
[LLVMdev] Eliminate PHI for non-copyable registers
...these i32 registers as the "specification". The input language (which is
converted to LLVM IR) may use up to 4 registers but the hardware only has 2.
So they must be allocatable, right?
For example, the input uses up to 3 <i32> registers INT0, INT1, INT2 (Rx are
FP registers):
fp2int INT0, R0
fp2int INT1, R1
fp2int INT2, R2
add R0, R0, R[INT1+1]
mul R0, R[INT2+2], R[INT0+1]
Since the hardware doesn't has INT2, the final machine should be like:
fp2int INT0, R0
fp2int INT1, R1
add R0, R0, R[INT1+1]
fp2int INT1, R2 <==== rename INT2 to INT1
mul R0, R[INT...
2009 Feb 11
2
[LLVMdev] Eliminate PHI for non-copyable registers
In my hardware there are two special registers cannot be copied but can only
be assigned and referenced (read) in the other instruction. They are
allocatable also.
br i1 %if_cond, label %then, label %else
then:
%x1 = fptosi float %y1 to i32
br label %endif
else:
%x2 = fptosi float %y2 to i32
br label %endif
endif:
%x3 = phi i32 [%x1, %then], [%x2, %else]
PNE::LowerAtomiPHINode() fails