diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-31 19:41:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-31 19:41:18 +0000 |
commit | 6f043b90ea2db8c67a25d51a1abd3f054a6e9fd6 (patch) | |
tree | 164e04a560fc84a374dd4a9385ed14f7e97519c7 /llvm/lib/CodeGen | |
parent | 8c6949e5b246ada2cfdc85e56fc86d388b882716 (diff) | |
download | bcm5719-llvm-6f043b90ea2db8c67a25d51a1abd3f054a6e9fd6.tar.gz bcm5719-llvm-6f043b90ea2db8c67a25d51a1abd3f054a6e9fd6.zip |
TargetLowering::isOperandValidForConstraint
llvm-svn: 31319
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 374f5673094..65548701f03 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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); |