aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp1
-rw-r--r--test/CodeGen/ARM/neon-ops.ll7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index c2bd471..9e9198b 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -125,6 +125,7 @@ void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT,
setOperationAction(ISD::EXTRACT_SUBVECTOR, VT.getSimpleVT(), Expand);
setOperationAction(ISD::SELECT, VT.getSimpleVT(), Expand);
setOperationAction(ISD::SELECT_CC, VT.getSimpleVT(), Expand);
+ setOperationAction(ISD::ZERO_EXTEND, VT.getSimpleVT(), Expand);
if (VT.isInteger()) {
setOperationAction(ISD::SHL, VT.getSimpleVT(), Custom);
setOperationAction(ISD::SRA, VT.getSimpleVT(), Custom);
diff --git a/test/CodeGen/ARM/neon-ops.ll b/test/CodeGen/ARM/neon-ops.ll
new file mode 100644
index 0000000..d7e893f
--- /dev/null
+++ b/test/CodeGen/ARM/neon-ops.ll
@@ -0,0 +1,7 @@
+; RUN: llc -march=arm -mattr=+neon -O2 -o /dev/null
+
+; This used to crash.
+define <4 x i32> @test1(<4 x i16> %a) {
+ %A = zext <4 x i16> %a to <4 x i32>
+ ret <4 x i32> %A
+}