[llvm] r237474 - [X86] Use a better sentinel offset for the FrameAddr index
David Majnemer
david.majnemer at gmail.com
Fri May 15 13:08:27 PDT 2015
Author: majnemer
Date: Fri May 15 15:08:27 2015
New Revision: 237474
URL: http://llvm.org/viewvc/llvm-project?rev=237474&view=rev
Log:
[X86] Use a better sentinel offset for the FrameAddr index
Other pieces of CodeGen want to negate frame object offsets to account
for architectures where the stack grows down. Our object is a pseudo
object so it's offset doesn't matter. However, we shouldn't choose an
offset which results in undefined behavior if you negate it.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=237474&r1=237473&r2=237474&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri May 15 15:08:27 2015
@@ -15637,7 +15637,7 @@ SDValue X86TargetLowering::LowerFRAMEADD
// Set up a frame object for the return address.
unsigned SlotSize = RegInfo->getSlotSize();
FrameAddrIndex = MF.getFrameInfo()->CreateFixedObject(
- SlotSize, /*Offset=*/INT64_MIN, /*IsImmutable=*/false);
+ SlotSize, /*Offset=*/0, /*IsImmutable=*/false);
FuncInfo->setFAIndex(FrameAddrIndex);
}
return DAG.getFrameIndex(FrameAddrIndex, VT);
More information about the llvm-commits
mailing list