Mark the x86 machine model as incomplete. PR17367.
[oota-llvm.git] / lib / CodeGen / TargetSchedule.cpp
index 64ee9d1c464eac92aba19c80e6ec1b8f7d40b429..fd3f49657b03b60c46107c2e8c70a323cace2849 100644 (file)
@@ -210,7 +210,8 @@ unsigned TargetSchedModel::computeOperandLatency(
   // unit latency (defaultDefLatency may be too conservative).
 #ifndef NDEBUG
   if (SCDesc->isValid() && !DefMI->getOperand(DefOperIdx).isImplicit()
-      && !DefMI->getDesc().OpInfo[DefOperIdx].isOptionalDef()) {
+      && !DefMI->getDesc().OpInfo[DefOperIdx].isOptionalDef()
+      && SchedModel.isComplete()) {
     std::string Err;
     raw_string_ostream ss(Err);
     ss << "DefIdx " << DefIdx << " exceeds machine model writes for "