• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=bpfel < %s | FileCheck --check-prefix=CHECK-V1 %s
2; RUN: llc -march=bpfel -mcpu=v2 < %s | FileCheck --check-prefix=CHECK-V2 %s
3
4define i16 @sccweqand(i16 %a, i16 %b) nounwind {
5  %t1 = and i16 %a, %b
6  %t2 = icmp eq i16 %t1, 0
7  %t3 = zext i1 %t2 to i16
8  ret i16 %t3
9}
10; CHECK-LABEL: sccweqand:
11; CHECK-V1: if r1 == 0
12; CHECK-V2: if r1 == 0
13
14define i16 @sccwneand(i16 %a, i16 %b) nounwind {
15  %t1 = and i16 %a, %b
16  %t2 = icmp ne i16 %t1, 0
17  %t3 = zext i1 %t2 to i16
18  ret i16 %t3
19}
20; CHECK-LABEL: sccwneand:
21; CHECK-V1: if r1 != 0
22; CHECK-V2: if r1 != 0
23
24define i16 @sccwne(i16 %a, i16 %b) nounwind {
25  %t1 = icmp ne i16 %a, %b
26  %t2 = zext i1 %t1 to i16
27  ret i16 %t2
28}
29; CHECK-LABEL:sccwne:
30; CHECK-V1: if r1 != r2
31; CHECK-V2: if r1 != r2
32
33define i16 @sccweq(i16 %a, i16 %b) nounwind {
34  %t1 = icmp eq i16 %a, %b
35  %t2 = zext i1 %t1 to i16
36  ret i16 %t2
37}
38; CHECK-LABEL:sccweq:
39; CHECK-V1: if r1 == r2
40; CHECK-V2: if r1 == r2
41
42define i16 @sccwugt(i16 %a, i16 %b) nounwind {
43  %t1 = icmp ugt i16 %a, %b
44  %t2 = zext i1 %t1 to i16
45  ret i16 %t2
46}
47; CHECK-LABEL:sccwugt:
48; CHECK-V1: if r1 > r2
49; CHECK-V2: if r1 > r2
50
51define i16 @sccwuge(i16 %a, i16 %b) nounwind {
52  %t1 = icmp uge i16 %a, %b
53  %t2 = zext i1 %t1 to i16
54  ret i16 %t2
55}
56; CHECK-LABEL:sccwuge:
57; CHECK-V1: if r1 >= r2
58; CHECK-V2: if r1 >= r2
59
60define i16 @sccwult(i16 %a, i16 %b) nounwind {
61  %t1 = icmp ult i16 %a, %b
62  %t2 = zext i1 %t1 to i16
63  ret i16 %t2
64}
65; CHECK-LABEL:sccwult:
66; CHECK-V1: if r2 > r1
67; CHECK-V2: if r1 < r2
68
69define i16 @sccwule(i16 %a, i16 %b) nounwind {
70  %t1 = icmp ule i16 %a, %b
71  %t2 = zext i1 %t1 to i16
72  ret i16 %t2
73}
74; CHECK-LABEL:sccwule:
75; CHECK-V1: if r2 >= r1
76; CHECK-V2: if r1 <= r2
77
78define i16 @sccwsgt(i16 %a, i16 %b) nounwind {
79  %t1 = icmp sgt i16 %a, %b
80  %t2 = zext i1 %t1 to i16
81  ret i16 %t2
82}
83; CHECK-LABEL:sccwsgt:
84; CHECK-V1: if r1 s> r2
85; CHECK-V2: if r1 s> r2
86
87define i16 @sccwsge(i16 %a, i16 %b) nounwind {
88  %t1 = icmp sge i16 %a, %b
89  %t2 = zext i1 %t1 to i16
90  ret i16 %t2
91}
92; CHECK-LABEL:sccwsge:
93; CHECK-V1: if r1 s>= r2
94; CHECK-V2: if r1 s>= r2
95
96define i16 @sccwslt(i16 %a, i16 %b) nounwind {
97  %t1 = icmp slt i16 %a, %b
98  %t2 = zext i1 %t1 to i16
99  ret i16 %t2
100}
101; CHECK-LABEL:sccwslt:
102; CHECK-V1: if r2 s> r1
103; CHECK-V2: if r1 s< r2
104
105define i16 @sccwsle(i16 %a, i16 %b) nounwind {
106  %t1 = icmp sle i16 %a, %b
107  %t2 = zext i1 %t1 to i16
108  ret i16 %t2
109}
110; CHECK-LABEL:sccwsle:
111; CHECK-V1: if r2 s>= r1
112; CHECK-V2: if r1 s<= r2
113