summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-21 22:05:24 +0000
committerDan Gohman <gohman@apple.com>2008-06-21 22:05:24 +0000
commitea0452016e2d22e6c93a361c318942c198654013 (patch)
treebe49fd9a4751a5d798e20dad1efa9542b578ad4d /llvm
parent33204b7c2034f5f80a7173535b5158f06ab953c3 (diff)
downloadbcm5719-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.cpp5
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)
OpenPOWER on IntegriCloud