1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 define void @f0(ptr %a0, ptr %a1, ptr %a2) {
6 ; CHECK: .cfi_startproc
7 ; CHECK-NEXT: // %bb.0: // %b0
9 ; CHECK-NEXT: r1 = memub(r1+#0)
10 ; CHECK-NEXT: r0 = memub(r0+#0)
17 ; CHECK-NEXT: p0 = xor(p0,p1)
20 ; CHECK-NEXT: r0 = mux(p0,#0,#1)
21 ; CHECK-NEXT: jumpr r31
22 ; CHECK-NEXT: memb(r2+#0) = r0.new
25 %v0 = load i1, ptr %a0
26 %v1 = load i1, ptr %a1
27 %v2 = icmp eq i1 %v0, %v1
32 define void @f1(ptr %a0, ptr %a1, ptr %a2) {
34 ; CHECK: .cfi_startproc
35 ; CHECK-NEXT: // %bb.0: // %b0
37 ; CHECK-NEXT: r1 = memub(r1+#0)
38 ; CHECK-NEXT: r0 = memub(r0+#0)
45 ; CHECK-NEXT: p0 = xor(p0,p1)
48 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
49 ; CHECK-NEXT: jumpr r31
50 ; CHECK-NEXT: memb(r2+#0) = r0.new
53 %v0 = load i1, ptr %a0
54 %v1 = load i1, ptr %a1
55 %v2 = icmp ne i1 %v0, %v1
60 define void @f2(ptr %a0, ptr %a1, ptr %a2) {
62 ; CHECK: .cfi_startproc
63 ; CHECK-NEXT: // %bb.0: // %b0
65 ; CHECK-NEXT: r1 = memub(r1+#0)
66 ; CHECK-NEXT: r0 = memub(r0+#0)
73 ; CHECK-NEXT: p0 = and(p0,!p1)
76 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
77 ; CHECK-NEXT: jumpr r31
78 ; CHECK-NEXT: memb(r2+#0) = r0.new
81 %v0 = load i1, ptr %a0
82 %v1 = load i1, ptr %a1
83 %v2 = icmp slt i1 %v0, %v1
88 define void @f3(ptr %a0, ptr %a1, ptr %a2) {
90 ; CHECK: .cfi_startproc
91 ; CHECK-NEXT: // %bb.0: // %b0
93 ; CHECK-NEXT: r1 = memub(r1+#0)
94 ; CHECK-NEXT: r0 = memub(r0+#0)
101 ; CHECK-NEXT: p0 = or(p0,!p1)
104 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
105 ; CHECK-NEXT: jumpr r31
106 ; CHECK-NEXT: memb(r2+#0) = r0.new
109 %v0 = load i1, ptr %a0
110 %v1 = load i1, ptr %a1
111 %v2 = icmp sle i1 %v0, %v1
112 store i1 %v2, ptr %a2
116 define void @f4(ptr %a0, ptr %a1, ptr %a2) {
118 ; CHECK: .cfi_startproc
119 ; CHECK-NEXT: // %bb.0: // %b0
121 ; CHECK-NEXT: r1 = memub(r1+#0)
122 ; CHECK-NEXT: r0 = memub(r0+#0)
125 ; CHECK-NEXT: p0 = r0
126 ; CHECK-NEXT: p1 = r1
129 ; CHECK-NEXT: p0 = and(p1,!p0)
132 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
133 ; CHECK-NEXT: jumpr r31
134 ; CHECK-NEXT: memb(r2+#0) = r0.new
137 %v0 = load i1, ptr %a0
138 %v1 = load i1, ptr %a1
139 %v2 = icmp sgt i1 %v0, %v1
140 store i1 %v2, ptr %a2
144 define void @f5(ptr %a0, ptr %a1, ptr %a2) {
146 ; CHECK: .cfi_startproc
147 ; CHECK-NEXT: // %bb.0: // %b0
149 ; CHECK-NEXT: r1 = memub(r1+#0)
150 ; CHECK-NEXT: r0 = memub(r0+#0)
153 ; CHECK-NEXT: p0 = r0
154 ; CHECK-NEXT: p1 = r1
157 ; CHECK-NEXT: p0 = or(p1,!p0)
160 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
161 ; CHECK-NEXT: jumpr r31
162 ; CHECK-NEXT: memb(r2+#0) = r0.new
165 %v0 = load i1, ptr %a0
166 %v1 = load i1, ptr %a1
167 %v2 = icmp sge i1 %v0, %v1
168 store i1 %v2, ptr %a2
172 define void @f6(ptr %a0, ptr %a1, ptr %a2) {
174 ; CHECK: .cfi_startproc
175 ; CHECK-NEXT: // %bb.0: // %b0
177 ; CHECK-NEXT: r1 = memub(r1+#0)
178 ; CHECK-NEXT: r0 = memub(r0+#0)
181 ; CHECK-NEXT: p0 = r0
182 ; CHECK-NEXT: p1 = r1
185 ; CHECK-NEXT: p0 = and(p1,!p0)
188 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
189 ; CHECK-NEXT: jumpr r31
190 ; CHECK-NEXT: memb(r2+#0) = r0.new
193 %v0 = load i1, ptr %a0
194 %v1 = load i1, ptr %a1
195 %v2 = icmp ult i1 %v0, %v1
196 store i1 %v2, ptr %a2
200 define void @f7(ptr %a0, ptr %a1, ptr %a2) {
202 ; CHECK: .cfi_startproc
203 ; CHECK-NEXT: // %bb.0: // %b0
205 ; CHECK-NEXT: r1 = memub(r1+#0)
206 ; CHECK-NEXT: r0 = memub(r0+#0)
209 ; CHECK-NEXT: p0 = r0
210 ; CHECK-NEXT: p1 = r1
213 ; CHECK-NEXT: p0 = or(p1,!p0)
216 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
217 ; CHECK-NEXT: jumpr r31
218 ; CHECK-NEXT: memb(r2+#0) = r0.new
221 %v0 = load i1, ptr %a0
222 %v1 = load i1, ptr %a1
223 %v2 = icmp ule i1 %v0, %v1
224 store i1 %v2, ptr %a2
228 define void @f8(ptr %a0, ptr %a1, ptr %a2) {
230 ; CHECK: .cfi_startproc
231 ; CHECK-NEXT: // %bb.0: // %b0
233 ; CHECK-NEXT: r1 = memub(r1+#0)
234 ; CHECK-NEXT: r0 = memub(r0+#0)
237 ; CHECK-NEXT: p0 = r0
238 ; CHECK-NEXT: p1 = r1
241 ; CHECK-NEXT: p0 = and(p0,!p1)
244 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
245 ; CHECK-NEXT: jumpr r31
246 ; CHECK-NEXT: memb(r2+#0) = r0.new
249 %v0 = load i1, ptr %a0
250 %v1 = load i1, ptr %a1
251 %v2 = icmp ugt i1 %v0, %v1
252 store i1 %v2, ptr %a2
256 define void @f9(ptr %a0, ptr %a1, ptr %a2) {
258 ; CHECK: .cfi_startproc
259 ; CHECK-NEXT: // %bb.0: // %b0
261 ; CHECK-NEXT: r1 = memub(r1+#0)
262 ; CHECK-NEXT: r0 = memub(r0+#0)
265 ; CHECK-NEXT: p0 = r0
266 ; CHECK-NEXT: p1 = r1
269 ; CHECK-NEXT: p0 = or(p0,!p1)
272 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
273 ; CHECK-NEXT: jumpr r31
274 ; CHECK-NEXT: memb(r2+#0) = r0.new
277 %v0 = load i1, ptr %a0
278 %v1 = load i1, ptr %a1
279 %v2 = icmp uge i1 %v0, %v1
280 store i1 %v2, ptr %a2