Fix the offset values for these memoperands. For frame objects, the
authorDan Gohman <gohman@apple.com>
Mon, 21 Sep 2009 17:58:09 +0000 (17:58 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 21 Sep 2009 17:58:09 +0000 (17:58 +0000)
PseudoSourceValue already effectively represents the offset from the
frame base, so the actual offset should not be added to it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82465 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZInstrBuilder.h
lib/Target/X86/X86InstrBuilder.h

index 03f708feba19ef2f34eb06906afccbbee7d086a8..08361c74913fccc0485607bcd9540998cc2a4f53 100644 (file)
@@ -115,7 +115,7 @@ addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {
     Flags |= MachineMemOperand::MOStore;
   MachineMemOperand MMO(PseudoSourceValue::getFixedStack(FI),
                         Flags,
-                        MFI.getObjectOffset(FI) + Offset,
+                        Offset,
                         MFI.getObjectSize(FI),
                         MFI.getObjectAlignment(FI));
   return addOffset(MIB.addFrameIndex(FI), Offset)
index 54c84e7880fc23926d3807462bda1c3c62359412..6aae2e8ab30fcb99224eb5b220a12e9c79c5317a 100644 (file)
@@ -144,7 +144,7 @@ addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {
     Flags |= MachineMemOperand::MOStore;
   MachineMemOperand MMO(PseudoSourceValue::getFixedStack(FI),
                         Flags,
-                        MFI.getObjectOffset(FI) + Offset,
+                        Offset,
                         MFI.getObjectSize(FI),
                         MFI.getObjectAlignment(FI));
   return addOffset(MIB.addFrameIndex(FI), Offset)