2012-08-02 08:56:42 +08:00
|
|
|
; RUN: llc < %s -march=x86 -mcpu=yonah -mtriple=i386-apple-darwin | FileCheck %s
|
2009-07-08 06:51:09 +08:00
|
|
|
|
2009-07-08 07:03:54 +08:00
|
|
|
|
2009-07-09 02:51:25 +08:00
|
|
|
define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
|
|
|
|
; CHECK: test1:
|
|
|
|
; CHECK: pcmpgtd
|
|
|
|
; CHECK: ret
|
|
|
|
|
2009-07-08 07:03:54 +08:00
|
|
|
%C = icmp sgt <4 x i32> %A, %B
|
|
|
|
%D = sext <4 x i1> %C to <4 x i32>
|
|
|
|
ret <4 x i32> %D
|
|
|
|
}
|
|
|
|
|
2009-07-09 02:51:25 +08:00
|
|
|
define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind {
|
|
|
|
; CHECK: test2:
|
|
|
|
; CHECK: pcmp
|
2012-08-03 03:37:32 +08:00
|
|
|
; CHECK: pcmp
|
|
|
|
; CHECK: pxor
|
2009-07-09 02:51:25 +08:00
|
|
|
; CHECK: ret
|
|
|
|
%C = icmp sge <4 x i32> %A, %B
|
|
|
|
%D = sext <4 x i1> %C to <4 x i32>
|
|
|
|
ret <4 x i32> %D
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test3(<4 x i32> %A, <4 x i32> %B) nounwind {
|
|
|
|
; CHECK: test3:
|
|
|
|
; CHECK: pcmpgtd
|
2010-03-31 06:47:00 +08:00
|
|
|
; CHECK: movdqa
|
2009-07-09 02:51:25 +08:00
|
|
|
; CHECK: ret
|
|
|
|
%C = icmp slt <4 x i32> %A, %B
|
|
|
|
%D = sext <4 x i1> %C to <4 x i32>
|
|
|
|
ret <4 x i32> %D
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test4(<4 x i32> %A, <4 x i32> %B) nounwind {
|
|
|
|
; CHECK: test4:
|
2010-03-31 06:47:00 +08:00
|
|
|
; CHECK: movdqa
|
2009-07-09 02:51:25 +08:00
|
|
|
; CHECK: pcmpgtd
|
|
|
|
; CHECK: ret
|
|
|
|
%C = icmp ugt <4 x i32> %A, %B
|
|
|
|
%D = sext <4 x i1> %C to <4 x i32>
|
|
|
|
ret <4 x i32> %D
|
|
|
|
}
|
2012-12-25 20:54:19 +08:00
|
|
|
|
|
|
|
define <2 x i64> @test5(<2 x i64> %A, <2 x i64> %B) nounwind {
|
|
|
|
; CHECK: test5:
|
|
|
|
; CHECK: pcmpeqd
|
2012-12-25 21:09:08 +08:00
|
|
|
; CHECK: pshufd $-79
|
2012-12-25 20:54:19 +08:00
|
|
|
; CHECK: pand
|
|
|
|
; CHECK: ret
|
|
|
|
%C = icmp eq <2 x i64> %A, %B
|
|
|
|
%D = sext <2 x i1> %C to <2 x i64>
|
|
|
|
ret <2 x i64> %D
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test6(<2 x i64> %A, <2 x i64> %B) nounwind {
|
|
|
|
; CHECK: test6:
|
|
|
|
; CHECK: pcmpeqd
|
2012-12-25 21:09:08 +08:00
|
|
|
; CHECK: pshufd $-79
|
2012-12-25 20:54:19 +08:00
|
|
|
; CHECK: pand
|
|
|
|
; CHECK: pcmpeqd
|
|
|
|
; CHECK: pxor
|
|
|
|
; CHECK: ret
|
|
|
|
%C = icmp ne <2 x i64> %A, %B
|
|
|
|
%D = sext <2 x i1> %C to <2 x i64>
|
|
|
|
ret <2 x i64> %D
|
|
|
|
}
|