summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetSchedule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetSchedule.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp
index 86dbf1b2aea..7d636b126e0 100644
--- a/llvm/lib/CodeGen/TargetSchedule.cpp
+++ b/llvm/lib/CodeGen/TargetSchedule.cpp
@@ -274,14 +274,12 @@ unsigned TargetSchedModel::computeInstrLatency(unsigned Opcode) const {
unsigned SCIdx = TII->get(Opcode).getSchedClass();
const MCSchedClassDesc *SCDesc = SchedModel.getSchedClassDesc(SCIdx);
- if (SCDesc->isValid() && !SCDesc->isVariant())
+ if (!SCDesc->isValid())
+ return 0;
+ if (!SCDesc->isVariant())
return computeInstrLatency(*SCDesc);
- if (SCDesc->isValid()) {
- assert (!SCDesc->isVariant() && "No MI sched latency: SCDesc->isVariant()");
- return computeInstrLatency(*SCDesc);
- }
- return 0;
+ llvm_unreachable("No MI sched latency");
}
unsigned
OpenPOWER on IntegriCloud