aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-31 19:41:18 +0000
committerChris Lattner <sabre@nondot.org>2006-10-31 19:41:18 +0000
commit53069fbbae2558a3138df24776448791fea3acee (patch)
tree47e55f895fe779380d4dc3d04c7f02b7ce0beaaa
parentdba1aeedd8179114a45be655b985455218d20806 (diff)
TargetLowering::isOperandValidForConstraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31319 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 374f567309..65548701f0 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2487,8 +2487,13 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
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);