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
4 define i16 @sccweqand(i16 %a, i16 %b) nounwind {
6 %t2 = icmp eq i16 %t1, 0
7 %t3 = zext i1 %t2 to i16
10 ; CHECK-LABEL: sccweqand:
11 ; CHECK-V1: if r1 == 0
12 ; CHECK-V2: if r1 == 0
14 define i16 @sccwneand(i16 %a, i16 %b) nounwind {
16 %t2 = icmp ne i16 %t1, 0
17 %t3 = zext i1 %t2 to i16
20 ; CHECK-LABEL: sccwneand:
21 ; CHECK-V1: if r1 != 0
22 ; CHECK-V2: if r1 != 0
24 define i16 @sccwne(i16 %a, i16 %b) nounwind {
25 %t1 = icmp ne i16 %a, %b
26 %t2 = zext i1 %t1 to i16
30 ; CHECK-V1: if r1 != r2
31 ; CHECK-V2: if r1 != r2
33 define i16 @sccweq(i16 %a, i16 %b) nounwind {
34 %t1 = icmp eq i16 %a, %b
35 %t2 = zext i1 %t1 to i16
39 ; CHECK-V1: if r1 == r2
40 ; CHECK-V2: if r1 == r2
42 define i16 @sccwugt(i16 %a, i16 %b) nounwind {
43 %t1 = icmp ugt i16 %a, %b
44 %t2 = zext i1 %t1 to i16
47 ; CHECK-LABEL:sccwugt:
48 ; CHECK-V1: if r1 > r2
49 ; CHECK-V2: if r1 > r2
51 define i16 @sccwuge(i16 %a, i16 %b) nounwind {
52 %t1 = icmp uge i16 %a, %b
53 %t2 = zext i1 %t1 to i16
56 ; CHECK-LABEL:sccwuge:
57 ; CHECK-V1: if r1 >= r2
58 ; CHECK-V2: if r1 >= r2
60 define i16 @sccwult(i16 %a, i16 %b) nounwind {
61 %t1 = icmp ult i16 %a, %b
62 %t2 = zext i1 %t1 to i16
65 ; CHECK-LABEL:sccwult:
66 ; CHECK-V1: if r2 > r1
67 ; CHECK-V2: if r1 < r2
69 define i16 @sccwule(i16 %a, i16 %b) nounwind {
70 %t1 = icmp ule i16 %a, %b
71 %t2 = zext i1 %t1 to i16
74 ; CHECK-LABEL:sccwule:
75 ; CHECK-V1: if r2 >= r1
76 ; CHECK-V2: if r1 <= r2
78 define i16 @sccwsgt(i16 %a, i16 %b) nounwind {
79 %t1 = icmp sgt i16 %a, %b
80 %t2 = zext i1 %t1 to i16
83 ; CHECK-LABEL:sccwsgt:
84 ; CHECK-V1: if r1 s> r2
85 ; CHECK-V2: if r1 s> r2
87 define i16 @sccwsge(i16 %a, i16 %b) nounwind {
88 %t1 = icmp sge i16 %a, %b
89 %t2 = zext i1 %t1 to i16
92 ; CHECK-LABEL:sccwsge:
93 ; CHECK-V1: if r1 s>= r2
94 ; CHECK-V2: if r1 s>= r2
96 define i16 @sccwslt(i16 %a, i16 %b) nounwind {
97 %t1 = icmp slt i16 %a, %b
98 %t2 = zext i1 %t1 to i16
101 ; CHECK-LABEL:sccwslt:
102 ; CHECK-V1: if r2 s> r1
103 ; CHECK-V2: if r1 s< r2
105 define i16 @sccwsle(i16 %a, i16 %b) nounwind {
106 %t1 = icmp sle i16 %a, %b
107 %t2 = zext i1 %t1 to i16
110 ; CHECK-LABEL:sccwsle:
111 ; CHECK-V1: if r2 s>= r1
112 ; CHECK-V2: if r1 s<= r2