mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 15:33:45 +00:00
Fix crash in machine verifier when trying to print the def of a register which has no def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39e357fafe
commit
b97c57a8b7
@ -837,6 +837,8 @@ void MachineVerifier::checkLiveness(const MachineOperand *MO, unsigned MONum) {
|
||||
// Reserved registers may be used even when 'dead'.
|
||||
if (!isReserved(Reg))
|
||||
report("Using an undefined physical register", MO, MONum);
|
||||
} else if (MRI->def_empty(Reg)) {
|
||||
report("Reading virtual register without a def", MO, MONum);
|
||||
} else {
|
||||
BBInfo &MInfo = MBBInfoMap[MI->getParent()];
|
||||
// We don't know which virtual registers are live in, so only complain
|
||||
|
Loading…
x
Reference in New Issue
Block a user