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

Evan Cheng evan.cheng at apple.com
Mon Aug 3 23:13:43 PDT 2009


On Aug 3, 2009, at 11:07 PM, Jakob Stoklund Olesen wrote:

>
> On 02/08/2009, at 21.52, Eli Friedman wrote:
>
>> On Sun, Aug 2, 2009 at 12:18 PM, Jakob Stoklund
>> Olesen<stoklund at 2pi.dk> 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?
>>
>> AFAIK, all virtual registers are supposed to be SSA until the
>> two-address pass runs.
>
> I will have to create a new vreg in copyRegToReg then.

Sorry, I am still missing some details. Is MOVENCC_z the move  
instruction being inserted? Why do you need to introduce a VR then?

>
> Is there some way of knowing if we are before or after the two-address
> pass?

No.

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