[llvm-commits] [llvm] r63252 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/vec_shuffle-29.ll

Mon P Wang wangmp at apple.com
Wed Jan 28 15:11:14 PST 2009


Author: wangmp
Date: Wed Jan 28 17:11:14 2009
New Revision: 63252

URL: http://llvm.org/viewvc/llvm-project?rev=63252&view=rev
Log:
Fixed lowering of v816 shuffles.

Added:
    llvm/trunk/test/CodeGen/X86/vec_shuffle-29.ll
Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=63252&r1=63251&r2=63252&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jan 28 17:11:14 2009
@@ -3677,7 +3677,7 @@
       ++V2InOrder;
     } else if (EltIdx < 8) {
       V1Elts.push_back(Elt);
-      V2Elts.push_back(DAG.getConstant(i+8, MaskEVT));
+      V2Elts.push_back(DAG.getConstant(EltIdx+8, MaskEVT));
       ++V1FromV1;
     } else {
       V1Elts.push_back(Elt);

Added: llvm/trunk/test/CodeGen/X86/vec_shuffle-29.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-29.ll?rev=63252&view=auto

==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_shuffle-29.ll (added)
+++ llvm/trunk/test/CodeGen/X86/vec_shuffle-29.ll Wed Jan 28 17:11:14 2009
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -disable-mmx -o %t -f
+; RUN: not grep pextrw %t
+; RUN: grep pinsrw %t
+
+; Test for v8xi16 lowering where we extract the first element of the vector and
+; placed it in the second element of the result.
+
+define void @test_cl(<8 x i16> addrspace(1)* %dest, <8 x i16> addrspace(1)* %old) nounwind {
+entry:
+	%tmp3 = load <8 x i16> addrspace(1)* %old		; <<8 x i16>> [#uses=1]
+	%tmp6 = shufflevector <8 x i16> %tmp3, <8 x i16> < i16 0, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef >, <8 x i32> < i32 8, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef  >		; <<8 x i16>> [#uses=1]
+	store <8 x i16> %tmp6, <8 x i16> addrspace(1)* %dest
+	ret void
+}
\ No newline at end of file





More information about the llvm-commits mailing list