[llvm-commits] [llvm] r79719 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/vshift_split.ll test/CodeGen/X86/vshift_split.ll
Eli Friedman
eli.friedman at gmail.com
Fri Aug 21 20:13:15 PDT 2009
Author: efriedma
Date: Fri Aug 21 22:13:10 2009
New Revision: 79719
URL: http://llvm.org/viewvc/llvm-project?rev=79719&view=rev
Log:
Make x86 test actually test x86 code generation. Fix the
construct on ARM, which was breaking by coincidence, and add a similar
testcase for ARM.
Added:
llvm/trunk/test/CodeGen/ARM/vshift_split.ll
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
llvm/trunk/test/CodeGen/X86/vshift_split.ll
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=79719&r1=79718&r2=79719&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Aug 21 22:13:10 2009
@@ -2134,8 +2134,11 @@
N->getOperand(0), NegatedCount);
}
- assert(VT == MVT::i64 &&
- (N->getOpcode() == ISD::SRL || N->getOpcode() == ISD::SRA) &&
+ // We can get here for a node like i32 = ISD::SHL i32, i64
+ if (VT != MVT::i64)
+ return SDValue();
+
+ assert((N->getOpcode() == ISD::SRL || N->getOpcode() == ISD::SRA) &&
"Unknown shift to lower!");
// We only lower SRA, SRL of 1 here, all others use generic lowering.
Added: llvm/trunk/test/CodeGen/ARM/vshift_split.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/vshift_split.ll?rev=79719&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/vshift_split.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/vshift_split.ll Fri Aug 21 22:13:10 2009
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=arm -mattr=-neon
+
+; Example that requires splitting and expanding a vector shift.
+define <2 x i64> @update(<2 x i64> %val) nounwind readnone {
+entry:
+ %shr = lshr <2 x i64> %val, < i64 2, i64 2 > ; <<2 x i64>> [#uses=1]
+ ret <2 x i64> %shr
+}
Modified: llvm/trunk/test/CodeGen/X86/vshift_split.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vshift_split.ll?rev=79719&r1=79718&r2=79719&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vshift_split.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vshift_split.ll Fri Aug 21 22:13:10 2009
@@ -1,8 +1,8 @@
-; RUN: llvm-as < %s | llc
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
; Example that requires splitting and expanding a vector shift.
define <2 x i64> @update(<2 x i64> %val) nounwind readnone {
entry:
- %shr = lshr <2 x i64> %val, < i64 2, i64 2 > ; <<2 x i64>> [#uses=1]
+ %shr = lshr <2 x i64> %val, < i64 2, i64 3 >
ret <2 x i64> %shr
}
More information about the llvm-commits
mailing list