mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Handle <undef> flag in machine code verifier.
Use of an <undef> register is treated like an <imp-use>. It is not an error to use a dead <undef> register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18a4c16726
commit
bcdbcb9f95
@ -365,7 +365,8 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum)
|
||||
addRegWithSubRegs(regsKilled, Reg);
|
||||
}
|
||||
// Explicit use of a dead register.
|
||||
if (!MO->isImplicit() && !regsLive.count(Reg)) {
|
||||
// A register use marked <undef> is OK.
|
||||
if (!MO->isImplicit() && !MO->isUndef() && !regsLive.count(Reg)) {
|
||||
if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||
// Reserved registers may be used even when 'dead'.
|
||||
if (!isReserved(Reg))
|
||||
|
Loading…
Reference in New Issue
Block a user