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: vrev64.32 q3, q2
425 ; CHECK-BE-NEXT: movs r1, #0
426 ; CHECK-BE-NEXT: vmov r2, s15
427 ; CHECK-BE-NEXT: vmov.i64 q1, #0xffffffff
428 ; CHECK-BE-NEXT: vand q0, q0, q1
429 ; CHECK-BE-NEXT: rsbs r3, r2, #0
430 ; CHECK-BE-NEXT: vmov r3, s13
431 ; CHECK-BE-NEXT: sbcs.w r2, r1, r2, asr #31
432 ; CHECK-BE-NEXT: csetm r12, lt
433 ; CHECK-BE-NEXT: rsbs r2, r3, #0
434 ; CHECK-BE-NEXT: sbcs.w r2, r1, r3, asr #31
435 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
436 ; CHECK-BE-NEXT: csetm r2, lt
437 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
438 ; CHECK-BE-NEXT: lsls r2, r1, #30
439 ; CHECK-BE-NEXT: it mi
440 ; CHECK-BE-NEXT: vstrmi d0, [r0]
441 ; CHECK-BE-NEXT: lsls r1, r1, #31
442 ; CHECK-BE-NEXT: it ne
443 ; CHECK-BE-NEXT: vstrne d1, [r0, #8]
444 ; CHECK-BE-NEXT: add sp, #4
445 ; CHECK-BE-NEXT: pop {r7, pc}
447 %0 = load <2 x i32>, ptr %mask, align 4
448 %1 = icmp sgt <2 x i32> %0, zeroinitializer
449 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 4, <2 x i1> %1, <2 x i32> undef)
450 %3 = zext <2 x i32> %2 to <2 x i64>
451 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 8, <2 x i1> %1)
455 define void @foo_zext_v2i64_v2i32_unaligned(ptr %dest, ptr %mask, ptr %src) {
456 ; CHECK-LE-LABEL: foo_zext_v2i64_v2i32_unaligned:
457 ; CHECK-LE: @ %bb.0: @ %entry
458 ; CHECK-LE-NEXT: .save {r4, lr}
459 ; CHECK-LE-NEXT: push {r4, lr}
460 ; CHECK-LE-NEXT: .pad #4
461 ; CHECK-LE-NEXT: sub sp, #4
462 ; CHECK-LE-NEXT: ldrd r12, lr, [r1]
463 ; CHECK-LE-NEXT: movs r1, #0
464 ; CHECK-LE-NEXT: @ implicit-def: $q0
465 ; CHECK-LE-NEXT: vmov.i64 q2, #0xffffffff
466 ; CHECK-LE-NEXT: rsbs.w r3, r12, #0
467 ; CHECK-LE-NEXT: vmov q1[2], q1[0], r12, lr
468 ; CHECK-LE-NEXT: sbcs.w r3, r1, r12, asr #31
469 ; CHECK-LE-NEXT: csetm r3, lt
470 ; CHECK-LE-NEXT: rsbs.w r4, lr, #0
471 ; CHECK-LE-NEXT: sbcs.w r4, r1, lr, asr #31
472 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
473 ; CHECK-LE-NEXT: csetm r3, lt
474 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
475 ; CHECK-LE-NEXT: lsls r3, r1, #31
476 ; CHECK-LE-NEXT: itt ne
477 ; CHECK-LE-NEXT: ldrne r3, [r2]
478 ; CHECK-LE-NEXT: vmovne.32 q0[0], r3
479 ; CHECK-LE-NEXT: lsls r1, r1, #30
480 ; CHECK-LE-NEXT: itt mi
481 ; CHECK-LE-NEXT: ldrmi r1, [r2, #4]
482 ; CHECK-LE-NEXT: vmovmi.32 q0[2], r1
483 ; CHECK-LE-NEXT: vmov r2, s4
484 ; CHECK-LE-NEXT: movs r1, #0
485 ; CHECK-LE-NEXT: vand q0, q0, q2
486 ; CHECK-LE-NEXT: rsbs r3, r2, #0
487 ; CHECK-LE-NEXT: vmov r3, s6
488 ; CHECK-LE-NEXT: sbcs.w r2, r1, r2, asr #31
489 ; CHECK-LE-NEXT: csetm r2, lt
490 ; CHECK-LE-NEXT: rsbs r4, r3, #0
491 ; CHECK-LE-NEXT: sbcs.w r3, r1, r3, asr #31
492 ; CHECK-LE-NEXT: bfi r1, r2, #0, #1
493 ; CHECK-LE-NEXT: csetm r2, lt
494 ; CHECK-LE-NEXT: bfi r1, r2, #1, #1
495 ; CHECK-LE-NEXT: lsls r2, r1, #31
496 ; CHECK-LE-NEXT: itt ne
497 ; CHECK-LE-NEXT: vmovne r2, r3, d0
498 ; CHECK-LE-NEXT: strdne r2, r3, [r0]
499 ; CHECK-LE-NEXT: lsls r1, r1, #30
500 ; CHECK-LE-NEXT: itt mi
501 ; CHECK-LE-NEXT: vmovmi r1, r2, d1
502 ; CHECK-LE-NEXT: strdmi r1, r2, [r0, #8]
503 ; CHECK-LE-NEXT: add sp, #4
504 ; CHECK-LE-NEXT: pop {r4, pc}
506 ; CHECK-BE-LABEL: foo_zext_v2i64_v2i32_unaligned:
507 ; CHECK-BE: @ %bb.0: @ %entry
508 ; CHECK-BE-NEXT: .save {r7, lr}
509 ; CHECK-BE-NEXT: push {r7, lr}
510 ; CHECK-BE-NEXT: .pad #4
511 ; CHECK-BE-NEXT: sub sp, #4
512 ; CHECK-BE-NEXT: ldrd r12, lr, [r1]
513 ; CHECK-BE-NEXT: rsbs.w r3, lr, #0
514 ; CHECK-BE-NEXT: mov.w r1, #0
515 ; CHECK-BE-NEXT: sbcs.w r3, r1, lr, asr #31
516 ; CHECK-BE-NEXT: vmov q1[3], q1[1], r12, lr
517 ; CHECK-BE-NEXT: csetm lr, lt
518 ; CHECK-BE-NEXT: rsbs.w r3, r12, #0
519 ; CHECK-BE-NEXT: @ implicit-def: $q0
520 ; CHECK-BE-NEXT: sbcs.w r3, r1, r12, asr #31
521 ; CHECK-BE-NEXT: bfi r1, lr, #0, #1
522 ; CHECK-BE-NEXT: csetm r3, lt
523 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
524 ; CHECK-BE-NEXT: lsls r3, r1, #30
525 ; CHECK-BE-NEXT: bpl .LBB8_2
526 ; CHECK-BE-NEXT: @ %bb.1: @ %cond.load
527 ; CHECK-BE-NEXT: ldr r3, [r2]
528 ; CHECK-BE-NEXT: vmov.32 q2[1], r3
529 ; CHECK-BE-NEXT: vrev64.32 q0, q2
530 ; CHECK-BE-NEXT: .LBB8_2: @ %else
531 ; CHECK-BE-NEXT: vrev64.32 q2, q1
532 ; CHECK-BE-NEXT: lsls r1, r1, #31
533 ; CHECK-BE-NEXT: beq .LBB8_4
534 ; CHECK-BE-NEXT: @ %bb.3: @ %cond.load1
535 ; CHECK-BE-NEXT: ldr r1, [r2, #4]
536 ; CHECK-BE-NEXT: vrev64.32 q1, q0
537 ; CHECK-BE-NEXT: vmov.32 q1[3], r1
538 ; CHECK-BE-NEXT: vrev64.32 q0, q1
539 ; CHECK-BE-NEXT: .LBB8_4: @ %else2
540 ; CHECK-BE-NEXT: vrev64.32 q3, q2
541 ; CHECK-BE-NEXT: movs r1, #0
542 ; CHECK-BE-NEXT: vmov r2, s15
543 ; CHECK-BE-NEXT: vmov.i64 q1, #0xffffffff
544 ; CHECK-BE-NEXT: vand q0, q0, q1
545 ; CHECK-BE-NEXT: rsbs r3, r2, #0
546 ; CHECK-BE-NEXT: vmov r3, s13
547 ; CHECK-BE-NEXT: sbcs.w r2, r1, r2, asr #31
548 ; CHECK-BE-NEXT: csetm r12, lt
549 ; CHECK-BE-NEXT: rsbs r2, r3, #0
550 ; CHECK-BE-NEXT: sbcs.w r2, r1, r3, asr #31
551 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
552 ; CHECK-BE-NEXT: csetm r2, lt
553 ; CHECK-BE-NEXT: bfi r1, r2, #1, #1
554 ; CHECK-BE-NEXT: lsls r2, r1, #30
555 ; CHECK-BE-NEXT: itt mi
556 ; CHECK-BE-NEXT: vmovmi r2, r3, d0
557 ; CHECK-BE-NEXT: strdmi r3, r2, [r0]
558 ; CHECK-BE-NEXT: lsls r1, r1, #31
559 ; CHECK-BE-NEXT: itt ne
560 ; CHECK-BE-NEXT: vmovne r1, r2, d1
561 ; CHECK-BE-NEXT: strdne r2, r1, [r0, #8]
562 ; CHECK-BE-NEXT: add sp, #4
563 ; CHECK-BE-NEXT: pop {r7, pc}
565 %0 = load <2 x i32>, ptr %mask, align 4
566 %1 = icmp sgt <2 x i32> %0, zeroinitializer
567 %2 = call <2 x i32> @llvm.masked.load.v2i32.p0(ptr %src, i32 2, <2 x i1> %1, <2 x i32> undef)
568 %3 = zext <2 x i32> %2 to <2 x i64>
569 call void @llvm.masked.store.v2i64.p0(<2 x i64> %3, ptr %dest, i32 4, <2 x i1> %1)
573 define void @foo_v8i16_v8i16(ptr %dest, ptr %mask, ptr %src) {
574 ; CHECK-LABEL: foo_v8i16_v8i16:
575 ; CHECK: @ %bb.0: @ %entry
576 ; CHECK-NEXT: vldrh.u16 q0, [r1]
577 ; CHECK-NEXT: vptt.s16 gt, q0, zr
578 ; CHECK-NEXT: vldrht.u16 q0, [r2]
579 ; CHECK-NEXT: vstrht.16 q0, [r0]
582 %0 = load <8 x i16>, ptr %mask, align 2
583 %1 = icmp sgt <8 x i16> %0, zeroinitializer
584 %2 = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x i16> undef)
585 call void @llvm.masked.store.v8i16.p0(<8 x i16> %2, ptr %dest, i32 2, <8 x i1> %1)
589 define void @foo_sext_v8i16_v8i8(ptr %dest, ptr %mask, ptr %src) {
590 ; CHECK-LABEL: foo_sext_v8i16_v8i8:
591 ; CHECK: @ %bb.0: @ %entry
592 ; CHECK-NEXT: vldrh.u16 q0, [r1]
593 ; CHECK-NEXT: vptt.s16 gt, q0, zr
594 ; CHECK-NEXT: vldrbt.s16 q0, [r2]
595 ; CHECK-NEXT: vstrht.16 q0, [r0]
598 %0 = load <8 x i16>, ptr %mask, align 2
599 %1 = icmp sgt <8 x i16> %0, zeroinitializer
600 %2 = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %src, i32 1, <8 x i1> %1, <8 x i8> undef)
601 %3 = sext <8 x i8> %2 to <8 x i16>
602 call void @llvm.masked.store.v8i16.p0(<8 x i16> %3, ptr %dest, i32 2, <8 x i1> %1)
606 define void @foo_zext_v8i16_v8i8(ptr %dest, ptr %mask, ptr %src) {
607 ; CHECK-LABEL: foo_zext_v8i16_v8i8:
608 ; CHECK: @ %bb.0: @ %entry
609 ; CHECK-NEXT: vldrh.u16 q0, [r1]
610 ; CHECK-NEXT: vptt.s16 gt, q0, zr
611 ; CHECK-NEXT: vldrbt.u16 q0, [r2]
612 ; CHECK-NEXT: vstrht.16 q0, [r0]
615 %0 = load <8 x i16>, ptr %mask, align 2
616 %1 = icmp sgt <8 x i16> %0, zeroinitializer
617 %2 = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %src, i32 1, <8 x i1> %1, <8 x i8> undef)
618 %3 = zext <8 x i8> %2 to <8 x i16>
619 call void @llvm.masked.store.v8i16.p0(<8 x i16> %3, ptr %dest, i32 2, <8 x i1> %1)
623 define void @foo_v16i8_v16i8(ptr %dest, ptr %mask, ptr %src) {
624 ; CHECK-LABEL: foo_v16i8_v16i8:
625 ; CHECK: @ %bb.0: @ %entry
626 ; CHECK-NEXT: vldrb.u8 q0, [r1]
627 ; CHECK-NEXT: vptt.s8 gt, q0, zr
628 ; CHECK-NEXT: vldrbt.u8 q0, [r2]
629 ; CHECK-NEXT: vstrbt.8 q0, [r0]
632 %0 = load <16 x i8>, ptr %mask, align 1
633 %1 = icmp sgt <16 x i8> %0, zeroinitializer
634 %2 = call <16 x i8> @llvm.masked.load.v16i8.p0(ptr %src, i32 1, <16 x i1> %1, <16 x i8> undef)
635 call void @llvm.masked.store.v16i8.p0(<16 x i8> %2, ptr %dest, i32 1, <16 x i1> %1)
639 define void @foo_trunc_v8i8_v8i16(ptr %dest, ptr %mask, ptr %src) {
640 ; CHECK-LABEL: foo_trunc_v8i8_v8i16:
641 ; CHECK: @ %bb.0: @ %entry
642 ; CHECK-NEXT: vldrh.u16 q0, [r1]
643 ; CHECK-NEXT: vptt.s16 gt, q0, zr
644 ; CHECK-NEXT: vldrht.u16 q0, [r2]
645 ; CHECK-NEXT: vstrbt.16 q0, [r0]
648 %0 = load <8 x i16>, ptr %mask, align 2
649 %1 = icmp sgt <8 x i16> %0, zeroinitializer
650 %2 = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x i16> undef)
651 %3 = trunc <8 x i16> %2 to <8 x i8>
652 call void @llvm.masked.store.v8i8.p0(<8 x i8> %3, ptr %dest, i32 1, <8 x i1> %1)
656 define void @foo_trunc_v4i8_v4i32(ptr %dest, ptr %mask, ptr %src) {
657 ; CHECK-LABEL: foo_trunc_v4i8_v4i32:
658 ; CHECK: @ %bb.0: @ %entry
659 ; CHECK-NEXT: vldrw.u32 q0, [r1]
660 ; CHECK-NEXT: vptt.s32 gt, q0, zr
661 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
662 ; CHECK-NEXT: vstrbt.32 q0, [r0]
665 %0 = load <4 x i32>, ptr %mask, align 4
666 %1 = icmp sgt <4 x i32> %0, zeroinitializer
667 %2 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x i32> undef)
668 %3 = trunc <4 x i32> %2 to <4 x i8>
669 call void @llvm.masked.store.v4i8.p0(<4 x i8> %3, ptr %dest, i32 1, <4 x i1> %1)
673 define void @foo_trunc_v4i16_v4i32(ptr %dest, ptr %mask, ptr %src) {
674 ; CHECK-LABEL: foo_trunc_v4i16_v4i32:
675 ; CHECK: @ %bb.0: @ %entry
676 ; CHECK-NEXT: vldrw.u32 q0, [r1]
677 ; CHECK-NEXT: vptt.s32 gt, q0, zr
678 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
679 ; CHECK-NEXT: vstrht.32 q0, [r0]
682 %0 = load <4 x i32>, ptr %mask, align 4
683 %1 = icmp sgt <4 x i32> %0, zeroinitializer
684 %2 = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x i32> undef)
685 %3 = trunc <4 x i32> %2 to <4 x i16>
686 call void @llvm.masked.store.v4i16.p0(<4 x i16> %3, ptr %dest, i32 2, <4 x i1> %1)
690 define void @foo_v4f32_v4f32(ptr %dest, ptr %mask, ptr %src) {
691 ; CHECK-LABEL: foo_v4f32_v4f32:
692 ; CHECK: @ %bb.0: @ %entry
693 ; CHECK-NEXT: vldrw.u32 q0, [r1]
694 ; CHECK-NEXT: vptt.s32 gt, q0, zr
695 ; CHECK-NEXT: vldrwt.u32 q0, [r2]
696 ; CHECK-NEXT: vstrwt.32 q0, [r0]
699 %0 = load <4 x i32>, ptr %mask, align 4
700 %1 = icmp sgt <4 x i32> %0, zeroinitializer
701 %2 = call <4 x float> @llvm.masked.load.v4f32.p0(ptr %src, i32 4, <4 x i1> %1, <4 x float> undef)
702 call void @llvm.masked.store.v4f32.p0(<4 x float> %2, ptr %dest, i32 4, <4 x i1> %1)
706 define void @foo_v8f16_v8f16(ptr %dest, ptr %mask, ptr %src) {
707 ; CHECK-LABEL: foo_v8f16_v8f16:
708 ; CHECK: @ %bb.0: @ %entry
709 ; CHECK-NEXT: vldrh.u16 q0, [r1]
710 ; CHECK-NEXT: vptt.s16 gt, q0, zr
711 ; CHECK-NEXT: vldrht.u16 q0, [r2]
712 ; CHECK-NEXT: vstrht.16 q0, [r0]
715 %0 = load <8 x i16>, ptr %mask, align 2
716 %1 = icmp sgt <8 x i16> %0, zeroinitializer
717 %2 = call <8 x half> @llvm.masked.load.v8f16.p0(ptr %src, i32 2, <8 x i1> %1, <8 x half> undef)
718 call void @llvm.masked.store.v8f16.p0(<8 x half> %2, ptr %dest, i32 2, <8 x i1> %1)
722 define void @foo_v4f32_v4f16(ptr %dest, ptr %mask, ptr %src) {
723 ; CHECK-LE-LABEL: foo_v4f32_v4f16:
724 ; CHECK-LE: @ %bb.0: @ %entry
725 ; CHECK-LE-NEXT: .save {r7, lr}
726 ; CHECK-LE-NEXT: push {r7, lr}
727 ; CHECK-LE-NEXT: .pad #4
728 ; CHECK-LE-NEXT: sub sp, #4
729 ; CHECK-LE-NEXT: vldrh.s32 q0, [r1]
730 ; CHECK-LE-NEXT: vcmp.s32 gt, q0, zr
731 ; CHECK-LE-NEXT: @ implicit-def: $q0
732 ; CHECK-LE-NEXT: vmrs lr, p0
733 ; CHECK-LE-NEXT: and r1, lr, #1
734 ; CHECK-LE-NEXT: ubfx r3, lr, #4, #1
735 ; CHECK-LE-NEXT: rsb.w r12, r1, #0
736 ; CHECK-LE-NEXT: movs r1, #0
737 ; CHECK-LE-NEXT: rsbs r3, r3, #0
738 ; CHECK-LE-NEXT: bfi r1, r12, #0, #1
739 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
740 ; CHECK-LE-NEXT: ubfx r3, lr, #8, #1
741 ; CHECK-LE-NEXT: rsbs r3, r3, #0
742 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
743 ; CHECK-LE-NEXT: ubfx r3, lr, #12, #1
744 ; CHECK-LE-NEXT: rsbs r3, r3, #0
745 ; CHECK-LE-NEXT: bfi r1, r3, #3, #1
746 ; CHECK-LE-NEXT: lsls r3, r1, #31
747 ; CHECK-LE-NEXT: bne .LBB18_6
748 ; CHECK-LE-NEXT: @ %bb.1: @ %else
749 ; CHECK-LE-NEXT: lsls r3, r1, #30
750 ; CHECK-LE-NEXT: bmi .LBB18_7
751 ; CHECK-LE-NEXT: .LBB18_2: @ %else2
752 ; CHECK-LE-NEXT: lsls r3, r1, #29
753 ; CHECK-LE-NEXT: bmi .LBB18_8
754 ; CHECK-LE-NEXT: .LBB18_3: @ %else5
755 ; CHECK-LE-NEXT: lsls r1, r1, #28
756 ; CHECK-LE-NEXT: bpl .LBB18_5
757 ; CHECK-LE-NEXT: .LBB18_4: @ %cond.load7
758 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #6]
759 ; CHECK-LE-NEXT: vins.f16 s1, s2
760 ; CHECK-LE-NEXT: .LBB18_5: @ %else8
761 ; CHECK-LE-NEXT: vmrs r2, p0
762 ; CHECK-LE-NEXT: movs r1, #0
763 ; CHECK-LE-NEXT: vcvtt.f32.f16 s3, s1
764 ; CHECK-LE-NEXT: vcvtb.f32.f16 s2, s1
765 ; CHECK-LE-NEXT: vcvtt.f32.f16 s1, s0
766 ; CHECK-LE-NEXT: vcvtb.f32.f16 s0, s0
767 ; CHECK-LE-NEXT: and r3, r2, #1
768 ; CHECK-LE-NEXT: rsbs r3, r3, #0
769 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
770 ; CHECK-LE-NEXT: ubfx r3, r2, #4, #1
771 ; CHECK-LE-NEXT: rsbs r3, r3, #0
772 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
773 ; CHECK-LE-NEXT: ubfx r3, r2, #8, #1
774 ; CHECK-LE-NEXT: ubfx r2, r2, #12, #1
775 ; CHECK-LE-NEXT: rsbs r3, r3, #0
776 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
777 ; CHECK-LE-NEXT: rsbs r2, r2, #0
778 ; CHECK-LE-NEXT: bfi r1, r2, #3, #1
779 ; CHECK-LE-NEXT: lsls r2, r1, #31
780 ; CHECK-LE-NEXT: itt ne
781 ; CHECK-LE-NEXT: vmovne r2, s0
782 ; CHECK-LE-NEXT: strne r2, [r0]
783 ; CHECK-LE-NEXT: lsls r2, r1, #30
784 ; CHECK-LE-NEXT: itt mi
785 ; CHECK-LE-NEXT: vmovmi r2, s1
786 ; CHECK-LE-NEXT: strmi r2, [r0, #4]
787 ; CHECK-LE-NEXT: lsls r2, r1, #29
788 ; CHECK-LE-NEXT: itt mi
789 ; CHECK-LE-NEXT: vmovmi r2, s2
790 ; CHECK-LE-NEXT: strmi r2, [r0, #8]
791 ; CHECK-LE-NEXT: lsls r1, r1, #28
792 ; CHECK-LE-NEXT: itt mi
793 ; CHECK-LE-NEXT: vmovmi r1, s3
794 ; CHECK-LE-NEXT: strmi r1, [r0, #12]
795 ; CHECK-LE-NEXT: add sp, #4
796 ; CHECK-LE-NEXT: pop {r7, pc}
797 ; CHECK-LE-NEXT: .LBB18_6: @ %cond.load
798 ; CHECK-LE-NEXT: vldr.16 s0, [r2]
799 ; CHECK-LE-NEXT: lsls r3, r1, #30
800 ; CHECK-LE-NEXT: bpl .LBB18_2
801 ; CHECK-LE-NEXT: .LBB18_7: @ %cond.load1
802 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #2]
803 ; CHECK-LE-NEXT: vins.f16 s0, s2
804 ; CHECK-LE-NEXT: lsls r3, r1, #29
805 ; CHECK-LE-NEXT: bpl .LBB18_3
806 ; CHECK-LE-NEXT: .LBB18_8: @ %cond.load4
807 ; CHECK-LE-NEXT: vldr.16 s1, [r2, #4]
808 ; CHECK-LE-NEXT: vmovx.f16 s2, s0
809 ; CHECK-LE-NEXT: vins.f16 s1, s2
810 ; CHECK-LE-NEXT: lsls r1, r1, #28
811 ; CHECK-LE-NEXT: bmi .LBB18_4
812 ; CHECK-LE-NEXT: b .LBB18_5
814 ; CHECK-BE-LABEL: foo_v4f32_v4f16:
815 ; CHECK-BE: @ %bb.0: @ %entry
816 ; CHECK-BE-NEXT: .save {r7, lr}
817 ; CHECK-BE-NEXT: push {r7, lr}
818 ; CHECK-BE-NEXT: .pad #4
819 ; CHECK-BE-NEXT: sub sp, #4
820 ; CHECK-BE-NEXT: vldrh.s32 q0, [r1]
821 ; CHECK-BE-NEXT: vcmp.s32 gt, q0, zr
822 ; CHECK-BE-NEXT: @ implicit-def: $q0
823 ; CHECK-BE-NEXT: vmrs lr, p0
824 ; CHECK-BE-NEXT: ubfx r1, lr, #12, #1
825 ; CHECK-BE-NEXT: ubfx r3, lr, #8, #1
826 ; CHECK-BE-NEXT: rsb.w r12, r1, #0
827 ; CHECK-BE-NEXT: movs r1, #0
828 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
829 ; CHECK-BE-NEXT: rsbs r3, r3, #0
830 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
831 ; CHECK-BE-NEXT: ubfx r3, lr, #4, #1
832 ; CHECK-BE-NEXT: rsbs r3, r3, #0
833 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
834 ; CHECK-BE-NEXT: and r3, lr, #1
835 ; CHECK-BE-NEXT: rsbs r3, r3, #0
836 ; CHECK-BE-NEXT: bfi r1, r3, #3, #1
837 ; CHECK-BE-NEXT: lsls r3, r1, #28
838 ; CHECK-BE-NEXT: bmi .LBB18_6
839 ; CHECK-BE-NEXT: @ %bb.1: @ %else
840 ; CHECK-BE-NEXT: lsls r3, r1, #29
841 ; CHECK-BE-NEXT: bmi .LBB18_7
842 ; CHECK-BE-NEXT: .LBB18_2: @ %else2
843 ; CHECK-BE-NEXT: lsls r3, r1, #30
844 ; CHECK-BE-NEXT: bmi .LBB18_8
845 ; CHECK-BE-NEXT: .LBB18_3: @ %else5
846 ; CHECK-BE-NEXT: lsls r1, r1, #31
847 ; CHECK-BE-NEXT: beq .LBB18_5
848 ; CHECK-BE-NEXT: .LBB18_4: @ %cond.load7
849 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #6]
850 ; CHECK-BE-NEXT: vins.f16 s1, s2
851 ; CHECK-BE-NEXT: .LBB18_5: @ %else8
852 ; CHECK-BE-NEXT: vmrs r2, p0
853 ; CHECK-BE-NEXT: movs r1, #0
854 ; CHECK-BE-NEXT: vcvtt.f32.f16 s3, s1
855 ; CHECK-BE-NEXT: vcvtb.f32.f16 s2, s1
856 ; CHECK-BE-NEXT: vcvtt.f32.f16 s1, s0
857 ; CHECK-BE-NEXT: vcvtb.f32.f16 s0, s0
858 ; CHECK-BE-NEXT: ubfx r3, r2, #12, #1
859 ; CHECK-BE-NEXT: rsbs r3, r3, #0
860 ; CHECK-BE-NEXT: bfi r1, r3, #0, #1
861 ; CHECK-BE-NEXT: ubfx r3, r2, #8, #1
862 ; CHECK-BE-NEXT: rsbs r3, r3, #0
863 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
864 ; CHECK-BE-NEXT: ubfx r3, r2, #4, #1
865 ; CHECK-BE-NEXT: and r2, r2, #1
866 ; CHECK-BE-NEXT: rsbs r3, r3, #0
867 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
868 ; CHECK-BE-NEXT: rsbs r2, r2, #0
869 ; CHECK-BE-NEXT: bfi r1, r2, #3, #1
870 ; CHECK-BE-NEXT: lsls r2, r1, #28
871 ; CHECK-BE-NEXT: itt mi
872 ; CHECK-BE-NEXT: vmovmi r2, s0
873 ; CHECK-BE-NEXT: strmi r2, [r0]
874 ; CHECK-BE-NEXT: lsls r2, r1, #29
875 ; CHECK-BE-NEXT: itt mi
876 ; CHECK-BE-NEXT: vmovmi r2, s1
877 ; CHECK-BE-NEXT: strmi r2, [r0, #4]
878 ; CHECK-BE-NEXT: lsls r2, r1, #30
879 ; CHECK-BE-NEXT: itt mi
880 ; CHECK-BE-NEXT: vmovmi r2, s2
881 ; CHECK-BE-NEXT: strmi r2, [r0, #8]
882 ; CHECK-BE-NEXT: lsls r1, r1, #31
883 ; CHECK-BE-NEXT: itt ne
884 ; CHECK-BE-NEXT: vmovne r1, s3
885 ; CHECK-BE-NEXT: strne r1, [r0, #12]
886 ; CHECK-BE-NEXT: add sp, #4
887 ; CHECK-BE-NEXT: pop {r7, pc}
888 ; CHECK-BE-NEXT: .LBB18_6: @ %cond.load
889 ; CHECK-BE-NEXT: vldr.16 s0, [r2]
890 ; CHECK-BE-NEXT: lsls r3, r1, #29
891 ; CHECK-BE-NEXT: bpl .LBB18_2
892 ; CHECK-BE-NEXT: .LBB18_7: @ %cond.load1
893 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #2]
894 ; CHECK-BE-NEXT: vins.f16 s0, s2
895 ; CHECK-BE-NEXT: lsls r3, r1, #30
896 ; CHECK-BE-NEXT: bpl .LBB18_3
897 ; CHECK-BE-NEXT: .LBB18_8: @ %cond.load4
898 ; CHECK-BE-NEXT: vldr.16 s1, [r2, #4]
899 ; CHECK-BE-NEXT: vmovx.f16 s2, s0
900 ; CHECK-BE-NEXT: vins.f16 s1, s2
901 ; CHECK-BE-NEXT: lsls r1, r1, #31
902 ; CHECK-BE-NEXT: bne .LBB18_4
903 ; CHECK-BE-NEXT: b .LBB18_5
905 %0 = load <4 x i16>, ptr %mask, align 2
906 %1 = icmp sgt <4 x i16> %0, zeroinitializer
907 %2 = call <4 x half> @llvm.masked.load.v4f16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x half> undef)
908 %3 = fpext <4 x half> %2 to <4 x float>
909 call void @llvm.masked.store.v4f32.p0(<4 x float> %3, ptr %dest, i32 2, <4 x i1> %1)
913 define void @foo_v4f32_v4f16_unaligned(ptr %dest, ptr %mask, ptr %src) {
914 ; CHECK-LE-LABEL: foo_v4f32_v4f16_unaligned:
915 ; CHECK-LE: @ %bb.0: @ %entry
916 ; CHECK-LE-NEXT: .save {r7, lr}
917 ; CHECK-LE-NEXT: push {r7, lr}
918 ; CHECK-LE-NEXT: .pad #4
919 ; CHECK-LE-NEXT: sub sp, #4
920 ; CHECK-LE-NEXT: vldrh.s32 q0, [r1]
921 ; CHECK-LE-NEXT: vcmp.s32 gt, q0, zr
922 ; CHECK-LE-NEXT: @ implicit-def: $q0
923 ; CHECK-LE-NEXT: vmrs lr, p0
924 ; CHECK-LE-NEXT: and r1, lr, #1
925 ; CHECK-LE-NEXT: ubfx r3, lr, #4, #1
926 ; CHECK-LE-NEXT: rsb.w r12, r1, #0
927 ; CHECK-LE-NEXT: movs r1, #0
928 ; CHECK-LE-NEXT: rsbs r3, r3, #0
929 ; CHECK-LE-NEXT: bfi r1, r12, #0, #1
930 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
931 ; CHECK-LE-NEXT: ubfx r3, lr, #8, #1
932 ; CHECK-LE-NEXT: rsbs r3, r3, #0
933 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
934 ; CHECK-LE-NEXT: ubfx r3, lr, #12, #1
935 ; CHECK-LE-NEXT: rsbs r3, r3, #0
936 ; CHECK-LE-NEXT: bfi r1, r3, #3, #1
937 ; CHECK-LE-NEXT: lsls r3, r1, #31
938 ; CHECK-LE-NEXT: bne .LBB19_6
939 ; CHECK-LE-NEXT: @ %bb.1: @ %else
940 ; CHECK-LE-NEXT: lsls r3, r1, #30
941 ; CHECK-LE-NEXT: bmi .LBB19_7
942 ; CHECK-LE-NEXT: .LBB19_2: @ %else2
943 ; CHECK-LE-NEXT: lsls r3, r1, #29
944 ; CHECK-LE-NEXT: bmi .LBB19_8
945 ; CHECK-LE-NEXT: .LBB19_3: @ %else5
946 ; CHECK-LE-NEXT: lsls r1, r1, #28
947 ; CHECK-LE-NEXT: bpl .LBB19_5
948 ; CHECK-LE-NEXT: .LBB19_4: @ %cond.load7
949 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #6]
950 ; CHECK-LE-NEXT: vins.f16 s1, s2
951 ; CHECK-LE-NEXT: .LBB19_5: @ %else8
952 ; CHECK-LE-NEXT: vmrs r2, p0
953 ; CHECK-LE-NEXT: movs r1, #0
954 ; CHECK-LE-NEXT: vcvtt.f32.f16 s3, s1
955 ; CHECK-LE-NEXT: vcvtb.f32.f16 s2, s1
956 ; CHECK-LE-NEXT: vcvtt.f32.f16 s1, s0
957 ; CHECK-LE-NEXT: vcvtb.f32.f16 s0, s0
958 ; CHECK-LE-NEXT: and r3, r2, #1
959 ; CHECK-LE-NEXT: rsbs r3, r3, #0
960 ; CHECK-LE-NEXT: bfi r1, r3, #0, #1
961 ; CHECK-LE-NEXT: ubfx r3, r2, #4, #1
962 ; CHECK-LE-NEXT: rsbs r3, r3, #0
963 ; CHECK-LE-NEXT: bfi r1, r3, #1, #1
964 ; CHECK-LE-NEXT: ubfx r3, r2, #8, #1
965 ; CHECK-LE-NEXT: ubfx r2, r2, #12, #1
966 ; CHECK-LE-NEXT: rsbs r3, r3, #0
967 ; CHECK-LE-NEXT: bfi r1, r3, #2, #1
968 ; CHECK-LE-NEXT: rsbs r2, r2, #0
969 ; CHECK-LE-NEXT: bfi r1, r2, #3, #1
970 ; CHECK-LE-NEXT: lsls r2, r1, #31
971 ; CHECK-LE-NEXT: itt ne
972 ; CHECK-LE-NEXT: vmovne r2, s0
973 ; CHECK-LE-NEXT: strne r2, [r0]
974 ; CHECK-LE-NEXT: lsls r2, r1, #30
975 ; CHECK-LE-NEXT: itt mi
976 ; CHECK-LE-NEXT: vmovmi r2, s1
977 ; CHECK-LE-NEXT: strmi r2, [r0, #4]
978 ; CHECK-LE-NEXT: lsls r2, r1, #29
979 ; CHECK-LE-NEXT: itt mi
980 ; CHECK-LE-NEXT: vmovmi r2, s2
981 ; CHECK-LE-NEXT: strmi r2, [r0, #8]
982 ; CHECK-LE-NEXT: lsls r1, r1, #28
983 ; CHECK-LE-NEXT: itt mi
984 ; CHECK-LE-NEXT: vmovmi r1, s3
985 ; CHECK-LE-NEXT: strmi r1, [r0, #12]
986 ; CHECK-LE-NEXT: add sp, #4
987 ; CHECK-LE-NEXT: pop {r7, pc}
988 ; CHECK-LE-NEXT: .LBB19_6: @ %cond.load
989 ; CHECK-LE-NEXT: vldr.16 s0, [r2]
990 ; CHECK-LE-NEXT: lsls r3, r1, #30
991 ; CHECK-LE-NEXT: bpl .LBB19_2
992 ; CHECK-LE-NEXT: .LBB19_7: @ %cond.load1
993 ; CHECK-LE-NEXT: vldr.16 s2, [r2, #2]
994 ; CHECK-LE-NEXT: vins.f16 s0, s2
995 ; CHECK-LE-NEXT: lsls r3, r1, #29
996 ; CHECK-LE-NEXT: bpl .LBB19_3
997 ; CHECK-LE-NEXT: .LBB19_8: @ %cond.load4
998 ; CHECK-LE-NEXT: vldr.16 s1, [r2, #4]
999 ; CHECK-LE-NEXT: vmovx.f16 s2, s0
1000 ; CHECK-LE-NEXT: vins.f16 s1, s2
1001 ; CHECK-LE-NEXT: lsls r1, r1, #28
1002 ; CHECK-LE-NEXT: bmi .LBB19_4
1003 ; CHECK-LE-NEXT: b .LBB19_5
1005 ; CHECK-BE-LABEL: foo_v4f32_v4f16_unaligned:
1006 ; CHECK-BE: @ %bb.0: @ %entry
1007 ; CHECK-BE-NEXT: .save {r7, lr}
1008 ; CHECK-BE-NEXT: push {r7, lr}
1009 ; CHECK-BE-NEXT: .pad #4
1010 ; CHECK-BE-NEXT: sub sp, #4
1011 ; CHECK-BE-NEXT: vldrh.s32 q0, [r1]
1012 ; CHECK-BE-NEXT: vcmp.s32 gt, q0, zr
1013 ; CHECK-BE-NEXT: @ implicit-def: $q0
1014 ; CHECK-BE-NEXT: vmrs lr, p0
1015 ; CHECK-BE-NEXT: ubfx r1, lr, #12, #1
1016 ; CHECK-BE-NEXT: ubfx r3, lr, #8, #1
1017 ; CHECK-BE-NEXT: rsb.w r12, r1, #0
1018 ; CHECK-BE-NEXT: movs r1, #0
1019 ; CHECK-BE-NEXT: bfi r1, r12, #0, #1
1020 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1021 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
1022 ; CHECK-BE-NEXT: ubfx r3, lr, #4, #1
1023 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1024 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
1025 ; CHECK-BE-NEXT: and r3, lr, #1
1026 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1027 ; CHECK-BE-NEXT: bfi r1, r3, #3, #1
1028 ; CHECK-BE-NEXT: lsls r3, r1, #28
1029 ; CHECK-BE-NEXT: bmi .LBB19_6
1030 ; CHECK-BE-NEXT: @ %bb.1: @ %else
1031 ; CHECK-BE-NEXT: lsls r3, r1, #29
1032 ; CHECK-BE-NEXT: bmi .LBB19_7
1033 ; CHECK-BE-NEXT: .LBB19_2: @ %else2
1034 ; CHECK-BE-NEXT: lsls r3, r1, #30
1035 ; CHECK-BE-NEXT: bmi .LBB19_8
1036 ; CHECK-BE-NEXT: .LBB19_3: @ %else5
1037 ; CHECK-BE-NEXT: lsls r1, r1, #31
1038 ; CHECK-BE-NEXT: beq .LBB19_5
1039 ; CHECK-BE-NEXT: .LBB19_4: @ %cond.load7
1040 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #6]
1041 ; CHECK-BE-NEXT: vins.f16 s1, s2
1042 ; CHECK-BE-NEXT: .LBB19_5: @ %else8
1043 ; CHECK-BE-NEXT: vmrs r2, p0
1044 ; CHECK-BE-NEXT: movs r1, #0
1045 ; CHECK-BE-NEXT: vcvtt.f32.f16 s3, s1
1046 ; CHECK-BE-NEXT: vcvtb.f32.f16 s2, s1
1047 ; CHECK-BE-NEXT: vcvtt.f32.f16 s1, s0
1048 ; CHECK-BE-NEXT: vcvtb.f32.f16 s0, s0
1049 ; CHECK-BE-NEXT: ubfx r3, r2, #12, #1
1050 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1051 ; CHECK-BE-NEXT: bfi r1, r3, #0, #1
1052 ; CHECK-BE-NEXT: ubfx r3, r2, #8, #1
1053 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1054 ; CHECK-BE-NEXT: bfi r1, r3, #1, #1
1055 ; CHECK-BE-NEXT: ubfx r3, r2, #4, #1
1056 ; CHECK-BE-NEXT: and r2, r2, #1
1057 ; CHECK-BE-NEXT: rsbs r3, r3, #0
1058 ; CHECK-BE-NEXT: bfi r1, r3, #2, #1
1059 ; CHECK-BE-NEXT: rsbs r2, r2, #0
1060 ; CHECK-BE-NEXT: bfi r1, r2, #3, #1
1061 ; CHECK-BE-NEXT: lsls r2, r1, #28
1062 ; CHECK-BE-NEXT: itt mi
1063 ; CHECK-BE-NEXT: vmovmi r2, s0
1064 ; CHECK-BE-NEXT: strmi r2, [r0]
1065 ; CHECK-BE-NEXT: lsls r2, r1, #29
1066 ; CHECK-BE-NEXT: itt mi
1067 ; CHECK-BE-NEXT: vmovmi r2, s1
1068 ; CHECK-BE-NEXT: strmi r2, [r0, #4]
1069 ; CHECK-BE-NEXT: lsls r2, r1, #30
1070 ; CHECK-BE-NEXT: itt mi
1071 ; CHECK-BE-NEXT: vmovmi r2, s2
1072 ; CHECK-BE-NEXT: strmi r2, [r0, #8]
1073 ; CHECK-BE-NEXT: lsls r1, r1, #31
1074 ; CHECK-BE-NEXT: itt ne
1075 ; CHECK-BE-NEXT: vmovne r1, s3
1076 ; CHECK-BE-NEXT: strne r1, [r0, #12]
1077 ; CHECK-BE-NEXT: add sp, #4
1078 ; CHECK-BE-NEXT: pop {r7, pc}
1079 ; CHECK-BE-NEXT: .LBB19_6: @ %cond.load
1080 ; CHECK-BE-NEXT: vldr.16 s0, [r2]
1081 ; CHECK-BE-NEXT: lsls r3, r1, #29
1082 ; CHECK-BE-NEXT: bpl .LBB19_2
1083 ; CHECK-BE-NEXT: .LBB19_7: @ %cond.load1
1084 ; CHECK-BE-NEXT: vldr.16 s2, [r2, #2]
1085 ; CHECK-BE-NEXT: vins.f16 s0, s2
1086 ; CHECK-BE-NEXT: lsls r3, r1, #30
1087 ; CHECK-BE-NEXT: bpl .LBB19_3
1088 ; CHECK-BE-NEXT: .LBB19_8: @ %cond.load4
1089 ; CHECK-BE-NEXT: vldr.16 s1, [r2, #4]
1090 ; CHECK-BE-NEXT: vmovx.f16 s2, s0
1091 ; CHECK-BE-NEXT: vins.f16 s1, s2
1092 ; CHECK-BE-NEXT: lsls r1, r1, #31
1093 ; CHECK-BE-NEXT: bne .LBB19_4
1094 ; CHECK-BE-NEXT: b .LBB19_5
1096 %0 = load <4 x i16>, ptr %mask, align 2
1097 %1 = icmp sgt <4 x i16> %0, zeroinitializer
1098 %2 = call <4 x half> @llvm.masked.load.v4f16.p0(ptr %src, i32 2, <4 x i1> %1, <4 x half> undef)
1099 %3 = fpext <4 x half> %2 to <4 x float>
1100 call void @llvm.masked.store.v4f32.p0(<4 x float> %3, ptr %dest, i32 1, <4 x i1> %1)
1104 declare void @llvm.masked.store.v4i32.p0(<4 x i32>, ptr, i32, <4 x i1>)
1105 declare void @llvm.masked.store.v8i16.p0(<8 x i16>, ptr, i32, <8 x i1>)
1106 declare void @llvm.masked.store.v16i8.p0(<16 x i8>, ptr, i32, <16 x i1>)
1107 declare void @llvm.masked.store.v8f16.p0(<8 x half>, ptr, i32, <8 x i1>)
1108 declare void @llvm.masked.store.v4f32.p0(<4 x float>, ptr, i32, <4 x i1>)
1109 declare <16 x i8> @llvm.masked.load.v16i8.p0(ptr, i32, <16 x i1>, <16 x i8>)
1110 declare <8 x i16> @llvm.masked.load.v8i16.p0(ptr, i32, <8 x i1>, <8 x i16>)
1111 declare <2 x i32> @llvm.masked.load.v2i32.p0(ptr, i32, <2 x i1>, <2 x i32>)
1112 declare <4 x i32> @llvm.masked.load.v4i32.p0(ptr, i32, <4 x i1>, <4 x i32>)
1113 declare <4 x float> @llvm.masked.load.v4f32.p0(ptr, i32, <4 x i1>, <4 x float>)
1114 declare <4 x half> @llvm.masked.load.v4f16.p0(ptr, i32, <4 x i1>, <4 x half>)
1115 declare <8 x half> @llvm.masked.load.v8f16.p0(ptr, i32, <8 x i1>, <8 x half>)
1117 declare void @llvm.masked.store.v8i8.p0(<8 x i8>, ptr, i32, <8 x i1>)
1118 declare void @llvm.masked.store.v4i8.p0(<4 x i8>, ptr, i32, <4 x i1>)
1119 declare void @llvm.masked.store.v4i16.p0(<4 x i16>, ptr, i32, <4 x i1>)
1120 declare void @llvm.masked.store.v2i64.p0(<2 x i64>, ptr, i32, <2 x i1>)
1121 declare <4 x i16> @llvm.masked.load.v4i16.p0(ptr, i32, <4 x i1>, <4 x i16>)
1122 declare <4 x i8> @llvm.masked.load.v4i8.p0(ptr, i32, <4 x i1>, <4 x i8>)
1123 declare <8 x i8> @llvm.masked.load.v8i8.p0(ptr, i32, <8 x i1>, <8 x i8>)