[LLVMdev] Register Coalescer does not preserve TargetFlag

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Aug 6 10:36:40 PDT 2012


On Aug 6, 2012, at 10:29 AM, Vincent Lejeune <vljn at ovi.com> wrote:

> 
> 
> Hi,
> 
> R600 hardware (Radeon gfx card) does neither have a NEG nor an ABS instruction ; however any sources operand can be negated/abs'd by setting a bit for every source operand in the final bytecode (but not DST).
> A good way of modeling this behavior in LLVM is by using TargetFlag on operand.

Hi Vincent,

TargetFlags are not a good way of modeling semantic information about machine instructions. They are not preserved by any passes in the backend.

Use immediate operands instead.

/jakob




More information about the llvm-dev mailing list