forked from OSchip/llvm-project
[SystemZ] Call erase() on the right MBB in SystemZTargetLowering::emitSelect()
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 llvm-svn: 371995
This commit is contained in:
parent
98cb8db836
commit
b7dadc3562
|
@ -6678,7 +6678,7 @@ SystemZTargetLowering::emitSelect(MachineInstr &MI,
|
|||
std::next(MachineBasicBlock::iterator(LastMI)), MBB->end());
|
||||
createPHIsForSelects(MIItBegin, MIItEnd, StartMBB, FalseMBB, MBB);
|
||||
|
||||
StartMBB->erase(MIItBegin, MIItEnd);
|
||||
MBB->erase(MIItBegin, MIItEnd);
|
||||
return JoinMBB;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue