Don't worry about clobbering physical register defs that aren't used.
authorDan Gohman <gohman@apple.com>
Wed, 17 Sep 2008 15:25:49 +0000 (15:25 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 17 Sep 2008 15:25:49 +0000 (15:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56281 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

index b9dcc25dc752a2ab0d22122a123ef0cee30dcac4..0cf155ea4d4fadd8d38785458cbd1f2d6671cd2e 100644 (file)
@@ -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;