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