ARM expansion of pre-indexed store pseudos should maintain memoperands.

Partial fix for rdar://9945172.

llvm-svn: 137513
This commit is contained in:
Jim Grosbach 2011-08-12 21:02:34 +00:00
parent 94f8c77931
commit f402f694e2
1 changed files with 3 additions and 1 deletions

View File

@ -5300,13 +5300,15 @@ ARMTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
if (isSub)
Offset = -Offset;
MachineMemOperand *MMO = *MI->memoperands_begin();
MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(NewOpc))
.addOperand(MI->getOperand(0)) // Rn_wb
.addOperand(MI->getOperand(1)) // Rt
.addOperand(MI->getOperand(2)) // Rn
.addImm(Offset) // offset (skip GPR==zero_reg)
.addOperand(MI->getOperand(5)) // pred
.addOperand(MI->getOperand(6));
.addOperand(MI->getOperand(6))
.addMemOperand(MMO);
MI->eraseFromParent();
return BB;
}