• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; CHECK-LABEL: test_00
4; CHECK: [[P00:p[0-9]+]] = vcmpb.eq(r1:0,r3:2)
5; CHECK: [[P01:p[0-9]+]] = not([[P00]])
6; CHECK: r1:0 = mask([[P01]])
7; CHECK: jumpr r31
8define <8 x i8> @test_00(<8 x i8> %a0, <8 x i8> %a1) #0 {
9  %v0 = icmp ne <8 x i8> %a0, %a1
10  %v1 = sext <8 x i1> %v0 to <8 x i8>
11  ret <8 x i8> %v1
12}
13
14; CHECK-LABEL: test_01
15; CHECK: [[P00:p[0-9]+]] = vcmpb.gt(r1:0,r3:2)
16; CHECK: [[P01:p[0-9]+]] = not([[P00]])
17; CHECK: r1:0 = mask([[P01]])
18; CHECK: jumpr r31
19define <8 x i8> @test_01(<8 x i8> %a0, <8 x i8> %a1) #0 {
20  %v0 = icmp sle <8 x i8> %a0, %a1
21  %v1 = sext <8 x i1> %v0 to <8 x i8>
22  ret <8 x i8> %v1
23}
24
25; CHECK-LABEL: test_02
26; CHECK: [[P00:p[0-9]+]] = vcmpb.gtu(r1:0,r3:2)
27; CHECK: [[P01:p[0-9]+]] = not([[P00]])
28; CHECK: r1:0 = mask([[P01]])
29; CHECK: jumpr r31
30define <8 x i8> @test_02(<8 x i8> %a0, <8 x i8> %a1) #0 {
31  %v0 = icmp ule <8 x i8> %a0, %a1
32  %v1 = sext <8 x i1> %v0 to <8 x i8>
33  ret <8 x i8> %v1
34}
35
36; CHECK-LABEL: test_10
37; CHECK: [[P00:p[0-9]+]] = vcmph.eq(r1:0,r3:2)
38; CHECK: [[P01:p[0-9]+]] = not([[P00]])
39; CHECK: r1:0 = mask([[P01]])
40; CHECK: jumpr r31
41define <4 x i16> @test_10(<4 x i16> %a0, <4 x i16> %a1) #0 {
42  %v0 = icmp ne <4 x i16> %a0, %a1
43  %v1 = sext <4 x i1> %v0 to <4 x i16>
44  ret <4 x i16> %v1
45}
46
47; CHECK-LABEL: test_11
48; CHECK: [[P00:p[0-9]+]] = vcmph.gt(r1:0,r3:2)
49; CHECK: [[P01:p[0-9]+]] = not([[P00]])
50; CHECK: r1:0 = mask([[P01]])
51; CHECK: jumpr r31
52define <4 x i16> @test_11(<4 x i16> %a0, <4 x i16> %a1) #0 {
53  %v0 = icmp sle <4 x i16> %a0, %a1
54  %v1 = sext <4 x i1> %v0 to <4 x i16>
55  ret <4 x i16> %v1
56}
57
58; CHECK-LABEL: test_12
59; CHECK: [[P00:p[0-9]+]] = vcmph.gtu(r1:0,r3:2)
60; CHECK: [[P01:p[0-9]+]] = not([[P00]])
61; CHECK: r1:0 = mask([[P01]])
62; CHECK: jumpr r31
63define <4 x i16> @test_12(<4 x i16> %a0, <4 x i16> %a1) #0 {
64  %v0 = icmp ule <4 x i16> %a0, %a1
65  %v1 = sext <4 x i1> %v0 to <4 x i16>
66  ret <4 x i16> %v1
67}
68
69; CHECK-LABEL: test_20
70; CHECK: [[P00:p[0-9]+]] = vcmpw.eq(r1:0,r3:2)
71; CHECK: [[P01:p[0-9]+]] = not([[P00]])
72; CHECK: r1:0 = mask([[P01]])
73; CHECK: jumpr r31
74define <2 x i32> @test_20(<2 x i32> %a0, <2 x i32> %a1) #0 {
75  %v0 = icmp ne <2 x i32> %a0, %a1
76  %v1 = sext <2 x i1> %v0 to <2 x i32>
77  ret <2 x i32> %v1
78}
79
80; CHECK-LABEL: test_21
81; CHECK: [[P00:p[0-9]+]] = vcmpw.gt(r1:0,r3:2)
82; CHECK: [[P01:p[0-9]+]] = not([[P00]])
83; CHECK: r1:0 = mask([[P01]])
84; CHECK: jumpr r31
85define <2 x i32> @test_21(<2 x i32> %a0, <2 x i32> %a1) #0 {
86  %v0 = icmp sle <2 x i32> %a0, %a1
87  %v1 = sext <2 x i1> %v0 to <2 x i32>
88  ret <2 x i32> %v1
89}
90
91; CHECK-LABEL: test_22
92; CHECK: [[P00:p[0-9]+]] = vcmpw.gtu(r1:0,r3:2)
93; CHECK: [[P01:p[0-9]+]] = not([[P00]])
94; CHECK: r1:0 = mask([[P01]])
95; CHECK: jumpr r31
96define <2 x i32> @test_22(<2 x i32> %a0, <2 x i32> %a1) #0 {
97  %v0 = icmp ule <2 x i32> %a0, %a1
98  %v1 = sext <2 x i1> %v0 to <2 x i32>
99  ret <2 x i32> %v1
100}
101
102attributes #0 = { nounwind readnone }
103