TargetLowering::isOperandValidForConstraint
llvm-svn: 31319
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 374f567..6554870 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2487,8 +2487,13 @@
CTy = TLI.getConstraintType(ConstraintCode[0]);
if (CTy == TargetLowering::C_Other) {
- if (!TLI.isOperandValidForConstraint(InOperandVal, ConstraintCode[0]))
- assert(0 && "MATCH FAIL!");
+ InOperandVal = TLI.isOperandValidForConstraint(InOperandVal,
+ ConstraintCode[0], DAG);
+ if (!InOperandVal.Val) {
+ std::cerr << "Invalid operand for inline asm constraint '"
+ << ConstraintCode << "'!\n";
+ exit(1);
+ }
// Add information to the INLINEASM node to know about this input.
unsigned ResOpType = 3 /*IMM*/ | (1 << 3);