summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit127bb03b8cde40b8679c4a6f93ed7a214198c279 (patch)
tree9bf6f64fb9ec1fa4e0229c3bbc6608782a24abb7 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent8d480594cf8405215f888454141dce10f84748db (diff)
downloadbcm5719-llvm-127bb03b8cde40b8679c4a6f93ed7a214198c279.tar.gz
bcm5719-llvm-127bb03b8cde40b8679c4a6f93ed7a214198c279.zip
Take the FrameOffset into account when computing the alignment
of stack objects. This fixes PR2656. llvm-svn: 54646
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d570a1aa91a..bdeffba3233 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud