summaryrefslogtreecommitdiff
path: root/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
commit59cb77fb11ec547f60ef0ff4a8ccf3bd8007ae46 (patch)
tree62beb63528ad9dfd9e24cccea7fcc3b6da24d8df /lib/CodeGen/MachineInstr.cpp
parentee8901c08fb27e98078326706a49dba70e1768a3 (diff)
downloadllvm-59cb77fb11ec547f60ef0ff4a8ccf3bd8007ae46.tar.gz
llvm-59cb77fb11ec547f60ef0ff4a8ccf3bd8007ae46.tar.bz2
llvm-59cb77fb11ec547f60ef0ff4a8ccf3bd8007ae46.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 7cf282c25c..f04921bb50 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/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)