summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetSchedule.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-04-13 06:07:45 +0000
committerAndrew Trick <atrick@apple.com>2013-04-13 06:07:45 +0000
commitbe2bccbce9353abb4e3d161d07718dc28b389cd1 (patch)
tree556da8bc8c9ac8b74e802c4a1071cbea800d2da3 /llvm/lib/CodeGen/TargetSchedule.cpp
parentf7fd6b9e3a011638adadeca9cda25d9cfc0ff271 (diff)
downloadbcm5719-llvm-be2bccbce9353abb4e3d161d07718dc28b389cd1.tar.gz
bcm5719-llvm-be2bccbce9353abb4e3d161d07718dc28b389cd1.zip
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.
llvm-svn: 179451
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetSchedule.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp
index 783bfa1c1a1..1bf14dbcef2 100644
--- a/llvm/lib/CodeGen/TargetSchedule.cpp
+++ b/llvm/lib/CodeGen/TargetSchedule.cpp
@@ -128,6 +128,8 @@ resolveSchedClass(const MachineInstr *MI) const {
// Get the definition's scheduling class descriptor from this machine model.
unsigned SchedClass = MI->getDesc().getSchedClass();
const MCSchedClassDesc *SCDesc = SchedModel.getSchedClassDesc(SchedClass);
+ if (!SCDesc->isValid())
+ return SCDesc;
#ifndef NDEBUG
unsigned NIter = 0;
OpenPOWER on IntegriCloud