diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-21 05:27:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-21 05:27:19 +0000 |
commit | f9853bc0d439d89c97979265593287c2ce81acb2 (patch) | |
tree | 26539d85c80f5fb0c0a01dd8c700776f92244664 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 2bedd7359cb5cce27eae63997c7afc8e24d9e702 (diff) |
Add support for matching mem operands. This fixes PR1133, patch by
Eli Friedman. This implements CodeGen/Generic/2008-02-20-MatchingMem.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f36a12078c..d4e33b0d10 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3846,7 +3846,13 @@ void SelectionDAGLowering::visitInlineAsm(CallSite CS) { break; } else { assert((NumOps & 7) == 4/*MEM*/ && "Unknown matching constraint!"); - assert(0 && "matching constraints for memory operands unimp"); + assert((NumOps >> 3) == 1 && "Unexpected number of operands"); + // Add information to the INLINEASM node to know about this input. + unsigned ResOpType = 4/*MEM*/ | (1 << 3); + AsmNodeOperands.push_back(DAG.getTargetConstant(ResOpType, + TLI.getPointerTy())); + AsmNodeOperands.push_back(AsmNodeOperands[CurOp+1]); + break; } } |