1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve,+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LE
3 ; RUN: llc -mtriple=thumbebv8.1m.main-none-none-eabi -mattr=+mve,+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-BE
5 define void @foo_v4i32_v4i32(ptr %dest, ptr %mask, ptr %src) {
6 ; CHECK-LABEL: foo_v4i32_v4i32:
7 ; CHECK: @ %bb.0: @ %entry
8 ; CHECK-NEXT: vldrw.u32 q0, [r1]
9 ; CHECK-NEXT: vptt.s32 gt, q0, zr
10 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
11 ; CHECK-NEXT: vstrwt.32 q0, [r0]
14 %0 = load <4 x i32>, ptr %mask, align 4
15 %1 = icmp sgt <4 x i32> %0, zeroinitializer
16 %2 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x i32> undef)
17 call void @llvm.masked.store.v4i32.p0(<4 x i32> %2, ptr %dest, i32 4, <4 x i1> %1)
21 define void @foo_sext_v4i32_v4i8(ptr %dest, ptr %mask, ptr %src) {
22 ; CHECK-LABEL: foo_sext_v4i32_v4i8:
23 ; CHECK: @ %bb.0: @ %entry
24 ; CHECK-NEXT: vldrw.u32 q0, [r1]
25 ; CHECK-NEXT: vptt.s32 gt, q0, zr
26 ; CHECK-NEXT: vldrbt.s32 q0, [r2]
27 ; CHECK-NEXT: vstrwt.32 q0, [r0]
30 %0 = load <4 x i32>, ptr %mask, align 4
31 %1 = icmp sgt <4 x i32> %0, zeroinitializer
32 %2 = call <4 x i8> @llvm.masked.load.v4i8.p0(ptr %src, i32 1, <4 x i1> %1, <4 x i8> undef)
33 %3 = sext <4 x i8> %2 to <4 x i32>
34 call void @llvm.masked.store.v4i32.p0(<4 x i32> %3, ptr %dest, i32 4, <4 x i1> %1)
38 define void @foo_sext_v4i32_v4i16(ptr %dest, ptr %mask, ptr %src) {
39 ; CHECK-LABEL: foo_sext_v4i32_v4i16:
40 ; CHECK: @ %bb.0: @ %entry
41 ; CHECK-NEXT: vldrw.u32 q0, [r1]
42 ; CHECK-NEXT: vptt.s32 gt, q0, zr
43 ; CHECK-NEXT: vldrht.s32 q0, [r2]
44 ; CHECK-NEXT: vstrwt.32 q0, [r0]
47 %0 = load <4 x i32>, ptr %mask, align 4
48 %1 = icmp sgt <4 x i32> %0, zeroinitializer
49 %2 = call <4 x i16> @llvm.masked.load.v4i16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x i16> undef)
50 %3 = sext <4 x i16> %2 to <4 x i32>
51 call void @llvm.masked.store.v4i32.p0(<4 x i32> %3, ptr %dest, i32 4, <4 x i1> %1)
55 define void @foo_zext_v4i32_v4i8(ptr %dest, ptr %mask, ptr %src) {
56 ; CHECK-LABEL: foo_zext_v4i32_v4i8:
57 ; CHECK: @ %bb.0: @ %entry
58 ; CHECK-NEXT: vldrw.u32 q0, [r1]
59 ; CHECK-NEXT: vptt.s32 gt, q0, zr
60 ; CHECK-NEXT: vldrbt.u32 q0, [r2]
61 ; CHECK-NEXT: vstrwt.32 q0, [r0]
64 %0 = load <4 x i32>, ptr %mask, align 4
65 %1 = icmp sgt <4 x i32> %0, zeroinitializer
66 %2 = call <4 x i8> @llvm.masked.load.v4i8.p0(ptr %src, i32 1, <4 x i1> %1, <4 x i8> undef)
67 %3 = zext <4 x i8> %2 to <4 x i32>
68 call void @llvm.masked.store.v4i32.p0(<4 x i32> %3, ptr %dest, i32 4, <4 x i1> %1)
72 define void @foo_zext_v4i32_v4i16(ptr %dest, ptr %mask, ptr %src) {
73 ; CHECK-LABEL: foo_zext_v4i32_v4i16:
74 ; CHECK: @ %bb.0: @ %entry
75 ; CHECK-NEXT: vldrw.u32 q0, [r1]
76 ; CHECK-NEXT: vptt.s32 gt, q0, zr
77 ; CHECK-NEXT: vldrht.u32 q0, [r2]
78 ; CHECK-NEXT: vstrwt.32 q0, [r0]
81 %0 = load <4 x i32>, ptr %mask, align 4
82 %1 = icmp sgt <4 x i32> %0, zeroinitializer
83 %2 = call <4 x i16> @llvm.masked.load.v4i16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x i16> undef)
84 %3 = zext <4 x i16> %2 to <4 x i32>
85 call void @llvm.masked.store.v4i32.p0(<4 x i32> %3, ptr %dest, i32 4, <4 x i1> %1)
89 define void @foo_sext_v2i64_v2i32(ptr %dest, ptr %mask, ptr %src) {
90 ; CHECK-LE-LABEL: foo_sext_v2i64_v2i32:
91 ; CHECK-LE: @ %bb.0: @ %entry
92 ; CHECK-LE-NEXT: .save {r4, r5, r7, lr}
93 ; CHECK-LE-NEXT: push {r4, r5, r7, lr}
94 ; CHECK-LE-NEXT: .pad #4
95 ; CHECK-LE-NEXT: sub sp, #4
96 ; CHECK-LE-NEXT: ldrd r12, lr, [r1]
97 ; CHECK-LE-NEXT: movs r1, #0
98 ; CHECK-LE-NEXT: @ implicit-def: $q1
99 ; CHECK-LE-NEXT: rsbs.w r3, r12, #0
100 ; CHECK-LE-NEXT: vmov q0[2], q0[0], r12, lr
101 ; CHECK-LE-NEXT: sbcs.w r3, r1, r12, asr #31
102 ; CHECK-LE-NEXT: csetm r3, lt
103 ; CHECK-LE-NEXT: rsbs.w r4, lr, #0
104 ; CHECK-LE-NEXT: sbcs.w r4, r1, lr, asr #31
105 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
106 ; CHECK-LE-NEXT: csetm r3, lt
107 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
108 ; CHECK-LE-NEXT: lsls r3, r1, #31
109 ; CHECK-LE-NEXT: itt ne
110 ; CHECK-LE-NEXT: ldrne r3, [r2]
111 ; CHECK-LE-NEXT: vmovne.32 q1[0], r3
112 ; CHECK-LE-NEXT: lsls r1, r1, #30
113 ; CHECK-LE-NEXT: itt mi
114 ; CHECK-LE-NEXT: ldrmi r1, [r2, #4]
115 ; CHECK-LE-NEXT: vmovmi.32 q1[2], r1
116 ; CHECK-LE-NEXT: vmov r2, s6
117 ; CHECK-LE-NEXT: movs r1, #0
118 ; CHECK-LE-NEXT: vmov r3, s0
119 ; CHECK-LE-NEXT: vmov r4, s4
120 ; CHECK-LE-NEXT: vmov q1[2], q1[0], r4, r2
121 ; CHECK-LE-NEXT: rsbs r5, r3, #0
122 ; CHECK-LE-NEXT: asr.w r12, r2, #31
123 ; CHECK-LE-NEXT: sbcs.w r2, r1, r3, asr #31
124 ; CHECK-LE-NEXT: vmov r3, s2
125 ; CHECK-LE-NEXT: csetm r2, lt
126 ; CHECK-LE-NEXT: asr.w lr, r4, #31
127 ; CHECK-LE-NEXT: vmov q1[3], q1[1], lr, r12
128 ; CHECK-LE-NEXT: rsbs r5, r3, #0
129 ; CHECK-LE-NEXT: sbcs.w r3, r1, r3, asr #31
130 ; CHECK-LE-NEXT: bfi r1, r2, #0, #1
131 ; CHECK-LE-NEXT: csetm r2, lt
132 ; CHECK-LE-NEXT: bfi r1, r2, #1, #1
133 ; CHECK-LE-NEXT: lsls r2, r1, #31
134 ; CHECK-LE-NEXT: it ne
135 ; CHECK-LE-NEXT: vstrne d2, [r0]
136 ; CHECK-LE-NEXT: lsls r1, r1, #30
137 ; CHECK-LE-NEXT: it mi
138 ; CHECK-LE-NEXT: vstrmi d3, [r0, #8]
139 ; CHECK-LE-NEXT: add sp, #4
140 ; CHECK-LE-NEXT: pop {r4, r5, r7, pc}
142 ; CHECK-BE-LABEL: foo_sext_v2i64_v2i32:
143 ; CHECK-BE: @ %bb.0: @ %entry
144 ; CHECK-BE-NEXT: .save {r4, r5, r7, lr}
145 ; CHECK-BE-NEXT: push {r4, r5, r7, lr}
146 ; CHECK-BE-NEXT: .pad #4
147 ; CHECK-BE-NEXT: sub sp, #4
148 ; CHECK-BE-NEXT: ldrd r12, lr, [r1]
149 ; CHECK-BE-NEXT: rsbs.w r3, lr, #0
150 ; CHECK-BE-NEXT: mov.w r1, #0
151 ; CHECK-BE-NEXT: sbcs.w r3, r1, lr, asr #31
152 ; CHECK-BE-NEXT: vmov q0[3], q0[1], r12, lr
153 ; CHECK-BE-NEXT: csetm lr, lt
154 ; CHECK-BE-NEXT: rsbs.w r3, r12, #0
155 ; CHECK-BE-NEXT: @ implicit-def: $q2
156 ; CHECK-BE-NEXT: sbcs.w r3, r1, r12, asr #31
157 ; CHECK-BE-NEXT: bfi r1, lr, #0, #1
158 ; CHECK-BE-NEXT: csetm r3, lt
159 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
160 ; CHECK-BE-NEXT: lsls r3, r1, #30
161 ; CHECK-BE-NEXT: bpl .LBB5_2
162 ; CHECK-BE-NEXT: @ %bb.1: @ %cond.load
163 ; CHECK-BE-NEXT: ldr r3, [r2]
164 ; CHECK-BE-NEXT: vmov.32 q1[1], r3
165 ; CHECK-BE-NEXT: vrev64.32 q2, q1
166 ; CHECK-BE-NEXT: .LBB5_2: @ %else
167 ; CHECK-BE-NEXT: vrev64.32 q1, q0
168 ; CHECK-BE-NEXT: lsls r1, r1, #31
169 ; CHECK-BE-NEXT: beq .LBB5_4
170 ; CHECK-BE-NEXT: @ %bb.3: @ %cond.load1
171 ; CHECK-BE-NEXT: ldr r1, [r2, #4]
172 ; CHECK-BE-NEXT: vrev64.32 q0, q2
173 ; CHECK-BE-NEXT: vmov.32 q0[3], r1
174 ; CHECK-BE-NEXT: vrev64.32 q2, q0
175 ; CHECK-BE-NEXT: .LBB5_4: @ %else2
176 ; CHECK-BE-NEXT: vrev64.32 q0, q2
177 ; CHECK-BE-NEXT: vrev64.32 q2, q1
178 ; CHECK-BE-NEXT: vmov r2, s3
179 ; CHECK-BE-NEXT: movs r1, #0
180 ; CHECK-BE-NEXT: vmov r3, s1
181 ; CHECK-BE-NEXT: vmov r4, s11
182 ; CHECK-BE-NEXT: asr.w r12, r2, #31
183 ; CHECK-BE-NEXT: asr.w lr, r3, #31
184 ; CHECK-BE-NEXT: rsbs r5, r4, #0
185 ; CHECK-BE-NEXT: vmov q1[2], q1[0], lr, r12
186 ; CHECK-BE-NEXT: sbcs.w r4, r1, r4, asr #31
187 ; CHECK-BE-NEXT: vmov q1[3], q1[1], r3, r2
188 ; CHECK-BE-NEXT: vmov r3, s9
189 ; CHECK-BE-NEXT: csetm r2, lt
190 ; CHECK-BE-NEXT: vrev64.32 q0, q1
191 ; CHECK-BE-NEXT: rsbs r5, r3, #0
192 ; CHECK-BE-NEXT: sbcs.w r3, r1, r3, asr #31
193 ; CHECK-BE-NEXT: bfi r1, r2, #0, #1
194 ; CHECK-BE-NEXT: csetm r2, lt
195 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
196 ; CHECK-BE-NEXT: lsls r2, r1, #30
197 ; CHECK-BE-NEXT: it mi
198 ; CHECK-BE-NEXT: vstrmi d0, [r0]
199 ; CHECK-BE-NEXT: lsls r1, r1, #31
200 ; CHECK-BE-NEXT: it ne
201 ; CHECK-BE-NEXT: vstrne d1, [r0, #8]
202 ; CHECK-BE-NEXT: add sp, #4
203 ; CHECK-BE-NEXT: pop {r4, r5, r7, pc}
205 %0 = load <2 x i32>, ptr %mask, align 4
206 %1 = icmp sgt <2 x i32> %0, zeroinitializer
207 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 4, <2 x i1> %1, <2 x i32> undef)
208 %3 = sext <2 x i32> %2 to <2 x i64>
209 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 8, <2 x i1> %1)
213 define void @foo_sext_v2i64_v2i32_unaligned(ptr %dest, ptr %mask, ptr %src) {
214 ; CHECK-LE-LABEL: foo_sext_v2i64_v2i32_unaligned:
215 ; CHECK-LE: @ %bb.0: @ %entry
216 ; CHECK-LE-NEXT: .save {r4, r5, r7, lr}
217 ; CHECK-LE-NEXT: push {r4, r5, r7, lr}
218 ; CHECK-LE-NEXT: .pad #4
219 ; CHECK-LE-NEXT: sub sp, #4
220 ; CHECK-LE-NEXT: ldrd r12, lr, [r1]
221 ; CHECK-LE-NEXT: movs r1, #0
222 ; CHECK-LE-NEXT: @ implicit-def: $q0
223 ; CHECK-LE-NEXT: rsbs.w r3, r12, #0
224 ; CHECK-LE-NEXT: vmov q1[2], q1[0], r12, lr
225 ; CHECK-LE-NEXT: sbcs.w r3, r1, r12, asr #31
226 ; CHECK-LE-NEXT: csetm r3, lt
227 ; CHECK-LE-NEXT: rsbs.w r4, lr, #0
228 ; CHECK-LE-NEXT: sbcs.w r4, r1, lr, asr #31
229 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
230 ; CHECK-LE-NEXT: csetm r3, lt
231 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
232 ; CHECK-LE-NEXT: lsls r3, r1, #31
233 ; CHECK-LE-NEXT: itt ne
234 ; CHECK-LE-NEXT: ldrne r3, [r2]
235 ; CHECK-LE-NEXT: vmovne.32 q0[0], r3
236 ; CHECK-LE-NEXT: lsls r1, r1, #30
237 ; CHECK-LE-NEXT: itt mi
238 ; CHECK-LE-NEXT: ldrmi r1, [r2, #4]
239 ; CHECK-LE-NEXT: vmovmi.32 q0[2], r1
240 ; CHECK-LE-NEXT: vmov r2, s2
241 ; CHECK-LE-NEXT: movs r1, #0
242 ; CHECK-LE-NEXT: vmov r3, s4
243 ; CHECK-LE-NEXT: vmov r4, s0
244 ; CHECK-LE-NEXT: vmov q0[2], q0[0], r4, r2
245 ; CHECK-LE-NEXT: rsbs r5, r3, #0
246 ; CHECK-LE-NEXT: asr.w r12, r2, #31
247 ; CHECK-LE-NEXT: sbcs.w r2, r1, r3, asr #31
248 ; CHECK-LE-NEXT: vmov r3, s6
249 ; CHECK-LE-NEXT: csetm r2, lt
250 ; CHECK-LE-NEXT: asr.w lr, r4, #31
251 ; CHECK-LE-NEXT: vmov q0[3], q0[1], lr, r12
252 ; CHECK-LE-NEXT: rsbs r5, r3, #0
253 ; CHECK-LE-NEXT: sbcs.w r3, r1, r3, asr #31
254 ; CHECK-LE-NEXT: bfi r1, r2, #0, #1
255 ; CHECK-LE-NEXT: csetm r2, lt
256 ; CHECK-LE-NEXT: bfi r1, r2, #1, #1
257 ; CHECK-LE-NEXT: lsls r2, r1, #31
258 ; CHECK-LE-NEXT: itt ne
259 ; CHECK-LE-NEXT: vmovne r2, r3, d0
260 ; CHECK-LE-NEXT: strdne r2, r3, [r0]
261 ; CHECK-LE-NEXT: lsls r1, r1, #30
262 ; CHECK-LE-NEXT: itt mi
263 ; CHECK-LE-NEXT: vmovmi r1, r2, d1
264 ; CHECK-LE-NEXT: strdmi r1, r2, [r0, #8]
265 ; CHECK-LE-NEXT: add sp, #4
266 ; CHECK-LE-NEXT: pop {r4, r5, r7, pc}
268 ; CHECK-BE-LABEL: foo_sext_v2i64_v2i32_unaligned:
269 ; CHECK-BE: @ %bb.0: @ %entry
270 ; CHECK-BE-NEXT: .save {r4, r5, r7, lr}
271 ; CHECK-BE-NEXT: push {r4, r5, r7, lr}
272 ; CHECK-BE-NEXT: .pad #4
273 ; CHECK-BE-NEXT: sub sp, #4
274 ; CHECK-BE-NEXT: ldrd r12, lr, [r1]
275 ; CHECK-BE-NEXT: rsbs.w r3, lr, #0
276 ; CHECK-BE-NEXT: mov.w r1, #0
277 ; CHECK-BE-NEXT: sbcs.w r3, r1, lr, asr #31
278 ; CHECK-BE-NEXT: vmov q0[3], q0[1], r12, lr
279 ; CHECK-BE-NEXT: csetm lr, lt
280 ; CHECK-BE-NEXT: rsbs.w r3, r12, #0
281 ; CHECK-BE-NEXT: @ implicit-def: $q2
282 ; CHECK-BE-NEXT: sbcs.w r3, r1, r12, asr #31
283 ; CHECK-BE-NEXT: bfi r1, lr, #0, #1
284 ; CHECK-BE-NEXT: csetm r3, lt
285 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
286 ; CHECK-BE-NEXT: lsls r3, r1, #30
287 ; CHECK-BE-NEXT: bpl .LBB6_2
288 ; CHECK-BE-NEXT: @ %bb.1: @ %cond.load
289 ; CHECK-BE-NEXT: ldr r3, [r2]
290 ; CHECK-BE-NEXT: vmov.32 q1[1], r3
291 ; CHECK-BE-NEXT: vrev64.32 q2, q1
292 ; CHECK-BE-NEXT: .LBB6_2: @ %else
293 ; CHECK-BE-NEXT: vrev64.32 q1, q0
294 ; CHECK-BE-NEXT: lsls r1, r1, #31
295 ; CHECK-BE-NEXT: beq .LBB6_4
296 ; CHECK-BE-NEXT: @ %bb.3: @ %cond.load1
297 ; CHECK-BE-NEXT: ldr r1, [r2, #4]
298 ; CHECK-BE-NEXT: vrev64.32 q0, q2
299 ; CHECK-BE-NEXT: vmov.32 q0[3], r1
300 ; CHECK-BE-NEXT: vrev64.32 q2, q0
301 ; CHECK-BE-NEXT: .LBB6_4: @ %else2
302 ; CHECK-BE-NEXT: vrev64.32 q0, q2
303 ; CHECK-BE-NEXT: vrev64.32 q2, q1
304 ; CHECK-BE-NEXT: vmov r2, s3
305 ; CHECK-BE-NEXT: movs r1, #0
306 ; CHECK-BE-NEXT: vmov r3, s1
307 ; CHECK-BE-NEXT: vmov r4, s11
308 ; CHECK-BE-NEXT: asr.w r12, r2, #31
309 ; CHECK-BE-NEXT: asr.w lr, r3, #31
310 ; CHECK-BE-NEXT: rsbs r5, r4, #0
311 ; CHECK-BE-NEXT: vmov q1[2], q1[0], lr, r12
312 ; CHECK-BE-NEXT: sbcs.w r4, r1, r4, asr #31
313 ; CHECK-BE-NEXT: vmov q1[3], q1[1], r3, r2
314 ; CHECK-BE-NEXT: vmov r3, s9
315 ; CHECK-BE-NEXT: csetm r2, lt
316 ; CHECK-BE-NEXT: vrev64.32 q0, q1
317 ; CHECK-BE-NEXT: rsbs r5, r3, #0
318 ; CHECK-BE-NEXT: sbcs.w r3, r1, r3, asr #31
319 ; CHECK-BE-NEXT: bfi r1, r2, #0, #1
320 ; CHECK-BE-NEXT: csetm r2, lt
321 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
322 ; CHECK-BE-NEXT: lsls r2, r1, #30
323 ; CHECK-BE-NEXT: itt mi
324 ; CHECK-BE-NEXT: vmovmi r2, r3, d0
325 ; CHECK-BE-NEXT: strdmi r3, r2, [r0]
326 ; CHECK-BE-NEXT: lsls r1, r1, #31
327 ; CHECK-BE-NEXT: itt ne
328 ; CHECK-BE-NEXT: vmovne r1, r2, d1
329 ; CHECK-BE-NEXT: strdne r2, r1, [r0, #8]
330 ; CHECK-BE-NEXT: add sp, #4
331 ; CHECK-BE-NEXT: pop {r4, r5, r7, pc}
333 %0 = load <2 x i32>, ptr %mask, align 4
334 %1 = icmp sgt <2 x i32> %0, zeroinitializer
335 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 2, <2 x i1> %1, <2 x i32> undef)
336 %3 = sext <2 x i32> %2 to <2 x i64>
337 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 4, <2 x i1> %1)
341 define void @foo_zext_v2i64_v2i32(ptr %dest, ptr %mask, ptr %src) {
342 ; CHECK-LE-LABEL: foo_zext_v2i64_v2i32:
343 ; CHECK-LE: @ %bb.0: @ %entry
344 ; CHECK-LE-NEXT: .save {r4, lr}
345 ; CHECK-LE-NEXT: push {r4, lr}
346 ; CHECK-LE-NEXT: .pad #4
347 ; CHECK-LE-NEXT: sub sp, #4
348 ; CHECK-LE-NEXT: ldrd r12, lr, [r1]
349 ; CHECK-LE-NEXT: movs r1, #0
350 ; CHECK-LE-NEXT: @ implicit-def: $q0
351 ; CHECK-LE-NEXT: vmov.i64 q2, #0xffffffff
352 ; CHECK-LE-NEXT: rsbs.w r3, r12, #0
353 ; CHECK-LE-NEXT: vmov q1[2], q1[0], r12, lr
354 ; CHECK-LE-NEXT: sbcs.w r3, r1, r12, asr #31
355 ; CHECK-LE-NEXT: csetm r3, lt
356 ; CHECK-LE-NEXT: rsbs.w r4, lr, #0
357 ; CHECK-LE-NEXT: sbcs.w r4, r1, lr, asr #31
358 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
359 ; CHECK-LE-NEXT: csetm r3, lt
360 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
361 ; CHECK-LE-NEXT: lsls r3, r1, #31
362 ; CHECK-LE-NEXT: itt ne
363 ; CHECK-LE-NEXT: ldrne r3, [r2]
364 ; CHECK-LE-NEXT: vmovne.32 q0[0], r3
365 ; CHECK-LE-NEXT: lsls r1, r1, #30
366 ; CHECK-LE-NEXT: itt mi
367 ; CHECK-LE-NEXT: ldrmi r1, [r2, #4]
368 ; CHECK-LE-NEXT: vmovmi.32 q0[2], r1
369 ; CHECK-LE-NEXT: vmov r2, s4
370 ; CHECK-LE-NEXT: movs r1, #0
371 ; CHECK-LE-NEXT: vand q0, q0, q2
372 ; CHECK-LE-NEXT: rsbs r3, r2, #0
373 ; CHECK-LE-NEXT: vmov r3, s6
374 ; CHECK-LE-NEXT: sbcs.w r2, r1, r2, asr #31
375 ; CHECK-LE-NEXT: csetm r2, lt
376 ; CHECK-LE-NEXT: rsbs r4, r3, #0
377 ; CHECK-LE-NEXT: sbcs.w r3, r1, r3, asr #31
378 ; CHECK-LE-NEXT: bfi r1, r2, #0, #1
379 ; CHECK-LE-NEXT: csetm r2, lt
380 ; CHECK-LE-NEXT: bfi r1, r2, #1, #1
381 ; CHECK-LE-NEXT: lsls r2, r1, #31
382 ; CHECK-LE-NEXT: it ne
383 ; CHECK-LE-NEXT: vstrne d0, [r0]
384 ; CHECK-LE-NEXT: lsls r1, r1, #30
385 ; CHECK-LE-NEXT: it mi
386 ; CHECK-LE-NEXT: vstrmi d1, [r0, #8]
387 ; CHECK-LE-NEXT: add sp, #4
388 ; CHECK-LE-NEXT: pop {r4, pc}
390 ; CHECK-BE-LABEL: foo_zext_v2i64_v2i32:
391 ; CHECK-BE: @ %bb.0: @ %entry
392 ; CHECK-BE-NEXT: .save {r7, lr}
393 ; CHECK-BE-NEXT: push {r7, lr}
394 ; CHECK-BE-NEXT: .pad #4
395 ; CHECK-BE-NEXT: sub sp, #4
396 ; CHECK-BE-NEXT: ldrd r12, lr, [r1]
397 ; CHECK-BE-NEXT: rsbs.w r3, lr, #0
398 ; CHECK-BE-NEXT: mov.w r1, #0
399 ; CHECK-BE-NEXT: sbcs.w r3, r1, lr, asr #31
400 ; CHECK-BE-NEXT: vmov q1[3], q1[1], r12, lr
401 ; CHECK-BE-NEXT: csetm lr, lt
402 ; CHECK-BE-NEXT: rsbs.w r3, r12, #0
403 ; CHECK-BE-NEXT: @ implicit-def: $q0
404 ; CHECK-BE-NEXT: sbcs.w r3, r1, r12, asr #31
405 ; CHECK-BE-NEXT: bfi r1, lr, #0, #1
406 ; CHECK-BE-NEXT: csetm r3, lt
407 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
408 ; CHECK-BE-NEXT: lsls r3, r1, #30
409 ; CHECK-BE-NEXT: bpl .LBB7_2
410 ; CHECK-BE-NEXT: @ %bb.1: @ %cond.load
411 ; CHECK-BE-NEXT: ldr r3, [r2]
412 ; CHECK-BE-NEXT: vmov.32 q2[1], r3
413 ; CHECK-BE-NEXT: vrev64.32 q0, q2
414 ; CHECK-BE-NEXT: .LBB7_2: @ %else
415 ; CHECK-BE-NEXT: vrev64.32 q2, q1
416 ; CHECK-BE-NEXT: lsls r1, r1, #31
417 ; CHECK-BE-NEXT: beq .LBB7_4
418 ; CHECK-BE-NEXT: @ %bb.3: @ %cond.load1
419 ; CHECK-BE-NEXT: ldr r1, [r2, #4]
420 ; CHECK-BE-NEXT: vrev64.32 q1, q0
421 ; CHECK-BE-NEXT: vmov.32 q1[3], r1
422 ; CHECK-BE-NEXT: vrev64.32 q0, q1
423 ; CHECK-BE-NEXT: .LBB7_4: @ %else2
424 ; CHECK-BE-NEXT: vmov.i64 q1, #0xffffffff00000000
425 ; CHECK-BE-NEXT: movs r1, #0
426 ; CHECK-BE-NEXT: vrev64.32 q3, q1
427 ; CHECK-BE-NEXT: vrev64.32 q1, q2
428 ; CHECK-BE-NEXT: vmov r2, s7
429 ; CHECK-BE-NEXT: vand q0, q0, q3
430 ; CHECK-BE-NEXT: rsbs r3, r2, #0
431 ; CHECK-BE-NEXT: vmov r3, s5
432 ; CHECK-BE-NEXT: sbcs.w r2, r1, r2, asr #31
433 ; CHECK-BE-NEXT: csetm r12, lt
434 ; CHECK-BE-NEXT: rsbs r2, r3, #0
435 ; CHECK-BE-NEXT: sbcs.w r2, r1, r3, asr #31
436 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
437 ; CHECK-BE-NEXT: csetm r2, lt
438 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
439 ; CHECK-BE-NEXT: lsls r2, r1, #30
440 ; CHECK-BE-NEXT: it mi
441 ; CHECK-BE-NEXT: vstrmi d0, [r0]
442 ; CHECK-BE-NEXT: lsls r1, r1, #31
443 ; CHECK-BE-NEXT: it ne
444 ; CHECK-BE-NEXT: vstrne d1, [r0, #8]
445 ; CHECK-BE-NEXT: add sp, #4
446 ; CHECK-BE-NEXT: pop {r7, pc}
448 %0 = load <2 x i32>, ptr %mask, align 4
449 %1 = icmp sgt <2 x i32> %0, zeroinitializer
450 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 4, <2 x i1> %1, <2 x i32> undef)
451 %3 = zext <2 x i32> %2 to <2 x i64>
452 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 8, <2 x i1> %1)
456 define void @foo_zext_v2i64_v2i32_unaligned(ptr %dest, ptr %mask, ptr %src) {
457 ; CHECK-LE-LABEL: foo_zext_v2i64_v2i32_unaligned:
458 ; CHECK-LE: @ %bb.0: @ %entry
459 ; CHECK-LE-NEXT: .save {r4, lr}
460 ; CHECK-LE-NEXT: push {r4, lr}
461 ; CHECK-LE-NEXT: .pad #4
462 ; CHECK-LE-NEXT: sub sp, #4
463 ; CHECK-LE-NEXT: ldrd r12, lr, [r1]
464 ; CHECK-LE-NEXT: movs r1, #0
465 ; CHECK-LE-NEXT: @ implicit-def: $q0
466 ; CHECK-LE-NEXT: vmov.i64 q2, #0xffffffff
467 ; CHECK-LE-NEXT: rsbs.w r3, r12, #0
468 ; CHECK-LE-NEXT: vmov q1[2], q1[0], r12, lr
469 ; CHECK-LE-NEXT: sbcs.w r3, r1, r12, asr #31
470 ; CHECK-LE-NEXT: csetm r3, lt
471 ; CHECK-LE-NEXT: rsbs.w r4, lr, #0
472 ; CHECK-LE-NEXT: sbcs.w r4, r1, lr, asr #31
473 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
474 ; CHECK-LE-NEXT: csetm r3, lt
475 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
476 ; CHECK-LE-NEXT: lsls r3, r1, #31
477 ; CHECK-LE-NEXT: itt ne
478 ; CHECK-LE-NEXT: ldrne r3, [r2]
479 ; CHECK-LE-NEXT: vmovne.32 q0[0], r3
480 ; CHECK-LE-NEXT: lsls r1, r1, #30
481 ; CHECK-LE-NEXT: itt mi
482 ; CHECK-LE-NEXT: ldrmi r1, [r2, #4]
483 ; CHECK-LE-NEXT: vmovmi.32 q0[2], r1
484 ; CHECK-LE-NEXT: vmov r2, s4
485 ; CHECK-LE-NEXT: movs r1, #0
486 ; CHECK-LE-NEXT: vand q0, q0, q2
487 ; CHECK-LE-NEXT: rsbs r3, r2, #0
488 ; CHECK-LE-NEXT: vmov r3, s6
489 ; CHECK-LE-NEXT: sbcs.w r2, r1, r2, asr #31
490 ; CHECK-LE-NEXT: csetm r2, lt
491 ; CHECK-LE-NEXT: rsbs r4, r3, #0
492 ; CHECK-LE-NEXT: sbcs.w r3, r1, r3, asr #31
493 ; CHECK-LE-NEXT: bfi r1, r2, #0, #1
494 ; CHECK-LE-NEXT: csetm r2, lt
495 ; CHECK-LE-NEXT: bfi r1, r2, #1, #1
496 ; CHECK-LE-NEXT: lsls r2, r1, #31
497 ; CHECK-LE-NEXT: itt ne
498 ; CHECK-LE-NEXT: vmovne r2, r3, d0
499 ; CHECK-LE-NEXT: strdne r2, r3, [r0]
500 ; CHECK-LE-NEXT: lsls r1, r1, #30
501 ; CHECK-LE-NEXT: itt mi
502 ; CHECK-LE-NEXT: vmovmi r1, r2, d1
503 ; CHECK-LE-NEXT: strdmi r1, r2, [r0, #8]
504 ; CHECK-LE-NEXT: add sp, #4
505 ; CHECK-LE-NEXT: pop {r4, pc}
507 ; CHECK-BE-LABEL: foo_zext_v2i64_v2i32_unaligned:
508 ; CHECK-BE: @ %bb.0: @ %entry
509 ; CHECK-BE-NEXT: .save {r7, lr}
510 ; CHECK-BE-NEXT: push {r7, lr}
511 ; CHECK-BE-NEXT: .pad #4
512 ; CHECK-BE-NEXT: sub sp, #4
513 ; CHECK-BE-NEXT: ldrd r12, lr, [r1]
514 ; CHECK-BE-NEXT: rsbs.w r3, lr, #0
515 ; CHECK-BE-NEXT: mov.w r1, #0
516 ; CHECK-BE-NEXT: sbcs.w r3, r1, lr, asr #31
517 ; CHECK-BE-NEXT: vmov q1[3], q1[1], r12, lr
518 ; CHECK-BE-NEXT: csetm lr, lt
519 ; CHECK-BE-NEXT: rsbs.w r3, r12, #0
520 ; CHECK-BE-NEXT: @ implicit-def: $q0
521 ; CHECK-BE-NEXT: sbcs.w r3, r1, r12, asr #31
522 ; CHECK-BE-NEXT: bfi r1, lr, #0, #1
523 ; CHECK-BE-NEXT: csetm r3, lt
524 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
525 ; CHECK-BE-NEXT: lsls r3, r1, #30
526 ; CHECK-BE-NEXT: bpl .LBB8_2
527 ; CHECK-BE-NEXT: @ %bb.1: @ %cond.load
528 ; CHECK-BE-NEXT: ldr r3, [r2]
529 ; CHECK-BE-NEXT: vmov.32 q2[1], r3
530 ; CHECK-BE-NEXT: vrev64.32 q0, q2
531 ; CHECK-BE-NEXT: .LBB8_2: @ %else
532 ; CHECK-BE-NEXT: vrev64.32 q2, q1
533 ; CHECK-BE-NEXT: lsls r1, r1, #31
534 ; CHECK-BE-NEXT: beq .LBB8_4
535 ; CHECK-BE-NEXT: @ %bb.3: @ %cond.load1
536 ; CHECK-BE-NEXT: ldr r1, [r2, #4]
537 ; CHECK-BE-NEXT: vrev64.32 q1, q0
538 ; CHECK-BE-NEXT: vmov.32 q1[3], r1
539 ; CHECK-BE-NEXT: vrev64.32 q0, q1
540 ; CHECK-BE-NEXT: .LBB8_4: @ %else2
541 ; CHECK-BE-NEXT: vmov.i64 q1, #0xffffffff00000000
542 ; CHECK-BE-NEXT: movs r1, #0
543 ; CHECK-BE-NEXT: vrev64.32 q3, q1
544 ; CHECK-BE-NEXT: vrev64.32 q1, q2
545 ; CHECK-BE-NEXT: vmov r2, s7
546 ; CHECK-BE-NEXT: vand q0, q0, q3
547 ; CHECK-BE-NEXT: rsbs r3, r2, #0
548 ; CHECK-BE-NEXT: vmov r3, s5
549 ; CHECK-BE-NEXT: sbcs.w r2, r1, r2, asr #31
550 ; CHECK-BE-NEXT: csetm r12, lt
551 ; CHECK-BE-NEXT: rsbs r2, r3, #0
552 ; CHECK-BE-NEXT: sbcs.w r2, r1, r3, asr #31
553 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
554 ; CHECK-BE-NEXT: csetm r2, lt
555 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
556 ; CHECK-BE-NEXT: lsls r2, r1, #30
557 ; CHECK-BE-NEXT: itt mi
558 ; CHECK-BE-NEXT: vmovmi r2, r3, d0
559 ; CHECK-BE-NEXT: strdmi r3, r2, [r0]
560 ; CHECK-BE-NEXT: lsls r1, r1, #31
561 ; CHECK-BE-NEXT: itt ne
562 ; CHECK-BE-NEXT: vmovne r1, r2, d1
563 ; CHECK-BE-NEXT: strdne r2, r1, [r0, #8]
564 ; CHECK-BE-NEXT: add sp, #4
565 ; CHECK-BE-NEXT: pop {r7, pc}
567 %0 = load <2 x i32>, ptr %mask, align 4
568 %1 = icmp sgt <2 x i32> %0, zeroinitializer
569 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 2, <2 x i1> %1, <2 x i32> undef)
570 %3 = zext <2 x i32> %2 to <2 x i64>
571 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 4, <2 x i1> %1)
575 define void @foo_v8i16_v8i16(ptr %dest, ptr %mask, ptr %src) {
576 ; CHECK-LABEL: foo_v8i16_v8i16:
577 ; CHECK: @ %bb.0: @ %entry
578 ; CHECK-NEXT: vldrh.u16 q0, [r1]
579 ; CHECK-NEXT: vptt.s16 gt, q0, zr
580 ; CHECK-NEXT: vldrht.u16 q0, [r2]
581 ; CHECK-NEXT: vstrht.16 q0, [r0]
584 %0 = load <8 x i16>, ptr %mask, align 2
585 %1 = icmp sgt <8 x i16> %0, zeroinitializer
586 %2 = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x i16> undef)
587 call void @llvm.masked.store.v8i16.p0(<8 x i16> %2, ptr %dest, i32 2, <8 x i1> %1)
591 define void @foo_sext_v8i16_v8i8(ptr %dest, ptr %mask, ptr %src) {
592 ; CHECK-LABEL: foo_sext_v8i16_v8i8:
593 ; CHECK: @ %bb.0: @ %entry
594 ; CHECK-NEXT: vldrh.u16 q0, [r1]
595 ; CHECK-NEXT: vptt.s16 gt, q0, zr
596 ; CHECK-NEXT: vldrbt.s16 q0, [r2]
597 ; CHECK-NEXT: vstrht.16 q0, [r0]
600 %0 = load <8 x i16>, ptr %mask, align 2
601 %1 = icmp sgt <8 x i16> %0, zeroinitializer
602 %2 = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %src, i32 1, <8 x i1> %1, <8 x i8> undef)
603 %3 = sext <8 x i8> %2 to <8 x i16>
604 call void @llvm.masked.store.v8i16.p0(<8 x i16> %3, ptr %dest, i32 2, <8 x i1> %1)
608 define void @foo_zext_v8i16_v8i8(ptr %dest, ptr %mask, ptr %src) {
609 ; CHECK-LABEL: foo_zext_v8i16_v8i8:
610 ; CHECK: @ %bb.0: @ %entry
611 ; CHECK-NEXT: vldrh.u16 q0, [r1]
612 ; CHECK-NEXT: vptt.s16 gt, q0, zr
613 ; CHECK-NEXT: vldrbt.u16 q0, [r2]
614 ; CHECK-NEXT: vstrht.16 q0, [r0]
617 %0 = load <8 x i16>, ptr %mask, align 2
618 %1 = icmp sgt <8 x i16> %0, zeroinitializer
619 %2 = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %src, i32 1, <8 x i1> %1, <8 x i8> undef)
620 %3 = zext <8 x i8> %2 to <8 x i16>
621 call void @llvm.masked.store.v8i16.p0(<8 x i16> %3, ptr %dest, i32 2, <8 x i1> %1)
625 define void @foo_v16i8_v16i8(ptr %dest, ptr %mask, ptr %src) {
626 ; CHECK-LABEL: foo_v16i8_v16i8:
627 ; CHECK: @ %bb.0: @ %entry
628 ; CHECK-NEXT: vldrb.u8 q0, [r1]
629 ; CHECK-NEXT: vptt.s8 gt, q0, zr
630 ; CHECK-NEXT: vldrbt.u8 q0, [r2]
631 ; CHECK-NEXT: vstrbt.8 q0, [r0]
634 %0 = load <16 x i8>, ptr %mask, align 1
635 %1 = icmp sgt <16 x i8> %0, zeroinitializer
636 %2 = call <16 x i8> @llvm.masked.load.v16i8.p0(ptr %src, i32 1, <16 x i1> %1, <16 x i8> undef)
637 call void @llvm.masked.store.v16i8.p0(<16 x i8> %2, ptr %dest, i32 1, <16 x i1> %1)
641 define void @foo_trunc_v8i8_v8i16(ptr %dest, ptr %mask, ptr %src) {
642 ; CHECK-LABEL: foo_trunc_v8i8_v8i16:
643 ; CHECK: @ %bb.0: @ %entry
644 ; CHECK-NEXT: vldrh.u16 q0, [r1]
645 ; CHECK-NEXT: vptt.s16 gt, q0, zr
646 ; CHECK-NEXT: vldrht.u16 q0, [r2]
647 ; CHECK-NEXT: vstrbt.16 q0, [r0]
650 %0 = load <8 x i16>, ptr %mask, align 2
651 %1 = icmp sgt <8 x i16> %0, zeroinitializer
652 %2 = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x i16> undef)
653 %3 = trunc <8 x i16> %2 to <8 x i8>
654 call void @llvm.masked.store.v8i8.p0(<8 x i8> %3, ptr %dest, i32 1, <8 x i1> %1)
658 define void @foo_trunc_v4i8_v4i32(ptr %dest, ptr %mask, ptr %src) {
659 ; CHECK-LABEL: foo_trunc_v4i8_v4i32:
660 ; CHECK: @ %bb.0: @ %entry
661 ; CHECK-NEXT: vldrw.u32 q0, [r1]
662 ; CHECK-NEXT: vptt.s32 gt, q0, zr
663 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
664 ; CHECK-NEXT: vstrbt.32 q0, [r0]
667 %0 = load <4 x i32>, ptr %mask, align 4
668 %1 = icmp sgt <4 x i32> %0, zeroinitializer
669 %2 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x i32> undef)
670 %3 = trunc <4 x i32> %2 to <4 x i8>
671 call void @llvm.masked.store.v4i8.p0(<4 x i8> %3, ptr %dest, i32 1, <4 x i1> %1)
675 define void @foo_trunc_v4i16_v4i32(ptr %dest, ptr %mask, ptr %src) {
676 ; CHECK-LABEL: foo_trunc_v4i16_v4i32:
677 ; CHECK: @ %bb.0: @ %entry
678 ; CHECK-NEXT: vldrw.u32 q0, [r1]
679 ; CHECK-NEXT: vptt.s32 gt, q0, zr
680 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
681 ; CHECK-NEXT: vstrht.32 q0, [r0]
684 %0 = load <4 x i32>, ptr %mask, align 4
685 %1 = icmp sgt <4 x i32> %0, zeroinitializer
686 %2 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x i32> undef)
687 %3 = trunc <4 x i32> %2 to <4 x i16>
688 call void @llvm.masked.store.v4i16.p0(<4 x i16> %3, ptr %dest, i32 2, <4 x i1> %1)
692 define void @foo_v4f32_v4f32(ptr %dest, ptr %mask, ptr %src) {
693 ; CHECK-LABEL: foo_v4f32_v4f32:
694 ; CHECK: @ %bb.0: @ %entry
695 ; CHECK-NEXT: vldrw.u32 q0, [r1]
696 ; CHECK-NEXT: vptt.s32 gt, q0, zr
697 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
698 ; CHECK-NEXT: vstrwt.32 q0, [r0]
701 %0 = load <4 x i32>, ptr %mask, align 4
702 %1 = icmp sgt <4 x i32> %0, zeroinitializer
703 %2 = call <4 x float> @llvm.masked.load.v4f32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x float> undef)
704 call void @llvm.masked.store.v4f32.p0(<4 x float> %2, ptr %dest, i32 4, <4 x i1> %1)
708 define void @foo_v8f16_v8f16(ptr %dest, ptr %mask, ptr %src) {
709 ; CHECK-LABEL: foo_v8f16_v8f16:
710 ; CHECK: @ %bb.0: @ %entry
711 ; CHECK-NEXT: vldrh.u16 q0, [r1]
712 ; CHECK-NEXT: vptt.s16 gt, q0, zr
713 ; CHECK-NEXT: vldrht.u16 q0, [r2]
714 ; CHECK-NEXT: vstrht.16 q0, [r0]
717 %0 = load <8 x i16>, ptr %mask, align 2
718 %1 = icmp sgt <8 x i16> %0, zeroinitializer
719 %2 = call <8 x half> @llvm.masked.load.v8f16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x half> undef)
720 call void @llvm.masked.store.v8f16.p0(<8 x half> %2, ptr %dest, i32 2, <8 x i1> %1)
724 define void @foo_v4f32_v4f16(ptr %dest, ptr %mask, ptr %src) {
725 ; CHECK-LE-LABEL: foo_v4f32_v4f16:
726 ; CHECK-LE: @ %bb.0: @ %entry
727 ; CHECK-LE-NEXT: .save {r7, lr}
728 ; CHECK-LE-NEXT: push {r7, lr}
729 ; CHECK-LE-NEXT: .pad #4
730 ; CHECK-LE-NEXT: sub sp, #4
731 ; CHECK-LE-NEXT: vldrh.s32 q0, [r1]
732 ; CHECK-LE-NEXT: vcmp.s32 gt, q0, zr
733 ; CHECK-LE-NEXT: @ implicit-def: $q0
734 ; CHECK-LE-NEXT: vmrs lr, p0
735 ; CHECK-LE-NEXT: and r1, lr, #1
736 ; CHECK-LE-NEXT: ubfx r3, lr, #4, #1
737 ; CHECK-LE-NEXT: rsb.w r12, r1, #0
738 ; CHECK-LE-NEXT: movs r1, #0
739 ; CHECK-LE-NEXT: rsbs r3, r3, #0
740 ; CHECK-LE-NEXT: bfi r1, r12, #0, #1
741 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
742 ; CHECK-LE-NEXT: ubfx r3, lr, #8, #1
743 ; CHECK-LE-NEXT: rsbs r3, r3, #0
744 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
745 ; CHECK-LE-NEXT: ubfx r3, lr, #12, #1
746 ; CHECK-LE-NEXT: rsbs r3, r3, #0
747 ; CHECK-LE-NEXT: bfi r1, r3, #3, #1
748 ; CHECK-LE-NEXT: lsls r3, r1, #31
749 ; CHECK-LE-NEXT: bne .LBB18_6
750 ; CHECK-LE-NEXT: @ %bb.1: @ %else
751 ; CHECK-LE-NEXT: lsls r3, r1, #30
752 ; CHECK-LE-NEXT: bmi .LBB18_7
753 ; CHECK-LE-NEXT: .LBB18_2: @ %else2
754 ; CHECK-LE-NEXT: lsls r3, r1, #29
755 ; CHECK-LE-NEXT: bmi .LBB18_8
756 ; CHECK-LE-NEXT: .LBB18_3: @ %else5
757 ; CHECK-LE-NEXT: lsls r1, r1, #28
758 ; CHECK-LE-NEXT: bpl .LBB18_5
759 ; CHECK-LE-NEXT: .LBB18_4: @ %cond.load7
760 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #6]
761 ; CHECK-LE-NEXT: vins.f16 s1, s2
762 ; CHECK-LE-NEXT: .LBB18_5: @ %else8
763 ; CHECK-LE-NEXT: vmrs r2, p0
764 ; CHECK-LE-NEXT: movs r1, #0
765 ; CHECK-LE-NEXT: vcvtt.f32.f16 s3, s1
766 ; CHECK-LE-NEXT: vcvtb.f32.f16 s2, s1
767 ; CHECK-LE-NEXT: vcvtt.f32.f16 s1, s0
768 ; CHECK-LE-NEXT: vcvtb.f32.f16 s0, s0
769 ; CHECK-LE-NEXT: and r3, r2, #1
770 ; CHECK-LE-NEXT: rsbs r3, r3, #0
771 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
772 ; CHECK-LE-NEXT: ubfx r3, r2, #4, #1
773 ; CHECK-LE-NEXT: rsbs r3, r3, #0
774 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
775 ; CHECK-LE-NEXT: ubfx r3, r2, #8, #1
776 ; CHECK-LE-NEXT: ubfx r2, r2, #12, #1
777 ; CHECK-LE-NEXT: rsbs r3, r3, #0
778 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
779 ; CHECK-LE-NEXT: rsbs r2, r2, #0
780 ; CHECK-LE-NEXT: bfi r1, r2, #3, #1
781 ; CHECK-LE-NEXT: lsls r2, r1, #31
782 ; CHECK-LE-NEXT: itt ne
783 ; CHECK-LE-NEXT: vmovne r2, s0
784 ; CHECK-LE-NEXT: strne r2, [r0]
785 ; CHECK-LE-NEXT: lsls r2, r1, #30
786 ; CHECK-LE-NEXT: itt mi
787 ; CHECK-LE-NEXT: vmovmi r2, s1
788 ; CHECK-LE-NEXT: strmi r2, [r0, #4]
789 ; CHECK-LE-NEXT: lsls r2, r1, #29
790 ; CHECK-LE-NEXT: itt mi
791 ; CHECK-LE-NEXT: vmovmi r2, s2
792 ; CHECK-LE-NEXT: strmi r2, [r0, #8]
793 ; CHECK-LE-NEXT: lsls r1, r1, #28
794 ; CHECK-LE-NEXT: itt mi
795 ; CHECK-LE-NEXT: vmovmi r1, s3
796 ; CHECK-LE-NEXT: strmi r1, [r0, #12]
797 ; CHECK-LE-NEXT: add sp, #4
798 ; CHECK-LE-NEXT: pop {r7, pc}
799 ; CHECK-LE-NEXT: .LBB18_6: @ %cond.load
800 ; CHECK-LE-NEXT: vldr.16 s0, [r2]
801 ; CHECK-LE-NEXT: lsls r3, r1, #30
802 ; CHECK-LE-NEXT: bpl .LBB18_2
803 ; CHECK-LE-NEXT: .LBB18_7: @ %cond.load1
804 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #2]
805 ; CHECK-LE-NEXT: vins.f16 s0, s2
806 ; CHECK-LE-NEXT: lsls r3, r1, #29
807 ; CHECK-LE-NEXT: bpl .LBB18_3
808 ; CHECK-LE-NEXT: .LBB18_8: @ %cond.load4
809 ; CHECK-LE-NEXT: vldr.16 s1, [r2, #4]
810 ; CHECK-LE-NEXT: vmovx.f16 s2, s0
811 ; CHECK-LE-NEXT: vins.f16 s1, s2
812 ; CHECK-LE-NEXT: lsls r1, r1, #28
813 ; CHECK-LE-NEXT: bmi .LBB18_4
814 ; CHECK-LE-NEXT: b .LBB18_5
816 ; CHECK-BE-LABEL: foo_v4f32_v4f16:
817 ; CHECK-BE: @ %bb.0: @ %entry
818 ; CHECK-BE-NEXT: .save {r7, lr}
819 ; CHECK-BE-NEXT: push {r7, lr}
820 ; CHECK-BE-NEXT: .pad #4
821 ; CHECK-BE-NEXT: sub sp, #4
822 ; CHECK-BE-NEXT: vldrh.s32 q0, [r1]
823 ; CHECK-BE-NEXT: vcmp.s32 gt, q0, zr
824 ; CHECK-BE-NEXT: @ implicit-def: $q0
825 ; CHECK-BE-NEXT: vmrs lr, p0
826 ; CHECK-BE-NEXT: ubfx r1, lr, #12, #1
827 ; CHECK-BE-NEXT: ubfx r3, lr, #8, #1
828 ; CHECK-BE-NEXT: rsb.w r12, r1, #0
829 ; CHECK-BE-NEXT: movs r1, #0
830 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
831 ; CHECK-BE-NEXT: rsbs r3, r3, #0
832 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
833 ; CHECK-BE-NEXT: ubfx r3, lr, #4, #1
834 ; CHECK-BE-NEXT: rsbs r3, r3, #0
835 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
836 ; CHECK-BE-NEXT: and r3, lr, #1
837 ; CHECK-BE-NEXT: rsbs r3, r3, #0
838 ; CHECK-BE-NEXT: bfi r1, r3, #3, #1
839 ; CHECK-BE-NEXT: lsls r3, r1, #28
840 ; CHECK-BE-NEXT: bmi .LBB18_6
841 ; CHECK-BE-NEXT: @ %bb.1: @ %else
842 ; CHECK-BE-NEXT: lsls r3, r1, #29
843 ; CHECK-BE-NEXT: bmi .LBB18_7
844 ; CHECK-BE-NEXT: .LBB18_2: @ %else2
845 ; CHECK-BE-NEXT: lsls r3, r1, #30
846 ; CHECK-BE-NEXT: bmi .LBB18_8
847 ; CHECK-BE-NEXT: .LBB18_3: @ %else5
848 ; CHECK-BE-NEXT: lsls r1, r1, #31
849 ; CHECK-BE-NEXT: beq .LBB18_5
850 ; CHECK-BE-NEXT: .LBB18_4: @ %cond.load7
851 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #6]
852 ; CHECK-BE-NEXT: vins.f16 s1, s2
853 ; CHECK-BE-NEXT: .LBB18_5: @ %else8
854 ; CHECK-BE-NEXT: vmrs r2, p0
855 ; CHECK-BE-NEXT: movs r1, #0
856 ; CHECK-BE-NEXT: vcvtt.f32.f16 s3, s1
857 ; CHECK-BE-NEXT: vcvtb.f32.f16 s2, s1
858 ; CHECK-BE-NEXT: vcvtt.f32.f16 s1, s0
859 ; CHECK-BE-NEXT: vcvtb.f32.f16 s0, s0
860 ; CHECK-BE-NEXT: ubfx r3, r2, #12, #1
861 ; CHECK-BE-NEXT: rsbs r3, r3, #0
862 ; CHECK-BE-NEXT: bfi r1, r3, #0, #1
863 ; CHECK-BE-NEXT: ubfx r3, r2, #8, #1
864 ; CHECK-BE-NEXT: rsbs r3, r3, #0
865 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
866 ; CHECK-BE-NEXT: ubfx r3, r2, #4, #1
867 ; CHECK-BE-NEXT: and r2, r2, #1
868 ; CHECK-BE-NEXT: rsbs r3, r3, #0
869 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
870 ; CHECK-BE-NEXT: rsbs r2, r2, #0
871 ; CHECK-BE-NEXT: bfi r1, r2, #3, #1
872 ; CHECK-BE-NEXT: lsls r2, r1, #28
873 ; CHECK-BE-NEXT: itt mi
874 ; CHECK-BE-NEXT: vmovmi r2, s0
875 ; CHECK-BE-NEXT: strmi r2, [r0]
876 ; CHECK-BE-NEXT: lsls r2, r1, #29
877 ; CHECK-BE-NEXT: itt mi
878 ; CHECK-BE-NEXT: vmovmi r2, s1
879 ; CHECK-BE-NEXT: strmi r2, [r0, #4]
880 ; CHECK-BE-NEXT: lsls r2, r1, #30
881 ; CHECK-BE-NEXT: itt mi
882 ; CHECK-BE-NEXT: vmovmi r2, s2
883 ; CHECK-BE-NEXT: strmi r2, [r0, #8]
884 ; CHECK-BE-NEXT: lsls r1, r1, #31
885 ; CHECK-BE-NEXT: itt ne
886 ; CHECK-BE-NEXT: vmovne r1, s3
887 ; CHECK-BE-NEXT: strne r1, [r0, #12]
888 ; CHECK-BE-NEXT: add sp, #4
889 ; CHECK-BE-NEXT: pop {r7, pc}
890 ; CHECK-BE-NEXT: .LBB18_6: @ %cond.load
891 ; CHECK-BE-NEXT: vldr.16 s0, [r2]
892 ; CHECK-BE-NEXT: lsls r3, r1, #29
893 ; CHECK-BE-NEXT: bpl .LBB18_2
894 ; CHECK-BE-NEXT: .LBB18_7: @ %cond.load1
895 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #2]
896 ; CHECK-BE-NEXT: vins.f16 s0, s2
897 ; CHECK-BE-NEXT: lsls r3, r1, #30
898 ; CHECK-BE-NEXT: bpl .LBB18_3
899 ; CHECK-BE-NEXT: .LBB18_8: @ %cond.load4
900 ; CHECK-BE-NEXT: vldr.16 s1, [r2, #4]
901 ; CHECK-BE-NEXT: vmovx.f16 s2, s0
902 ; CHECK-BE-NEXT: vins.f16 s1, s2
903 ; CHECK-BE-NEXT: lsls r1, r1, #31
904 ; CHECK-BE-NEXT: bne .LBB18_4
905 ; CHECK-BE-NEXT: b .LBB18_5
907 %0 = load <4 x i16>, ptr %mask, align 2
908 %1 = icmp sgt <4 x i16> %0, zeroinitializer
909 %2 = call <4 x half> @llvm.masked.load.v4f16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x half> undef)
910 %3 = fpext <4 x half> %2 to <4 x float>
911 call void @llvm.masked.store.v4f32.p0(<4 x float> %3, ptr %dest, i32 2, <4 x i1> %1)
915 define void @foo_v4f32_v4f16_unaligned(ptr %dest, ptr %mask, ptr %src) {
916 ; CHECK-LE-LABEL: foo_v4f32_v4f16_unaligned:
917 ; CHECK-LE: @ %bb.0: @ %entry
918 ; CHECK-LE-NEXT: .save {r7, lr}
919 ; CHECK-LE-NEXT: push {r7, lr}
920 ; CHECK-LE-NEXT: .pad #4
921 ; CHECK-LE-NEXT: sub sp, #4
922 ; CHECK-LE-NEXT: vldrh.s32 q0, [r1]
923 ; CHECK-LE-NEXT: vcmp.s32 gt, q0, zr
924 ; CHECK-LE-NEXT: @ implicit-def: $q0
925 ; CHECK-LE-NEXT: vmrs lr, p0
926 ; CHECK-LE-NEXT: and r1, lr, #1
927 ; CHECK-LE-NEXT: ubfx r3, lr, #4, #1
928 ; CHECK-LE-NEXT: rsb.w r12, r1, #0
929 ; CHECK-LE-NEXT: movs r1, #0
930 ; CHECK-LE-NEXT: rsbs r3, r3, #0
931 ; CHECK-LE-NEXT: bfi r1, r12, #0, #1
932 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
933 ; CHECK-LE-NEXT: ubfx r3, lr, #8, #1
934 ; CHECK-LE-NEXT: rsbs r3, r3, #0
935 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
936 ; CHECK-LE-NEXT: ubfx r3, lr, #12, #1
937 ; CHECK-LE-NEXT: rsbs r3, r3, #0
938 ; CHECK-LE-NEXT: bfi r1, r3, #3, #1
939 ; CHECK-LE-NEXT: lsls r3, r1, #31
940 ; CHECK-LE-NEXT: bne .LBB19_6
941 ; CHECK-LE-NEXT: @ %bb.1: @ %else
942 ; CHECK-LE-NEXT: lsls r3, r1, #30
943 ; CHECK-LE-NEXT: bmi .LBB19_7
944 ; CHECK-LE-NEXT: .LBB19_2: @ %else2
945 ; CHECK-LE-NEXT: lsls r3, r1, #29
946 ; CHECK-LE-NEXT: bmi .LBB19_8
947 ; CHECK-LE-NEXT: .LBB19_3: @ %else5
948 ; CHECK-LE-NEXT: lsls r1, r1, #28
949 ; CHECK-LE-NEXT: bpl .LBB19_5
950 ; CHECK-LE-NEXT: .LBB19_4: @ %cond.load7
951 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #6]
952 ; CHECK-LE-NEXT: vins.f16 s1, s2
953 ; CHECK-LE-NEXT: .LBB19_5: @ %else8
954 ; CHECK-LE-NEXT: vmrs r2, p0
955 ; CHECK-LE-NEXT: movs r1, #0
956 ; CHECK-LE-NEXT: vcvtt.f32.f16 s3, s1
957 ; CHECK-LE-NEXT: vcvtb.f32.f16 s2, s1
958 ; CHECK-LE-NEXT: vcvtt.f32.f16 s1, s0
959 ; CHECK-LE-NEXT: vcvtb.f32.f16 s0, s0
960 ; CHECK-LE-NEXT: and r3, r2, #1
961 ; CHECK-LE-NEXT: rsbs r3, r3, #0
962 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
963 ; CHECK-LE-NEXT: ubfx r3, r2, #4, #1
964 ; CHECK-LE-NEXT: rsbs r3, r3, #0
965 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
966 ; CHECK-LE-NEXT: ubfx r3, r2, #8, #1
967 ; CHECK-LE-NEXT: ubfx r2, r2, #12, #1
968 ; CHECK-LE-NEXT: rsbs r3, r3, #0
969 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
970 ; CHECK-LE-NEXT: rsbs r2, r2, #0
971 ; CHECK-LE-NEXT: bfi r1, r2, #3, #1
972 ; CHECK-LE-NEXT: lsls r2, r1, #31
973 ; CHECK-LE-NEXT: itt ne
974 ; CHECK-LE-NEXT: vmovne r2, s0
975 ; CHECK-LE-NEXT: strne r2, [r0]
976 ; CHECK-LE-NEXT: lsls r2, r1, #30
977 ; CHECK-LE-NEXT: itt mi
978 ; CHECK-LE-NEXT: vmovmi r2, s1
979 ; CHECK-LE-NEXT: strmi r2, [r0, #4]
980 ; CHECK-LE-NEXT: lsls r2, r1, #29
981 ; CHECK-LE-NEXT: itt mi
982 ; CHECK-LE-NEXT: vmovmi r2, s2
983 ; CHECK-LE-NEXT: strmi r2, [r0, #8]
984 ; CHECK-LE-NEXT: lsls r1, r1, #28
985 ; CHECK-LE-NEXT: itt mi
986 ; CHECK-LE-NEXT: vmovmi r1, s3
987 ; CHECK-LE-NEXT: strmi r1, [r0, #12]
988 ; CHECK-LE-NEXT: add sp, #4
989 ; CHECK-LE-NEXT: pop {r7, pc}
990 ; CHECK-LE-NEXT: .LBB19_6: @ %cond.load
991 ; CHECK-LE-NEXT: vldr.16 s0, [r2]
992 ; CHECK-LE-NEXT: lsls r3, r1, #30
993 ; CHECK-LE-NEXT: bpl .LBB19_2
994 ; CHECK-LE-NEXT: .LBB19_7: @ %cond.load1
995 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #2]
996 ; CHECK-LE-NEXT: vins.f16 s0, s2
997 ; CHECK-LE-NEXT: lsls r3, r1, #29
998 ; CHECK-LE-NEXT: bpl .LBB19_3
999 ; CHECK-LE-NEXT: .LBB19_8: @ %cond.load4
1000 ; CHECK-LE-NEXT: vldr.16 s1, [r2, #4]
1001 ; CHECK-LE-NEXT: vmovx.f16 s2, s0
1002 ; CHECK-LE-NEXT: vins.f16 s1, s2
1003 ; CHECK-LE-NEXT: lsls r1, r1, #28
1004 ; CHECK-LE-NEXT: bmi .LBB19_4
1005 ; CHECK-LE-NEXT: b .LBB19_5
1007 ; CHECK-BE-LABEL: foo_v4f32_v4f16_unaligned:
1008 ; CHECK-BE: @ %bb.0: @ %entry
1009 ; CHECK-BE-NEXT: .save {r7, lr}
1010 ; CHECK-BE-NEXT: push {r7, lr}
1011 ; CHECK-BE-NEXT: .pad #4
1012 ; CHECK-BE-NEXT: sub sp, #4
1013 ; CHECK-BE-NEXT: vldrh.s32 q0, [r1]
1014 ; CHECK-BE-NEXT: vcmp.s32 gt, q0, zr
1015 ; CHECK-BE-NEXT: @ implicit-def: $q0
1016 ; CHECK-BE-NEXT: vmrs lr, p0
1017 ; CHECK-BE-NEXT: ubfx r1, lr, #12, #1
1018 ; CHECK-BE-NEXT: ubfx r3, lr, #8, #1
1019 ; CHECK-BE-NEXT: rsb.w r12, r1, #0
1020 ; CHECK-BE-NEXT: movs r1, #0
1021 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
1022 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1023 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
1024 ; CHECK-BE-NEXT: ubfx r3, lr, #4, #1
1025 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1026 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
1027 ; CHECK-BE-NEXT: and r3, lr, #1
1028 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1029 ; CHECK-BE-NEXT: bfi r1, r3, #3, #1
1030 ; CHECK-BE-NEXT: lsls r3, r1, #28
1031 ; CHECK-BE-NEXT: bmi .LBB19_6
1032 ; CHECK-BE-NEXT: @ %bb.1: @ %else
1033 ; CHECK-BE-NEXT: lsls r3, r1, #29
1034 ; CHECK-BE-NEXT: bmi .LBB19_7
1035 ; CHECK-BE-NEXT: .LBB19_2: @ %else2
1036 ; CHECK-BE-NEXT: lsls r3, r1, #30
1037 ; CHECK-BE-NEXT: bmi .LBB19_8
1038 ; CHECK-BE-NEXT: .LBB19_3: @ %else5
1039 ; CHECK-BE-NEXT: lsls r1, r1, #31
1040 ; CHECK-BE-NEXT: beq .LBB19_5
1041 ; CHECK-BE-NEXT: .LBB19_4: @ %cond.load7
1042 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #6]
1043 ; CHECK-BE-NEXT: vins.f16 s1, s2
1044 ; CHECK-BE-NEXT: .LBB19_5: @ %else8
1045 ; CHECK-BE-NEXT: vmrs r2, p0
1046 ; CHECK-BE-NEXT: movs r1, #0
1047 ; CHECK-BE-NEXT: vcvtt.f32.f16 s3, s1
1048 ; CHECK-BE-NEXT: vcvtb.f32.f16 s2, s1
1049 ; CHECK-BE-NEXT: vcvtt.f32.f16 s1, s0
1050 ; CHECK-BE-NEXT: vcvtb.f32.f16 s0, s0
1051 ; CHECK-BE-NEXT: ubfx r3, r2, #12, #1
1052 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1053 ; CHECK-BE-NEXT: bfi r1, r3, #0, #1
1054 ; CHECK-BE-NEXT: ubfx r3, r2, #8, #1
1055 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1056 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
1057 ; CHECK-BE-NEXT: ubfx r3, r2, #4, #1
1058 ; CHECK-BE-NEXT: and r2, r2, #1
1059 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1060 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
1061 ; CHECK-BE-NEXT: rsbs r2, r2, #0
1062 ; CHECK-BE-NEXT: bfi r1, r2, #3, #1
1063 ; CHECK-BE-NEXT: lsls r2, r1, #28
1064 ; CHECK-BE-NEXT: itt mi
1065 ; CHECK-BE-NEXT: vmovmi r2, s0
1066 ; CHECK-BE-NEXT: strmi r2, [r0]
1067 ; CHECK-BE-NEXT: lsls r2, r1, #29
1068 ; CHECK-BE-NEXT: itt mi
1069 ; CHECK-BE-NEXT: vmovmi r2, s1
1070 ; CHECK-BE-NEXT: strmi r2, [r0, #4]
1071 ; CHECK-BE-NEXT: lsls r2, r1, #30
1072 ; CHECK-BE-NEXT: itt mi
1073 ; CHECK-BE-NEXT: vmovmi r2, s2
1074 ; CHECK-BE-NEXT: strmi r2, [r0, #8]
1075 ; CHECK-BE-NEXT: lsls r1, r1, #31
1076 ; CHECK-BE-NEXT: itt ne
1077 ; CHECK-BE-NEXT: vmovne r1, s3
1078 ; CHECK-BE-NEXT: strne r1, [r0, #12]
1079 ; CHECK-BE-NEXT: add sp, #4
1080 ; CHECK-BE-NEXT: pop {r7, pc}
1081 ; CHECK-BE-NEXT: .LBB19_6: @ %cond.load
1082 ; CHECK-BE-NEXT: vldr.16 s0, [r2]
1083 ; CHECK-BE-NEXT: lsls r3, r1, #29
1084 ; CHECK-BE-NEXT: bpl .LBB19_2
1085 ; CHECK-BE-NEXT: .LBB19_7: @ %cond.load1
1086 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #2]
1087 ; CHECK-BE-NEXT: vins.f16 s0, s2
1088 ; CHECK-BE-NEXT: lsls r3, r1, #30
1089 ; CHECK-BE-NEXT: bpl .LBB19_3
1090 ; CHECK-BE-NEXT: .LBB19_8: @ %cond.load4
1091 ; CHECK-BE-NEXT: vldr.16 s1, [r2, #4]
1092 ; CHECK-BE-NEXT: vmovx.f16 s2, s0
1093 ; CHECK-BE-NEXT: vins.f16 s1, s2
1094 ; CHECK-BE-NEXT: lsls r1, r1, #31
1095 ; CHECK-BE-NEXT: bne .LBB19_4
1096 ; CHECK-BE-NEXT: b .LBB19_5
1098 %0 = load <4 x i16>, ptr %mask, align 2
1099 %1 = icmp sgt <4 x i16> %0, zeroinitializer
1100 %2 = call <4 x half> @llvm.masked.load.v4f16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x half> undef)
1101 %3 = fpext <4 x half> %2 to <4 x float>
1102 call void @llvm.masked.store.v4f32.p0(<4 x float> %3, ptr %dest, i32 1, <4 x i1> %1)
1106 declare void @llvm.masked.store.v4i32.p0(<4 x i32>, ptr, i32, <4 x i1>)
1107 declare void @llvm.masked.store.v8i16.p0(<8 x i16>, ptr, i32, <8 x i1>)
1108 declare void @llvm.masked.store.v16i8.p0(<16 x i8>, ptr, i32, <16 x i1>)
1109 declare void @llvm.masked.store.v8f16.p0(<8 x half>, ptr, i32, <8 x i1>)
1110 declare void @llvm.masked.store.v4f32.p0(<4 x float>, ptr, i32, <4 x i1>)
1111 declare <16 x i8> @llvm.masked.load.v16i8.p0(ptr, i32, <16 x i1>, <16 x i8>)
1112 declare <8 x i16> @llvm.masked.load.v8i16.p0(ptr, i32, <8 x i1>, <8 x i16>)
1113 declare <2 x i32> @llvm.masked.load.v2i32.p0(ptr, i32, <2 x i1>, <2 x i32>)
1114 declare <4 x i32> @llvm.masked.load.v4i32.p0(ptr, i32, <4 x i1>, <4 x i32>)
1115 declare <4 x float> @llvm.masked.load.v4f32.p0(ptr, i32, <4 x i1>, <4 x float>)
1116 declare <4 x half> @llvm.masked.load.v4f16.p0(ptr, i32, <4 x i1>, <4 x half>)
1117 declare <8 x half> @llvm.masked.load.v8f16.p0(ptr, i32, <8 x i1>, <8 x half>)
1119 declare void @llvm.masked.store.v8i8.p0(<8 x i8>, ptr, i32, <8 x i1>)
1120 declare void @llvm.masked.store.v4i8.p0(<4 x i8>, ptr, i32, <4 x i1>)
1121 declare void @llvm.masked.store.v4i16.p0(<4 x i16>, ptr, i32, <4 x i1>)
1122 declare void @llvm.masked.store.v2i64.p0(<2 x i64>, ptr, i32, <2 x i1>)
1123 declare <4 x i16> @llvm.masked.load.v4i16.p0(ptr, i32, <4 x i1>, <4 x i16>)
1124 declare <4 x i8> @llvm.masked.load.v4i8.p0(ptr, i32, <4 x i1>, <4 x i8>)
1125 declare <8 x i8> @llvm.masked.load.v8i8.p0(ptr, i32, <8 x i1>, <8 x i8>)