1 ; RUN: llc < %s -march=x86 -mcpu=yonah | FileCheck %s 2 3 4 define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind { 5 ; CHECK: test1: 6 ; CHECK: pcmpgtd 7 ; CHECK: ret 8 9 %C = icmp sgt <4 x i32> %A, %B 10 %D = sext <4 x i1> %C to <4 x i32> 11 ret <4 x i32> %D 12 } 13 14 define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind { 15 ; CHECK: test2: 16 ; CHECK: pcmp 17 ; CHECK: pcmp 18 ; CHECK: pxor 19 ; CHECK: ret 20 %C = icmp sge <4 x i32> %A, %B 21 %D = sext <4 x i1> %C to <4 x i32> 22 ret <4 x i32> %D 23 } 24 25 define <4 x i32> @test3(<4 x i32> %A, <4 x i32> %B) nounwind { 26 ; CHECK: test3: 27 ; CHECK: pcmpgtd 28 ; CHECK: movdqa 29 ; CHECK: ret 30 %C = icmp slt <4 x i32> %A, %B 31 %D = sext <4 x i1> %C to <4 x i32> 32 ret <4 x i32> %D 33 } 34 35 define <4 x i32> @test4(<4 x i32> %A, <4 x i32> %B) nounwind { 36 ; CHECK: test4: 37 ; CHECK: movdqa 38 ; CHECK: pcmpgtd 39 ; CHECK: ret 40 %C = icmp ugt <4 x i32> %A, %B 41 %D = sext <4 x i1> %C to <4 x i32> 42 ret <4 x i32> %D 43 } 44