From 5cbeeedeaa9a5e3e626b28e96d35595c30660b1d Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Fri, 7 Oct 2016 14:50:49 +0000 Subject: [PATCH] Only track physical registers in LivePhysRegs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283561 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LivePhysRegs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/LivePhysRegs.cpp b/lib/CodeGen/LivePhysRegs.cpp index 80d6294fb47..78632873642 100644 --- a/lib/CodeGen/LivePhysRegs.cpp +++ b/lib/CodeGen/LivePhysRegs.cpp @@ -49,7 +49,7 @@ void LivePhysRegs::stepBackward(const MachineInstr &MI) { 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 @@ void LivePhysRegs::stepBackward(const MachineInstr &MI) { if (!O->isReg() || !O->readsReg()) continue; unsigned Reg = O->getReg(); - if (Reg == 0) + if (!TargetRegisterInfo::isPhysicalRegister(Reg)) continue; addReg(Reg); } @@ -77,7 +77,7 @@ void LivePhysRegs::stepForward(const MachineInstr &MI, 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