diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-02-19 18:15:53 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-02-19 18:15:53 +0000 |
commit | e8019df552fbb25329ee808b06a697cea171b370 (patch) | |
tree | 5d501b52ea4f23001da1a60ba09997d5bb46cf22 /llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp | |
parent | 29c997c1a18ad48254622540bb2989f008da1f94 (diff) | |
download | bcm5719-llvm-e8019df552fbb25329ee808b06a697cea171b370.tar.gz bcm5719-llvm-e8019df552fbb25329ee808b06a697cea171b370.zip |
[StatepointLowering] Fix a mistake in rL261336
The check on MFI->getObjectSize() has to be on the FrameIndex, not on
the index of the FrameIndex in AllocatedStackSlots. Weirdly, the tests
I added in rL261336 didn't catch this.
llvm-svn: 261347
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp index 0116fdddd95..37f74cb9d70 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp @@ -88,11 +88,12 @@ StatepointLoweringState::allocateStackSlot(EVT ValueType, "Broken invariant"); for (; NextSlotToAllocate < NumSlots; NextSlotToAllocate++) { - if (!AllocatedStackSlots.test(NextSlotToAllocate) && - MFI->getObjectSize(NextSlotToAllocate) == SpillSize) { + if (!AllocatedStackSlots.test(NextSlotToAllocate)) { const int FI = Builder.FuncInfo.StatepointStackSlots[NextSlotToAllocate]; - AllocatedStackSlots.set(NextSlotToAllocate); - return Builder.DAG.getFrameIndex(FI, ValueType); + if (MFI->getObjectSize(FI) == SpillSize) { + AllocatedStackSlots.set(NextSlotToAllocate); + return Builder.DAG.getFrameIndex(FI, ValueType); + } } } |