summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp9
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);
+ }
}
}
OpenPOWER on IntegriCloud