summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-18 06:27:36 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-18 06:27:36 +0000
commit0b8db2dab78f101acea99bfe0702d4668a7273e2 (patch)
treeab6730c813b94eca106ddf96f4bb81fc0273ff0b /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
parentc05471ea5b411cd97b960da88ecea03133a0ad2c (diff)
downloadbcm5719-llvm-0b8db2dab78f101acea99bfe0702d4668a7273e2.tar.gz
bcm5719-llvm-0b8db2dab78f101acea99bfe0702d4668a7273e2.zip
Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.
llvm-svn: 84411
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetInstrInfoImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
index c646869e8a7..0a925f16f07 100644
--- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
@@ -186,8 +186,11 @@ TargetInstrInfo::foldMemoryOperand(MachineFunction &MF,
"Folded a use to a non-load!");
const MachineFrameInfo &MFI = *MF.getFrameInfo();
assert(MFI.getObjectOffset(FrameIndex) != -1);
+ const Value *SV = MFI.isFixedObjectIndex(FrameIndex)
+ ? PseudoSourceValue::getFixedStack(FrameIndex)
+ : PseudoSourceValue::getStack();
MachineMemOperand *MMO =
- MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FrameIndex),
+ MF.getMachineMemOperand(SV,
Flags, /*Offset=*/0,
MFI.getObjectSize(FrameIndex),
MFI.getObjectAlignment(FrameIndex));
OpenPOWER on IntegriCloud