From b29ff977d10ddc90fd993d64d25f5c3c6ac935aa Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 21 Sep 2009 17:58:09 +0000 Subject: [PATCH] Fix the offset values for these memoperands. For frame objects, the 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 | 2 +- lib/Target/X86/X86InstrBuilder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/SystemZ/SystemZInstrBuilder.h b/lib/Target/SystemZ/SystemZInstrBuilder.h index 03f708feba1..08361c74913 100644 --- a/lib/Target/SystemZ/SystemZInstrBuilder.h +++ b/lib/Target/SystemZ/SystemZInstrBuilder.h @@ -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) diff --git a/lib/Target/X86/X86InstrBuilder.h b/lib/Target/X86/X86InstrBuilder.h index 54c84e7880f..6aae2e8ab30 100644 --- a/lib/Target/X86/X86InstrBuilder.h +++ b/lib/Target/X86/X86InstrBuilder.h @@ -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) -- 2.11.0