summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 2982731bb2e..618a3859e22 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -249,6 +249,8 @@ void IRTranslator::finishPendingPhis() {
MIB.addMBB(BBToMBB[PI->getIncomingBlock(i)]);
}
}
+
+ PendingPHIs.clear();
}
bool IRTranslator::translate(const Instruction &Inst) {
@@ -327,6 +329,8 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) {
MRI = &MF.getRegInfo();
DL = &F.getParent()->getDataLayout();
+ assert(PendingPHIs.empty() && "stale PHIs");
+
// Setup the arguments.
MachineBasicBlock &MBB = getOrCreateBB(F.front());
MIRBuilder.setMBB(MBB);
OpenPOWER on IntegriCloud