[LLVMdev] subregisters, def-kill

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu May 19 15:39:40 PDT 2011


On May 19, 2011, at 7:47 AM, Jonas Paulsson wrote:

> Hi,
> 
> I am combining 16-bit registers to a 32 bit register in order to make a wide store, as per below:
> 
> 732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>; 
> 740 %reg16506:lo16<def> = COPY %reg16468<kill>;
> 748 %r3<def,dead> = store %reg16506<kill>, %r3, 
> 
> As you can see, LiveVariables has marked the high part dead, even though the super-register is used at SlotIndex 748. Why is this? Should I add anything special to the basic BuildMI calls?

That code is not in SSA form as LiveVariables requires, there can only be one def per virtual register. You need to use INSERT_SUBREG or REG_SEQUENCE to do this.

/jakob




More information about the llvm-dev mailing list