aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/vec_shuffle-27.ll
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-11-16 05:06:27 +0000
committerMon P Wang <wangmp@apple.com>2008-11-16 05:06:27 +0000
commitc7849c22f4804075c0c972e20f9cd701bdb6ab6f (patch)
tree9f4dda703c98f0b9f5a3db4fdc973b15b3e15ac5 /test/CodeGen/X86/vec_shuffle-27.ll
parent29cd5ba621268c44c8be72397e00c79899ecdf0b (diff)
downloadexternal_llvm-c7849c22f4804075c0c972e20f9cd701bdb6ab6f.zip
external_llvm-c7849c22f4804075c0c972e20f9cd701bdb6ab6f.tar.gz
external_llvm-c7849c22f4804075c0c972e20f9cd701bdb6ab6f.tar.bz2
Improved shuffle normalization to avoid using extract/build when we
can extract using different indexes for two vectors. Added a few tests for vector shuffles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_shuffle-27.ll')
-rw-r--r--test/CodeGen/X86/vec_shuffle-27.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_shuffle-27.ll b/test/CodeGen/X86/vec_shuffle-27.ll
new file mode 100644
index 0000000..6baf47a
--- /dev/null
+++ b/test/CodeGen/X86/vec_shuffle-27.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
+; RUN: grep addps %t | count 2
+; RUN: grep mulps %t | count 2
+; RUN: grep subps %t | count 2
+
+; ModuleID = 'vec_shuffle-27.bc'
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
+target triple = "i686-apple-cl.1.0"
+
+define <8 x float> @my2filter4_1d(<4 x float> %a, <8 x float> %T0, <8 x float> %T1) nounwind readnone {
+entry:
+ %tmp7 = shufflevector <4 x float> %a, <4 x float> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3 > ; <<8 x float>> [#uses=1]
+ %sub = sub <8 x float> %T1, %T0 ; <<8 x float>> [#uses=1]
+ %mul = mul <8 x float> %sub, %tmp7 ; <<8 x float>> [#uses=1]
+ %add = add <8 x float> %mul, %T0 ; <<8 x float>> [#uses=1]
+ ret <8 x float> %add
+}