[llvm-commits] [llvm] r106419 - in /llvm/trunk: lib/Target/CellSPU/SPUISelLowering.cpp test/CodeGen/CellSPU/shuffles.ll
Kalle Raiskila
kalle.raiskila at nokia.com
Mon Jun 21 07:42:19 PDT 2010
Author: kraiskil
Date: Mon Jun 21 09:42:19 2010
New Revision: 106419
URL: http://llvm.org/viewvc/llvm-project?rev=106419&view=rev
Log:
Fix the lowering of VECTOR_SHUFFLE on SPU to handle splats.
Modified:
llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
llvm/trunk/test/CodeGen/CellSPU/shuffles.ll
Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=106419&r1=106418&r2=106419&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Mon Jun 21 09:42:19 2010
@@ -1791,7 +1791,7 @@
} else {
rotate = false;
}
- } else if (PrevElt == 0) {
+ } else if (i == 0) {
// First time through, need to keep track of previous element
PrevElt = SrcElt;
} else {
Modified: llvm/trunk/test/CodeGen/CellSPU/shuffles.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/shuffles.ll?rev=106419&r1=106418&r2=106419&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CellSPU/shuffles.ll (original)
+++ llvm/trunk/test/CodeGen/CellSPU/shuffles.ll Mon Jun 21 09:42:19 2010
@@ -5,6 +5,11 @@
; CHECK: shufb {{\$., \$4, \$3, \$.}}
%val= shufflevector <4 x float> %param1, <4 x float> %param2, <4 x i32> <i32 4,i32 1,i32 2,i32 3>
ret <4 x float> %val
-
}
+define <4 x float> @splat(float %param1) {
+ %vec = insertelement <1 x float> undef, float %param1, i32 0
+ %val= shufflevector <1 x float> %vec, <1 x float> undef, <4 x i32> <i32 0,i32 0,i32 0,i32 0>
+ ret <4 x float> %val
+}
+
More information about the llvm-commits
mailing list