[llvm-commits] [PATCH] Accidental <kill> on two-address operand

Evan Cheng evan.cheng at apple.com
Mon Aug 3 14:37:09 PDT 2009


On Aug 3, 2009, at 1:34 PM, Jakob Stoklund Olesen wrote:

>
> On 03/08/2009, at 04.23, Evan Cheng wrote:
>
>>> The generated code looks like this:
>>>
>>> %reg1032<def> = MOVENCC_z %reg1031<kill>
>>> %reg1032<def> = BITTGL %reg1032, 0
>>>
>>> In this case a kill flag is also added to BITTGL, and
>>> TwoAddressInstructionPass fails to remove it again. Probably because
>>> it is expecting SSA code as input?
>>
>> I am confused. Is BITTGL a two-address instruction? Is MOVENCC_z the
>> copy instruction? If so, then this is perfectly legal.
>
> Yes and Yes, but both can be inserted by copyRegToReg /before/ two-
> address pass. That means non-SSA instructions before two-address has
> run.

Hrm. It's not legal to insert non-ssa instructions before 2addr pass.

Evan

>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list