diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-08 18:51:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-08 18:51:25 +0000 |
commit | 515cdbe49d9bb5cd05be2713faaa7e2a66ddc3bc (patch) | |
tree | 94672691624d0342d1a89a205052daccda87efc4 | |
parent | 57e56cd72a74c8f25c2a5c95fc7c22422587c92f (diff) |
add some more check for vector compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75024 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/X86/vec_compare.ll | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/test/CodeGen/X86/vec_compare.ll b/test/CodeGen/X86/vec_compare.ll index 42a3c2a802..fc30763f40 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 +} |