[LLVMdev] Eliminate PHI for non-copyable registers

Alex alex.lavoro.propio at gmail.com
Wed Feb 11 04:07:59 PST 2009


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 because TargetInstrInfo::copyRegToReg()
doesn't support the copy of this type of register.

Most registers of this hardware are f32. These two special register of type
i32 are provided to relative index the other f32 registers. The value of
these i32 registers can only be written by a FP-to-INT conversion
instruction. But these two i32 registers are not designed to be copied from
one to the other.

Alex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090211/b90c0414/attachment.html>


More information about the llvm-dev mailing list