comparison test/CodeGen/X86/vec_compare-sse4.ll @ 0:95c75e76d11b LLVM3.4

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 7d135dc70f03
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 ; RUN: llc < %s -march=x86 -mattr=-sse3,+sse2 | FileCheck %s -check-prefix=SSE2
2 ; RUN: llc < %s -march=x86 -mattr=-sse4.2,+sse4.1 | FileCheck %s -check-prefix=SSE41
3 ; RUN: llc < %s -march=x86 -mattr=+sse4.2 | FileCheck %s -check-prefix=SSE42
4
5 define <2 x i64> @test1(<2 x i64> %A, <2 x i64> %B) nounwind {
6 ; SSE42-LABEL: test1:
7 ; SSE42: pcmpgtq
8 ; SSE42: ret
9 ; SSE41-LABEL: test1:
10 ; SSE41-NOT: pcmpgtq
11 ; SSE41: ret
12 ; SSE2-LABEL: test1:
13 ; SSE2-NOT: pcmpgtq
14 ; SSE2: ret
15
16 %C = icmp sgt <2 x i64> %A, %B
17 %D = sext <2 x i1> %C to <2 x i64>
18 ret <2 x i64> %D
19 }
20
21 define <2 x i64> @test2(<2 x i64> %A, <2 x i64> %B) nounwind {
22 ; SSE42-LABEL: test2:
23 ; SSE42: pcmpeqq
24 ; SSE42: ret
25 ; SSE41-LABEL: test2:
26 ; SSE41: pcmpeqq
27 ; SSE41: ret
28 ; SSE2-LABEL: test2:
29 ; SSE2-NOT: pcmpeqq
30 ; SSE2: ret
31
32 %C = icmp eq <2 x i64> %A, %B
33 %D = sext <2 x i1> %C to <2 x i64>
34 ret <2 x i64> %D
35 }