[LLVMdev] Register Coalescer does not preserve TargetFlag

Jakob Stoklund Olesen
Mon, 06 Aug 2012 17:36:40 -0000

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