aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-07-13 20:17:05 +0000
committerDale Johannesen <dalej@apple.com>2010-07-13 20:17:05 +0000
commit324c0e335cffaeeacdd15df43fa8beffcf125aca (patch)
tree197fcb074e15ee10f7085042c9b7a398f03309c3 /lib
parent1c710481f04d2db889fc9e913b8d858967c14fac (diff)
downloadexternal_llvm-324c0e335cffaeeacdd15df43fa8beffcf125aca.zip
external_llvm-324c0e335cffaeeacdd15df43fa8beffcf125aca.tar.gz
external_llvm-324c0e335cffaeeacdd15df43fa8beffcf125aca.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index d323c16..b6bd199 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/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);