summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-03 20:43:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-03 20:43:35 +0000
commitf650732cab7309b01ef9e6f9f3a69fc5d4226091 (patch)
tree1a43a2b199c362d99bed4e04e425d01806041902 /llvm/lib/CodeGen/MachineInstr.cpp
parent15f247ad8c870519e2490061b2e7c0e4ec4486c7 (diff)
downloadbcm5719-llvm-f650732cab7309b01ef9e6f9f3a69fc5d4226091.tar.gz
bcm5719-llvm-f650732cab7309b01ef9e6f9f3a69fc5d4226091.zip
Handle all live physreg defs in the same place.
SelectionDAG has 4 different ways of passing physreg defs to users. Collect all of the uses at the same time, and pass all of them to MI->setPhysRegsDeadExcept() to mark the remaining defs dead. The setPhysRegsDeadExcept() function will soon add the required implicit-defs to instructions with register mask operands. llvm-svn: 149708
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 7cf282c25c2..f04921bb508 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1799,7 +1799,7 @@ void MachineInstr::setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRe
MachineOperand &MO = getOperand(i);
if (!MO.isReg() || !MO.isDef()) continue;
unsigned Reg = MO.getReg();
- if (Reg == 0) continue;
+ if (!TargetRegisterInfo::isPhysicalRegister(Reg)) continue;
bool Dead = true;
for (SmallVectorImpl<unsigned>::const_iterator I = UsedRegs.begin(),
E = UsedRegs.end(); I != E; ++I)
OpenPOWER on IntegriCloud