Since MBB was split *before* MI, the MI(s) will reside in JoinMBB (MBB) at
the point of erasing them, so calling StartMBB->erase() is actually wrong,
although it is "working" by all appearances.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371995
91177308-0d34-0410-b5e6-
96231b3b80d8
std::next(MachineBasicBlock::iterator(LastMI)), MBB->end());
createPHIsForSelects(MIItBegin, MIItEnd, StartMBB, FalseMBB, MBB);
- StartMBB->erase(MIItBegin, MIItEnd);
+ MBB->erase(MIItBegin, MIItEnd);
return JoinMBB;
}