[LLVMdev] MachineOperand: Subreg defines and the Undef flag (original) (raw)
Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jul 5 09:21:26 PDT 2012
- Previous message: [LLVMdev] MachineOperand: Subreg defines and the Undef flag
- Next message: [LLVMdev] MachineOperand: Subreg defines and the Undef flag
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jul 5, 2012, at 8:53 AM, "Pranav Bhandarkar" <pranavb at codeaurora.org> wrote:
Hi Jakob,
Thanks for your reply.
The flag goes on NewMI1 because the virtual register B isn't live before that instruction. But you probably shouldn't be doing this yourself. Your NewMI code isn't in SSA form because B has multiple definitions. Just use a REGSEQUENCE instruction, and let the register allocator do the transformation for you. Aaargh. So you mean something like this ? NewMI1:: Vreg1 = 0 ; Vreg1 and Vreg2 are 32 bit virt. regs. NewMI2:: Vreg2 = COPY C:losubreg. NewMI3:: B= REGSEQUENCE<Vreg1, hisubreg, Vreg2, losubreg> ; B is a 64 bit virt reg.
Yes.
For this particular case, you can also use INSERT_SUBREG. That might be simpler.
/jakob
- Previous message: [LLVMdev] MachineOperand: Subreg defines and the Undef flag
- Next message: [LLVMdev] MachineOperand: Subreg defines and the Undef flag
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]