Only track physical registers in LivePhysRegs
llvm-svn: 283561
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index 80d6294..7863287 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -49,7 +49,7 @@
if (!O->isDef())
continue;
unsigned Reg = O->getReg();
- if (Reg == 0)
+ if (!TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
removeReg(Reg);
} else if (O->isRegMask())
@@ -61,7 +61,7 @@
if (!O->isReg() || !O->readsReg())
continue;
unsigned Reg = O->getReg();
- if (Reg == 0)
+ if (!TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
addReg(Reg);
}
@@ -77,7 +77,7 @@
for (ConstMIBundleOperands O(MI); O.isValid(); ++O) {
if (O->isReg()) {
unsigned Reg = O->getReg();
- if (Reg == 0)
+ if (!TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
if (O->isDef()) {
// Note, dead defs are still recorded. The caller should decide how to