1 ; RUN: llc < %s -march=x86 -mcpu=yonah -mtriple=i386-apple-darwin | FileCheck %s
4 define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
9 %C = icmp sgt <4 x i32> %A, %B
10 %D = sext <4 x i1> %C to <4 x i32>
14 define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind {
20 %C = icmp sge <4 x i32> %A, %B
21 %D = sext <4 x i1> %C to <4 x i32>
25 define <4 x i32> @test3(<4 x i32> %A, <4 x i32> %B) nounwind {
30 %C = icmp slt <4 x i32> %A, %B
31 %D = sext <4 x i1> %C to <4 x i32>
35 define <4 x i32> @test4(<4 x i32> %A, <4 x i32> %B) nounwind {
40 %C = icmp ugt <4 x i32> %A, %B
41 %D = sext <4 x i1> %C to <4 x i32>
45 define <2 x i64> @test5(<2 x i64> %A, <2 x i64> %B) nounwind {
51 %C = icmp eq <2 x i64> %A, %B
52 %D = sext <2 x i1> %C to <2 x i64>
56 define <2 x i64> @test6(<2 x i64> %A, <2 x i64> %B) nounwind {
64 %C = icmp ne <2 x i64> %A, %B
65 %D = sext <2 x i1> %C to <2 x i64>
69 define <2 x i64> @test7(<2 x i64> %A, <2 x i64> %B) nounwind {
71 ; CHECK: pcmpgtd %xmm1
79 %C = icmp sgt <2 x i64> %A, %B
80 %D = sext <2 x i1> %C to <2 x i64>
84 define <2 x i64> @test8(<2 x i64> %A, <2 x i64> %B) nounwind {
86 ; CHECK: pcmpgtd %xmm0
94 %C = icmp slt <2 x i64> %A, %B
95 %D = sext <2 x i1> %C to <2 x i64>
99 define <2 x i64> @test9(<2 x i64> %A, <2 x i64> %B) nounwind {
101 ; CHECK: pcmpgtd %xmm0
111 %C = icmp sge <2 x i64> %A, %B
112 %D = sext <2 x i1> %C to <2 x i64>
116 define <2 x i64> @test10(<2 x i64> %A, <2 x i64> %B) nounwind {
118 ; CHECK: pcmpgtd %xmm1
128 %C = icmp sle <2 x i64> %A, %B
129 %D = sext <2 x i1> %C to <2 x i64>
133 define <2 x i64> @test11(<2 x i64> %A, <2 x i64> %B) nounwind {
134 ; CHECK: [[CONSTSEG:[A-Z0-9_]*]]:
135 ; CHECK: .long 2147483648
136 ; CHECK-NEXT: .long 2147483648
137 ; CHECK-NEXT: .long 2147483648
138 ; CHECK-NEXT: .long 2147483648
140 ; CHECK: movdqa [[CONSTSEG]], [[CONSTREG:%xmm[0-9]*]]
141 ; CHECK: pxor [[CONSTREG]]
142 ; CHECK: pxor [[CONSTREG]]
143 ; CHECK: pcmpgtd %xmm1
151 %C = icmp ugt <2 x i64> %A, %B
152 %D = sext <2 x i1> %C to <2 x i64>
156 define <2 x i64> @test12(<2 x i64> %A, <2 x i64> %B) nounwind {
160 ; CHECK: pcmpgtd %xmm0
168 %C = icmp ult <2 x i64> %A, %B
169 %D = sext <2 x i1> %C to <2 x i64>
173 define <2 x i64> @test13(<2 x i64> %A, <2 x i64> %B) nounwind {
177 ; CHECK: pcmpgtd %xmm0
187 %C = icmp uge <2 x i64> %A, %B
188 %D = sext <2 x i1> %C to <2 x i64>
192 define <2 x i64> @test14(<2 x i64> %A, <2 x i64> %B) nounwind {
196 ; CHECK: pcmpgtd %xmm1
206 %C = icmp ule <2 x i64> %A, %B
207 %D = sext <2 x i1> %C to <2 x i64>