mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Fix a future TwoAddressInstructionPass crash.
No test case, the crash only happens when the default use list order is changed. llvm-svn: 161627
This commit is contained in:
parent
c8bcc2518d
commit
74a24cbdaa
@ -235,7 +235,7 @@ bool TwoAddressInstructionPass::Sink3AddrInstruction(MachineBasicBlock *MBB,
|
||||
// appropriate location, we can try to sink the current instruction
|
||||
// past it.
|
||||
if (!KillMI || KillMI->getParent() != MBB || KillMI == MI ||
|
||||
KillMI->isTerminator())
|
||||
KillMI == OldPos || KillMI->isTerminator())
|
||||
return false;
|
||||
|
||||
// If any of the definitions are used by another instruction between the
|
||||
@ -278,6 +278,7 @@ bool TwoAddressInstructionPass::Sink3AddrInstruction(MachineBasicBlock *MBB,
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(KillMO && "Didn't find kill");
|
||||
|
||||
// Update kill and LV information.
|
||||
KillMO->setIsKill(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user