[llvm-commits] [llvm] r111341 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/neon-ops.ll

Bob Wilson bob.wilson at apple.com
Tue Aug 17 18:45:52 PDT 2010


Author: bwilson
Date: Tue Aug 17 20:45:52 2010
New Revision: 111341

URL: http://llvm.org/viewvc/llvm-project?rev=111341&view=rev
Log:
Expand ZERO_EXTEND operations for NEON vector types.
Testcase from Nick Lewycky.

Added:
    llvm/trunk/test/CodeGen/ARM/neon-ops.ll
Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=111341&r1=111340&r2=111341&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Aug 17 20:45:52 2010
@@ -125,6 +125,7 @@
   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);

Added: llvm/trunk/test/CodeGen/ARM/neon-ops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/neon-ops.ll?rev=111341&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/neon-ops.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/neon-ops.ll Tue Aug 17 20:45:52 2010
@@ -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
+}





More information about the llvm-commits mailing list