diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-21 22:05:24 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-21 22:05:24 +0000 |
commit | 2f1d3108e481758da66662f72673741da86312da (patch) | |
tree | 81e431269d859d63c85006be7859178dc84f41e7 | |
parent | 95df6b3603e228cea714be21997fec82cb03011e (diff) |
canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;
check this with an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52603 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 6175bc275e..a50dd7b7c5 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1572,15 +1572,14 @@ static bool hasCopyToRegUse(SUnit *SU) { } /// canClobberPhysRegDefs - True if SU would clobber one of SuccSU's -/// physical register def. +/// physical register defs. static bool canClobberPhysRegDefs(SUnit *SuccSU, SUnit *SU, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI) { SDNode *N = SuccSU->Node; unsigned NumDefs = TII->get(N->getTargetOpcode()).getNumDefs(); const unsigned *ImpDefs = TII->get(N->getTargetOpcode()).getImplicitDefs(); - if (!ImpDefs) - return false; + assert(ImpDefs && "Caller should check hasPhysRegDefs"); const unsigned *SUImpDefs = TII->get(SU->Node->getTargetOpcode()).getImplicitDefs(); if (!SUImpDefs) |