summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-05-09 20:04:43 +0000
committerEric Christopher <echristo@apple.com>2011-05-09 20:04:43 +0000
commitcef81b7e519764c6a008a689bc4c6dfc9119f8e9 (patch)
treeac7d1787dbaecb4d5a5fc268931193c9d65d3b04 /lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent77a2c4c1e54b7e3c4815b276eb6a2d99a7621460 (diff)
downloadllvm-cef81b7e519764c6a008a689bc4c6dfc9119f8e9.tar.gz
llvm-cef81b7e519764c6a008a689bc4c6dfc9119f8e9.tar.bz2
llvm-cef81b7e519764c6a008a689bc4c6dfc9119f8e9.tar.xz
Look through struct wrapped types for inline asm statments.
Patch by Evan Cheng. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index d163ebf82f..b301e3bd3d 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -2812,6 +2812,12 @@ TargetLowering::AsmOperandInfoVector TargetLowering::ParseConstraints(
report_fatal_error("Indirect operand for inline asm not a pointer!");
OpTy = PtrTy->getElementType();
}
+
+ // Look for vector wrapped in a struct. e.g. { <16 x i8> }.
+ if (const StructType *STy = dyn_cast<StructType>(OpTy))
+ if (STy->getNumElements() == 1)
+ OpTy = STy->getElementType(0);
+
// If OpTy is not a single value, it may be a struct/union that we
// can tile with integers.
if (!OpTy->isSingleValueType() && OpTy->isSized()) {