mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 02:22:31 +00:00
MachineBasicBlock::remove should not modify the iterator passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12571 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c58897d1c
commit
4f6410f5cb
@ -71,8 +71,7 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
|
|||||||
|
|
||||||
while (MBB.front().getOpcode() == TargetInstrInfo::PHI) {
|
while (MBB.front().getOpcode() == TargetInstrInfo::PHI) {
|
||||||
// Unlink the PHI node from the basic block... but don't delete the PHI yet
|
// Unlink the PHI node from the basic block... but don't delete the PHI yet
|
||||||
MachineBasicBlock::iterator begin = MBB.begin();
|
MachineInstr *MI = MBB.remove(MBB.begin());
|
||||||
MachineInstr *MI = MBB.remove(begin);
|
|
||||||
|
|
||||||
assert(MRegisterInfo::isVirtualRegister(MI->getOperand(0).getReg()) &&
|
assert(MRegisterInfo::isVirtualRegister(MI->getOperand(0).getReg()) &&
|
||||||
"PHI node doesn't write virt reg?");
|
"PHI node doesn't write virt reg?");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user