The AND instruction leaves the V flag unmodified, so it falls victim to the same
[oota-llvm.git] / test / CodeGen / X86 / vec_shuffle-16.ll
1 ; RUN: llc < %s -march=x86 -mattr=+sse,-sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse
2 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=sse2
3
4 define <4 x float> @t1(<4 x float> %a, <4 x float> %b) nounwind  {
5 ; sse: movaps
6 ; sse: shufps
7 ; sse2: pshufd
8 ; sse2-NEXT: ret
9         %tmp1 = shufflevector <4 x float> %b, <4 x float> undef, <4 x i32> zeroinitializer
10         ret <4 x float> %tmp1
11 }
12
13 define <4 x float> @t2(<4 x float> %A, <4 x float> %B) nounwind {
14 ; sse: shufps
15 ; sse2: pshufd
16 ; sse2-NEXT: ret
17         %tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 3, i32 3, i32 3, i32 3 >
18         ret <4 x float> %tmp
19 }
20
21 define <4 x float> @t3(<4 x float> %A, <4 x float> %B) nounwind {
22 ; sse: movaps
23 ; sse: shufps
24 ; sse2: pshufd
25 ; sse2-NEXT: ret
26         %tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 4, i32 4, i32 4, i32 4 >
27         ret <4 x float> %tmp
28 }
29
30 define <4 x float> @t4(<4 x float> %A, <4 x float> %B) nounwind {
31 ; sse: shufps
32 ; sse2: pshufd
33 ; sse2-NEXT: ret
34         %tmp = shufflevector <4 x float> %A, <4 x float> %B, <4 x i32> < i32 1, i32 3, i32 2, i32 0 >
35         ret <4 x float> %tmp
36 }