aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/vec_compare.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-08 18:51:25 +0000
committerChris Lattner <sabre@nondot.org>2009-07-08 18:51:25 +0000
commit515cdbe49d9bb5cd05be2713faaa7e2a66ddc3bc (patch)
tree94672691624d0342d1a89a205052daccda87efc4 /test/CodeGen/X86/vec_compare.ll
parent57e56cd72a74c8f25c2a5c95fc7c22422587c92f (diff)
downloadexternal_llvm-515cdbe49d9bb5cd05be2713faaa7e2a66ddc3bc.zip
external_llvm-515cdbe49d9bb5cd05be2713faaa7e2a66ddc3bc.tar.gz
external_llvm-515cdbe49d9bb5cd05be2713faaa7e2a66ddc3bc.tar.bz2
add some more check for vector compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_compare.ll')
-rw-r--r--test/CodeGen/X86/vec_compare.ll38
1 files changed, 36 insertions, 2 deletions
diff --git a/test/CodeGen/X86/vec_compare.ll b/test/CodeGen/X86/vec_compare.ll
index 42a3c2a..fc30763 100644
--- a/test/CodeGen/X86/vec_compare.ll
+++ b/test/CodeGen/X86/vec_compare.ll
@@ -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
+}