From 6ab52a8018cfd5df77c39fade8ac5cc74aff6792 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 17 Sep 2008 15:25:49 +0000 Subject: Don't worry about clobbering physical register defs that aren't used. llvm-svn: 56281 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp') 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; -- cgit v1.2.3