1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=-sse3,+sse2 | FileCheck %s --check-prefix=SSE2
3 ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=-sse4.2,+sse4.1 | FileCheck %s --check-prefix=SSE41
4 ; RUN: llc < %s -mtriple=i686-apple-darwin9 -mattr=+sse4.2 | FileCheck %s --check-prefix=SSE42
6 define <2 x i64> @test1(<2 x i64> %A, <2 x i64> %B) nounwind {
9 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
10 ; SSE2-NEXT: pxor %xmm2, %xmm1
11 ; SSE2-NEXT: pxor %xmm2, %xmm0
12 ; SSE2-NEXT: movdqa %xmm0, %xmm2
13 ; SSE2-NEXT: pcmpgtd %xmm1, %xmm2
14 ; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
15 ; SSE2-NEXT: pcmpeqd %xmm1, %xmm0
16 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,3,3]
17 ; SSE2-NEXT: pand %xmm3, %xmm1
18 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
19 ; SSE2-NEXT: por %xmm1, %xmm0
24 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [2147483648,0,2147483648,0]
25 ; SSE41-NEXT: pxor %xmm2, %xmm1
26 ; SSE41-NEXT: pxor %xmm2, %xmm0
27 ; SSE41-NEXT: movdqa %xmm0, %xmm2
28 ; SSE41-NEXT: pcmpgtd %xmm1, %xmm2
29 ; SSE41-NEXT: pshufd {{.*#+}} xmm3 = xmm2[0,0,2,2]
30 ; SSE41-NEXT: pcmpeqd %xmm1, %xmm0
31 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,3,3]
32 ; SSE41-NEXT: pand %xmm3, %xmm1
33 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm2[1,1,3,3]
34 ; SSE41-NEXT: por %xmm1, %xmm0
39 ; SSE42-NEXT: pcmpgtq %xmm1, %xmm0
41 %C = icmp sgt <2 x i64> %A, %B
42 %D = sext <2 x i1> %C to <2 x i64>
46 define <2 x i64> @test2(<2 x i64> %A, <2 x i64> %B) nounwind {
49 ; SSE2-NEXT: pcmpeqd %xmm1, %xmm0
50 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,0,3,2]
51 ; SSE2-NEXT: pand %xmm1, %xmm0
56 ; SSE41-NEXT: pcmpeqq %xmm1, %xmm0
61 ; SSE42-NEXT: pcmpeqq %xmm1, %xmm0
63 %C = icmp eq <2 x i64> %A, %B
64 %D = sext <2 x i1> %C to <2 x i64>