summaryrefslogtreecommitdiff
path: root/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
commit6a22dba4854a8b3d7427f8493f663c1b52df4477 (patch)
tree1adc60785dab2b5e96518ec647f6b6202476d4fc /lib/CodeGen/TargetSchedule.cpp
parentf521997303553846685409630fca2b46758b6eac (diff)
downloadllvm-6a22dba4854a8b3d7427f8493f663c1b52df4477.tar.gz
llvm-6a22dba4854a8b3d7427f8493f663c1b52df4477.tar.bz2
llvm-6a22dba4854a8b3d7427f8493f663c1b52df4477.tar.xz
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetSchedule.cpp')
-rw-r--r--lib/CodeGen/TargetSchedule.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetSchedule.cpp b/lib/CodeGen/TargetSchedule.cpp
index 783bfa1c1a..1bf14dbcef 100644
--- a/lib/CodeGen/TargetSchedule.cpp
+++ b/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;