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 | ea0452016e2d22e6c93a361c318942c198654013 (patch) | |
tree | be49fd9a4751a5d798e20dad1efa9542b578ad4d /llvm | |
parent | 33204b7c2034f5f80a7173535b5158f06ab953c3 (diff) | |
download | bcm5719-llvm-ea0452016e2d22e6c93a361c318942c198654013.tar.gz bcm5719-llvm-ea0452016e2d22e6c93a361c318942c198654013.zip |
canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;
check this with an assert.
llvm-svn: 52603
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 6175bc275ea..a50dd7b7c5d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/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) |