summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-17 15:25:49 +0000
committerDan Gohman <gohman@apple.com>2008-09-17 15:25:49 +0000
commit6ab52a8018cfd5df77c39fade8ac5cc74aff6792 (patch)
treec8ff6668dbaee3c5858f9bdeaf67f3ddc17c9e52 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
parenta5629376e88c324040762e4af6ef083fe722b9d9 (diff)
downloadbcm5719-llvm-6ab52a8018cfd5df77c39fade8ac5cc74aff6792.tar.gz
bcm5719-llvm-6ab52a8018cfd5df77c39fade8ac5cc74aff6792.zip
Don't worry about clobbering physical register defs that aren't used.
llvm-svn: 56281
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index b9dcc25dc75..0cf155ea4d4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1709,6 +1709,8 @@ static bool canClobberPhysRegDefs(const SUnit *SuccSU, const SUnit *SU,
MVT VT = N->getValueType(i);
if (VT == MVT::Flag || VT == MVT::Other)
continue;
+ if (!N->hasAnyUseOfValue(i))
+ continue;
unsigned Reg = ImpDefs[i - NumDefs];
for (;*SUImpDefs; ++SUImpDefs) {
unsigned SUReg = *SUImpDefs;
OpenPOWER on IntegriCloud