[LLVMdev] Problem in TwoAddressInstructionPass::runOnMachineFunction regarding subRegs

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Oct 12 14:52:07 PDT 2011

On Oct 12, 2011, at 1:30 AM, Mikael Holmén wrote:

> Hi,
> It seems to me that the TwoAddressInstructionPass::runOnMachineFunction 
> method has some problems when the tied destination register has a subReg.
> The two changes below improves the situation for me but I'm all new to 
> this so I'm not sure how it's supposed to work. I'm running on 2.9.
> Any comments?

Normally, sub-register defs don't exist before TwoAddressInstructionPass.  Everything is created using INSERT_SUBREG and REG_SEQUENCE.

What does your code look like before TwoAddressInstructionPass? Is it in SSA form, or do you have multiple defs on a virtual register?

The machine code verifier (-verify-machineinstrs) will check SSA form, but that feature is not in 2.9.


More information about the llvm-dev mailing list