aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-11 18:27:03 +0000
committerDan Gohman <gohman@apple.com>2008-08-11 18:27:03 +0000
commit8cea8ff34c7fb7a64b6fd247b9db0d097d1ffeea (patch)
treedd49377372d124c94eb274a1280c7444cc1edb2c /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent1db3c92306f551a81440dffd88ce07b9fbea97f4 (diff)
Take the FrameOffset into account when computing the alignment
of stack objects. This fixes PR2656. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d570a1aa91..bdeffba323 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4378,7 +4378,7 @@ static unsigned InferAlignment(SDValue Ptr, SelectionDAG &DAG) {
// FIXME: Handle FI+CST.
const MachineFrameInfo &MFI = *DAG.getMachineFunction().getFrameInfo();
if (MFI.isFixedObjectIndex(FrameIdx)) {
- int64_t ObjectOffset = MFI.getObjectOffset(FrameIdx);
+ int64_t ObjectOffset = MFI.getObjectOffset(FrameIdx) + FrameOffset;
// The alignment of the frame index can be determined from its offset from
// the incoming frame position. If the frame object is at offset 32 and