add some more check for vector compares.

llvm-svn: 75024
This commit is contained in:
Chris Lattner 2009-07-08 18:51:25 +00:00
parent 072198a2a1
commit d5ffa8ffb6
1 changed files with 36 additions and 2 deletions

View File

@ -1,9 +1,43 @@
; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | grep pcmpgtd
; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | FileCheck %s
define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind {
define <4 x i32> @test1(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK: test1:
; CHECK: pcmpgtd
; CHECK: ret
%C = icmp sgt <4 x i32> %A, %B
%D = sext <4 x i1> %C to <4 x i32>
ret <4 x i32> %D
}
define <4 x i32> @test2(<4 x i32> %A, <4 x i32> %B) nounwind {
; CHECK: test2:
; CHECK: pcmp
; CHECK: pcmp
; CHECK: xorps
; 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
; CHECK: movaps
; 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:
; CHECK: movaps
; 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
}