• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=x86 -mattr=-sse3,+sse2 | FileCheck %s -check-prefix=SSE2
2; RUN: llc < %s -march=x86 -mattr=-sse42,+sse41 | FileCheck %s -check-prefix=SSE41
3; RUN: llc < %s -march=x86 -mattr=+sse42 | FileCheck %s -check-prefix=SSE42
4
5define <2 x i64> @test1(<2 x i64> %A, <2 x i64> %B) nounwind {
6; SSE42: test1:
7; SSE42: pcmpgtq
8; SSE42: ret
9; SSE41: test1:
10; SSE41-NOT: pcmpgtq
11; SSE41: ret
12; SSE2: 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
21define <2 x i64> @test2(<2 x i64> %A, <2 x i64> %B) nounwind {
22; SSE42: test2:
23; SSE42: pcmpeqq
24; SSE42: ret
25; SSE41: test2:
26; SSE41: pcmpeqq
27; SSE41: ret
28; SSE2: 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}
36