diff options
| author | Dale Johannesen <dalej@apple.com> | 2010-07-13 20:17:05 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2010-07-13 20:17:05 +0000 |
| commit | caca5488dc290c3cbca702a90e3f7a8be7b23c06 (patch) | |
| tree | a373ca274f795fc1eedb96ef98c6f34aa0680529 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 117b01b2da9b1e3aa4bcd89a2d9e6c594d7bf4ab (diff) | |
| download | bcm5719-llvm-caca5488dc290c3cbca702a90e3f7a8be7b23c06.tar.gz bcm5719-llvm-caca5488dc290c3cbca702a90e3f7a8be7b23c06.zip | |
In inline asm treat indirect 'X' constraint as 'm'.
This may not be right in all cases, but it's better
than asserting which it was doing before. PR 7528.
llvm-svn: 108268
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index d323c163c14..b6bd199d682 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5522,10 +5522,12 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) { break; } - if (OpInfo.ConstraintType == TargetLowering::C_Other) { - assert(!OpInfo.isIndirect && - "Don't know how to handle indirect other inputs yet!"); + // Treat indirect 'X' constraint as memory. + if (OpInfo.ConstraintType == TargetLowering::C_Other && + OpInfo.isIndirect) + OpInfo.ConstraintType = TargetLowering::C_Memory; + if (OpInfo.ConstraintType == TargetLowering::C_Other) { std::vector<SDValue> Ops; TLI.LowerAsmOperandForConstraint(InOperandVal, OpInfo.ConstraintCode[0], Ops, DAG); |

