1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s
4 define <16 x i32> @no_existing_zext(<16 x i8> %a, <16 x i32> %op) {
5 ; CHECK-LABEL: no_existing_zext:
6 ; CHECK: ; %bb.0: ; %entry
7 ; CHECK-NEXT: movi.16b v5, #10
8 ; CHECK-NEXT: cmhi.16b v0, v0, v5
9 ; CHECK-NEXT: sshll.8h v5, v0, #0
10 ; CHECK-NEXT: sshll2.8h v0, v0, #0
11 ; CHECK-NEXT: sshll2.4s v16, v0, #0
12 ; CHECK-NEXT: sshll.4s v6, v5, #0
13 ; CHECK-NEXT: sshll.4s v7, v0, #0
14 ; CHECK-NEXT: sshll2.4s v5, v5, #0
15 ; CHECK-NEXT: and.16b v4, v4, v16
16 ; CHECK-NEXT: and.16b v0, v1, v6
17 ; CHECK-NEXT: and.16b v1, v2, v5
18 ; CHECK-NEXT: and.16b v2, v3, v7
19 ; CHECK-NEXT: mov.16b v3, v4
22 %cmp = icmp ugt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
23 %sel = select <16 x i1> %cmp, <16 x i32> %op, <16 x i32> zeroinitializer
27 define <16 x i32> @second_compare_operand_not_splat(<16 x i8> %a, <16 x i8> %b) {
28 ; CHECK-LABEL: second_compare_operand_not_splat:
29 ; CHECK: ; %bb.0: ; %entry
30 ; CHECK-NEXT: cmgt.16b v1, v0, v1
31 ; CHECK-NEXT: ushll.8h v2, v0, #0
32 ; CHECK-NEXT: ushll2.8h v0, v0, #0
33 ; CHECK-NEXT: sshll.8h v3, v1, #0
34 ; CHECK-NEXT: sshll2.8h v1, v1, #0
35 ; CHECK-NEXT: ushll.4s v4, v2, #0
36 ; CHECK-NEXT: ushll.4s v5, v0, #0
37 ; CHECK-NEXT: ushll2.4s v2, v2, #0
38 ; CHECK-NEXT: ushll2.4s v6, v0, #0
39 ; CHECK-NEXT: sshll.4s v0, v3, #0
40 ; CHECK-NEXT: sshll.4s v7, v1, #0
41 ; CHECK-NEXT: sshll2.4s v16, v3, #0
42 ; CHECK-NEXT: sshll2.4s v1, v1, #0
43 ; CHECK-NEXT: and.16b v0, v4, v0
44 ; CHECK-NEXT: and.16b v3, v6, v1
45 ; CHECK-NEXT: and.16b v1, v2, v16
46 ; CHECK-NEXT: and.16b v2, v5, v7
49 %ext = zext <16 x i8> %a to <16 x i32>
50 %cmp = icmp sgt <16 x i8> %a, %b
51 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
55 define <16 x i32> @same_zext_used_in_cmp_signed_pred_and_select(<16 x i8> %a) {
56 ; CHECK-LABEL: same_zext_used_in_cmp_signed_pred_and_select:
57 ; CHECK: ; %bb.0: ; %entry
58 ; CHECK-NEXT: movi.16b v1, #10
59 ; CHECK-NEXT: ushll.8h v2, v0, #0
60 ; CHECK-NEXT: ushll.4s v4, v2, #0
61 ; CHECK-NEXT: ushll2.4s v2, v2, #0
62 ; CHECK-NEXT: cmgt.16b v1, v0, v1
63 ; CHECK-NEXT: ushll2.8h v0, v0, #0
64 ; CHECK-NEXT: sshll.8h v3, v1, #0
65 ; CHECK-NEXT: sshll2.8h v1, v1, #0
66 ; CHECK-NEXT: ushll.4s v5, v0, #0
67 ; CHECK-NEXT: ushll2.4s v6, v0, #0
68 ; CHECK-NEXT: sshll.4s v0, v3, #0
69 ; CHECK-NEXT: sshll.4s v7, v1, #0
70 ; CHECK-NEXT: sshll2.4s v16, v3, #0
71 ; CHECK-NEXT: sshll2.4s v1, v1, #0
72 ; CHECK-NEXT: and.16b v0, v4, v0
73 ; CHECK-NEXT: and.16b v3, v6, v1
74 ; CHECK-NEXT: and.16b v1, v2, v16
75 ; CHECK-NEXT: and.16b v2, v5, v7
78 %ext = zext <16 x i8> %a to <16 x i32>
79 %cmp = icmp sgt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
80 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
84 define <8 x i64> @same_zext_used_in_cmp_unsigned_pred_and_select_v8i64(<8 x i8> %a) {
85 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v8i64:
87 ; CHECK-NEXT: ushll.8h v0, v0, #0
88 ; CHECK-NEXT: mov w8, #10 ; =0xa
89 ; CHECK-NEXT: dup.2d v2, x8
90 ; CHECK-NEXT: ushll.4s v1, v0, #0
91 ; CHECK-NEXT: ushll2.4s v0, v0, #0
92 ; CHECK-NEXT: ushll.2d v3, v1, #0
93 ; CHECK-NEXT: ushll2.2d v4, v0, #0
94 ; CHECK-NEXT: ushll2.2d v1, v1, #0
95 ; CHECK-NEXT: ushll.2d v5, v0, #0
96 ; CHECK-NEXT: cmhi.2d v0, v3, v2
97 ; CHECK-NEXT: cmhi.2d v7, v1, v2
98 ; CHECK-NEXT: cmhi.2d v6, v5, v2
99 ; CHECK-NEXT: cmhi.2d v2, v4, v2
100 ; CHECK-NEXT: and.16b v0, v3, v0
101 ; CHECK-NEXT: and.16b v1, v1, v7
102 ; CHECK-NEXT: and.16b v3, v4, v2
103 ; CHECK-NEXT: and.16b v2, v5, v6
105 %ext = zext <8 x i8> %a to <8 x i64>
106 %cmp = icmp ugt <8 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
107 %sel = select <8 x i1> %cmp, <8 x i64> %ext, <8 x i64> zeroinitializer
112 define <16 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v16i32(<16 x i8> %a) {
113 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v16i32:
115 ; CHECK-NEXT: ushll.8h v2, v0, #0
116 ; CHECK-NEXT: ushll2.8h v0, v0, #0
117 ; CHECK-NEXT: movi.4s v1, #10
118 ; CHECK-NEXT: ushll.4s v3, v2, #0
119 ; CHECK-NEXT: ushll2.4s v4, v0, #0
120 ; CHECK-NEXT: ushll2.4s v2, v2, #0
121 ; CHECK-NEXT: ushll.4s v5, v0, #0
122 ; CHECK-NEXT: cmhi.4s v0, v3, v1
123 ; CHECK-NEXT: cmhi.4s v7, v2, v1
124 ; CHECK-NEXT: cmhi.4s v6, v5, v1
125 ; CHECK-NEXT: cmhi.4s v1, v4, v1
126 ; CHECK-NEXT: and.16b v0, v3, v0
127 ; CHECK-NEXT: and.16b v3, v4, v1
128 ; CHECK-NEXT: and.16b v1, v2, v7
129 ; CHECK-NEXT: and.16b v2, v5, v6
131 %ext = zext <16 x i8> %a to <16 x i32>
132 %cmp = icmp ugt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
133 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
137 define <8 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v8i32(<8 x i8> %a) {
138 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v8i32:
140 ; CHECK-NEXT: ushll.8h v0, v0, #0
141 ; CHECK-NEXT: movi.4s v1, #10
142 ; CHECK-NEXT: ushll2.4s v2, v0, #0
143 ; CHECK-NEXT: ushll.4s v0, v0, #0
144 ; CHECK-NEXT: cmhi.4s v3, v0, v1
145 ; CHECK-NEXT: cmhi.4s v1, v2, v1
146 ; CHECK-NEXT: and.16b v1, v2, v1
147 ; CHECK-NEXT: and.16b v0, v0, v3
149 %ext = zext <8 x i8> %a to <8 x i32>
150 %cmp = icmp ugt <8 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
151 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
155 define <8 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v8i32_2(<8 x i16> %a) {
156 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v8i32_2:
158 ; CHECK-NEXT: movi.4s v1, #10
159 ; CHECK-NEXT: ushll2.4s v2, v0, #0
160 ; CHECK-NEXT: ushll.4s v0, v0, #0
161 ; CHECK-NEXT: cmhi.4s v3, v0, v1
162 ; CHECK-NEXT: cmhi.4s v1, v2, v1
163 ; CHECK-NEXT: and.16b v1, v2, v1
164 ; CHECK-NEXT: and.16b v0, v0, v3
166 %ext = zext <8 x i16> %a to <8 x i32>
167 %cmp = icmp ugt <8 x i16> %a, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
168 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
173 define <8 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v8i32_from_v8i15(<8 x i15> %a) {
174 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v8i32_from_v8i15:
176 ; CHECK-NEXT: bic.8h v0, #128, lsl #8
177 ; CHECK-NEXT: movi.4s v1, #10
178 ; CHECK-NEXT: ushll2.4s v2, v0, #0
179 ; CHECK-NEXT: ushll.4s v0, v0, #0
180 ; CHECK-NEXT: cmhi.4s v3, v0, v1
181 ; CHECK-NEXT: cmhi.4s v1, v2, v1
182 ; CHECK-NEXT: and.16b v1, v2, v1
183 ; CHECK-NEXT: and.16b v0, v0, v3
185 %ext = zext <8 x i15> %a to <8 x i32>
186 %cmp = icmp ugt <8 x i15> %a, <i15 10, i15 10, i15 10, i15 10, i15 10, i15 10, i15 10, i15 10>
187 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
191 define <7 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v7i32(<7 x i16> %a) {
192 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v7i32:
194 ; CHECK-NEXT: movi.8h v1, #10
195 ; CHECK-NEXT: ushll.4s v2, v0, #0
196 ; CHECK-NEXT: cmhi.8h v1, v0, v1
197 ; CHECK-NEXT: ushll2.4s v0, v0, #0
198 ; CHECK-NEXT: sshll.4s v3, v1, #0
199 ; CHECK-NEXT: sshll2.4s v1, v1, #0
200 ; CHECK-NEXT: and.16b v2, v2, v3
201 ; CHECK-NEXT: and.16b v0, v0, v1
202 ; CHECK-NEXT: mov.s w1, v2[1]
203 ; CHECK-NEXT: mov.s w2, v2[2]
204 ; CHECK-NEXT: mov.s w3, v2[3]
205 ; CHECK-NEXT: mov.s w5, v0[1]
206 ; CHECK-NEXT: mov.s w6, v0[2]
207 ; CHECK-NEXT: fmov w0, s2
208 ; CHECK-NEXT: fmov w4, s0
210 %ext = zext <7 x i16> %a to <7 x i32>
211 %cmp = icmp ugt <7 x i16> %a, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
212 %sel = select <7 x i1> %cmp, <7 x i32> %ext, <7 x i32> zeroinitializer
216 define <3 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v3i16(<3 x i8> %a) {
217 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v3i16:
219 ; CHECK-NEXT: fmov s0, w0
221 ; CHECK-NEXT: adrp x8, lCPI9_0@PAGE
223 ; CHECK-NEXT: ldr d2, [x8, lCPI9_0@PAGEOFF]
224 ; CHECK-NEXT: mov.h v0[1], w1
225 ; CHECK-NEXT: mov.h v0[2], w2
226 ; CHECK-NEXT: fmov d1, d0
227 ; CHECK-NEXT: bic.4h v1, #255, lsl #8
228 ; CHECK-NEXT: cmhi.4h v1, v1, v2
229 ; CHECK-NEXT: and.8b v0, v0, v1
230 ; CHECK-NEXT: movi.2d v1, #0x0000ff000000ff
231 ; CHECK-NEXT: ushll.4s v0, v0, #0
232 ; CHECK-NEXT: and.16b v0, v0, v1
234 ; CHECK-NEXT: .loh AdrpLdr Lloh0, Lloh1
235 %ext = zext <3 x i8> %a to <3 x i32>
236 %cmp = icmp ugt <3 x i8> %a, <i8 10, i8 10, i8 10>
237 %sel = select <3 x i1> %cmp, <3 x i32> %ext, <3 x i32> zeroinitializer
241 define <4 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v4i32(<4 x i16> %a) {
242 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v4i32:
244 ; CHECK-NEXT: movi.4s v1, #10
245 ; CHECK-NEXT: ushll.4s v0, v0, #0
246 ; CHECK-NEXT: cmhi.4s v1, v0, v1
247 ; CHECK-NEXT: and.16b v0, v0, v1
249 %ext = zext <4 x i16> %a to <4 x i32>
250 %cmp = icmp ugt <4 x i16> %a, <i16 10, i16 10, i16 10, i16 10>
251 %sel = select <4 x i1> %cmp, <4 x i32> %ext, <4 x i32> zeroinitializer
255 define <2 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_v2i32(<2 x i16> %a) {
256 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_v2i32:
258 ; CHECK-NEXT: movi d1, #0x00ffff0000ffff
259 ; CHECK-NEXT: movi.2s v2, #10
260 ; CHECK-NEXT: and.8b v0, v0, v1
261 ; CHECK-NEXT: cmhi.2s v1, v0, v2
262 ; CHECK-NEXT: and.8b v0, v0, v1
264 %ext = zext <2 x i16> %a to <2 x i32>
265 %cmp = icmp ugt <2 x i16> %a, <i16 10, i16 10>
266 %sel = select <2 x i1> %cmp, <2 x i32> %ext, <2 x i32> zeroinitializer
270 define <8 x i32> @same_zext_used_in_cmp_eq_and_select_v8i32(<8 x i16> %a) {
271 ; CHECK-LABEL: same_zext_used_in_cmp_eq_and_select_v8i32:
273 ; CHECK-NEXT: movi.4s v1, #10
274 ; CHECK-NEXT: ushll2.4s v2, v0, #0
275 ; CHECK-NEXT: ushll.4s v0, v0, #0
276 ; CHECK-NEXT: cmeq.4s v3, v0, v1
277 ; CHECK-NEXT: cmeq.4s v1, v2, v1
278 ; CHECK-NEXT: and.16b v1, v2, v1
279 ; CHECK-NEXT: and.16b v0, v0, v3
281 %ext = zext <8 x i16> %a to <8 x i32>
282 %cmp = icmp eq <8 x i16> %a, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
283 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
287 define <8 x i32> @same_zext_used_in_cmp_eq_and_select_v8i32_from_v8i13(<8 x i13> %a) {
288 ; CHECK-LABEL: same_zext_used_in_cmp_eq_and_select_v8i32_from_v8i13:
290 ; CHECK-NEXT: bic.8h v0, #224, lsl #8
291 ; CHECK-NEXT: movi.4s v1, #10
292 ; CHECK-NEXT: ushll2.4s v2, v0, #0
293 ; CHECK-NEXT: ushll.4s v0, v0, #0
294 ; CHECK-NEXT: cmeq.4s v3, v0, v1
295 ; CHECK-NEXT: cmeq.4s v1, v2, v1
296 ; CHECK-NEXT: and.16b v1, v2, v1
297 ; CHECK-NEXT: and.16b v0, v0, v3
299 %ext = zext <8 x i13> %a to <8 x i32>
300 %cmp = icmp eq <8 x i13> %a, <i13 10, i13 10, i13 10, i13 10, i13 10, i13 10, i13 10, i13 10>
301 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
305 define <16 x i32> @same_zext_used_in_cmp_ne_and_select_v8i32(<16 x i8> %a) {
306 ; CHECK-LABEL: same_zext_used_in_cmp_ne_and_select_v8i32:
308 ; CHECK-NEXT: ushll.8h v2, v0, #0
309 ; CHECK-NEXT: ushll2.8h v0, v0, #0
310 ; CHECK-NEXT: movi.4s v1, #10
311 ; CHECK-NEXT: ushll.4s v3, v2, #0
312 ; CHECK-NEXT: ushll2.4s v4, v0, #0
313 ; CHECK-NEXT: ushll2.4s v2, v2, #0
314 ; CHECK-NEXT: ushll.4s v5, v0, #0
315 ; CHECK-NEXT: cmeq.4s v0, v3, v1
316 ; CHECK-NEXT: cmeq.4s v7, v2, v1
317 ; CHECK-NEXT: cmeq.4s v6, v5, v1
318 ; CHECK-NEXT: cmeq.4s v1, v4, v1
319 ; CHECK-NEXT: bic.16b v0, v3, v0
320 ; CHECK-NEXT: bic.16b v3, v4, v1
321 ; CHECK-NEXT: bic.16b v1, v2, v7
322 ; CHECK-NEXT: bic.16b v2, v5, v6
324 %ext = zext <16 x i8> %a to <16 x i32>
325 %cmp = icmp ne <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
326 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
330 ; A variation of @same_zext_used_in_cmp_unsigned_pred_and_select, with with
331 ; multiple users of the compare.
332 define <16 x i32> @same_zext_used_in_cmp_unsigned_pred_and_select_other_use(<16 x i8> %a, <16 x i64> %v, ptr %ptr) {
333 ; CHECK-LABEL: same_zext_used_in_cmp_unsigned_pred_and_select_other_use:
334 ; CHECK: ; %bb.0: ; %entry
335 ; CHECK-NEXT: movi.16b v16, #10
336 ; CHECK-NEXT: ushll.8h v19, v0, #0
337 ; CHECK-NEXT: ldr q21, [sp]
338 ; CHECK-NEXT: ushll.4s v24, v19, #0
339 ; CHECK-NEXT: ushll2.4s v19, v19, #0
340 ; CHECK-NEXT: cmhi.16b v16, v0, v16
341 ; CHECK-NEXT: ushll2.8h v0, v0, #0
342 ; CHECK-NEXT: sshll2.8h v17, v16, #0
343 ; CHECK-NEXT: sshll.8h v16, v16, #0
344 ; CHECK-NEXT: ushll.4s v25, v0, #0
345 ; CHECK-NEXT: ushll2.4s v0, v0, #0
346 ; CHECK-NEXT: sshll2.4s v18, v17, #0
347 ; CHECK-NEXT: sshll.4s v17, v17, #0
348 ; CHECK-NEXT: sshll2.4s v22, v16, #0
349 ; CHECK-NEXT: sshll.4s v16, v16, #0
350 ; CHECK-NEXT: sshll2.2d v20, v18, #0
351 ; CHECK-NEXT: sshll.2d v23, v18, #0
352 ; CHECK-NEXT: sshll2.2d v26, v17, #0
353 ; CHECK-NEXT: sshll.2d v27, v17, #0
354 ; CHECK-NEXT: and.16b v20, v21, v20
355 ; CHECK-NEXT: sshll2.2d v21, v22, #0
356 ; CHECK-NEXT: and.16b v7, v7, v23
357 ; CHECK-NEXT: sshll.2d v23, v22, #0
358 ; CHECK-NEXT: and.16b v6, v6, v26
359 ; CHECK-NEXT: sshll2.2d v26, v16, #0
360 ; CHECK-NEXT: and.16b v5, v5, v27
361 ; CHECK-NEXT: stp q7, q20, [x0, #96]
362 ; CHECK-NEXT: sshll.2d v20, v16, #0
363 ; CHECK-NEXT: and.16b v21, v4, v21
364 ; CHECK-NEXT: and.16b v4, v0, v18
365 ; CHECK-NEXT: and.16b v7, v3, v23
366 ; CHECK-NEXT: and.16b v3, v19, v22
367 ; CHECK-NEXT: stp q5, q6, [x0, #64]
368 ; CHECK-NEXT: and.16b v0, v24, v16
369 ; CHECK-NEXT: and.16b v6, v2, v26
370 ; CHECK-NEXT: and.16b v2, v25, v17
371 ; CHECK-NEXT: and.16b v5, v1, v20
372 ; CHECK-NEXT: mov.16b v1, v3
373 ; CHECK-NEXT: mov.16b v3, v4
374 ; CHECK-NEXT: stp q7, q21, [x0, #32]
375 ; CHECK-NEXT: stp q5, q6, [x0]
378 %ext = zext <16 x i8> %a to <16 x i32>
379 %cmp = icmp ugt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
380 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
381 %sel.2 = select <16 x i1> %cmp, <16 x i64> %v, <16 x i64> zeroinitializer
382 store <16 x i64> %sel.2, ptr %ptr
386 define <16 x i32> @same_sext_used_in_cmp_signed_pred_and_select_v16i32(<16 x i8> %a) {
387 ; CHECK-LABEL: same_sext_used_in_cmp_signed_pred_and_select_v16i32:
388 ; CHECK: ; %bb.0: ; %entry
389 ; CHECK-NEXT: sshll.8h v2, v0, #0
390 ; CHECK-NEXT: sshll2.8h v0, v0, #0
391 ; CHECK-NEXT: movi.4s v1, #10
392 ; CHECK-NEXT: sshll.4s v3, v2, #0
393 ; CHECK-NEXT: sshll2.4s v4, v0, #0
394 ; CHECK-NEXT: sshll2.4s v2, v2, #0
395 ; CHECK-NEXT: sshll.4s v5, v0, #0
396 ; CHECK-NEXT: cmgt.4s v0, v3, v1
397 ; CHECK-NEXT: cmgt.4s v7, v2, v1
398 ; CHECK-NEXT: cmgt.4s v6, v5, v1
399 ; CHECK-NEXT: cmgt.4s v1, v4, v1
400 ; CHECK-NEXT: and.16b v0, v3, v0
401 ; CHECK-NEXT: and.16b v3, v4, v1
402 ; CHECK-NEXT: and.16b v1, v2, v7
403 ; CHECK-NEXT: and.16b v2, v5, v6
406 %ext = sext <16 x i8> %a to <16 x i32>
407 %cmp = icmp sgt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
408 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
412 define <8 x i32> @same_sext_used_in_cmp_eq_and_select_v8i32(<8 x i16> %a) {
413 ; CHECK-LABEL: same_sext_used_in_cmp_eq_and_select_v8i32:
415 ; CHECK-NEXT: movi.4s v1, #10
416 ; CHECK-NEXT: sshll2.4s v2, v0, #0
417 ; CHECK-NEXT: sshll.4s v0, v0, #0
418 ; CHECK-NEXT: cmeq.4s v3, v0, v1
419 ; CHECK-NEXT: cmeq.4s v1, v2, v1
420 ; CHECK-NEXT: and.16b v1, v2, v1
421 ; CHECK-NEXT: and.16b v0, v0, v3
423 %ext = sext <8 x i16> %a to <8 x i32>
424 %cmp = icmp eq <8 x i16> %a, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
425 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
429 define <8 x i32> @same_sext_used_in_cmp_eq_and_select_v8i32_from_v8i13(<8 x i13> %a) {
430 ; CHECK-LABEL: same_sext_used_in_cmp_eq_and_select_v8i32_from_v8i13:
432 ; CHECK-NEXT: ushll.4s v2, v0, #0
433 ; CHECK-NEXT: ushll2.4s v0, v0, #0
434 ; CHECK-NEXT: movi.4s v1, #10
435 ; CHECK-NEXT: shl.4s v0, v0, #19
436 ; CHECK-NEXT: shl.4s v2, v2, #19
437 ; CHECK-NEXT: sshr.4s v0, v0, #19
438 ; CHECK-NEXT: sshr.4s v2, v2, #19
439 ; CHECK-NEXT: cmeq.4s v3, v2, v1
440 ; CHECK-NEXT: cmeq.4s v1, v0, v1
441 ; CHECK-NEXT: and.16b v1, v0, v1
442 ; CHECK-NEXT: and.16b v0, v2, v3
444 %ext = sext <8 x i13> %a to <8 x i32>
445 %cmp = icmp eq <8 x i13> %a, <i13 10, i13 10, i13 10, i13 10, i13 10, i13 10, i13 10, i13 10>
446 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
450 define <16 x i32> @same_sext_used_in_cmp_ne_and_select_v8i32(<16 x i8> %a) {
451 ; CHECK-LABEL: same_sext_used_in_cmp_ne_and_select_v8i32:
453 ; CHECK-NEXT: sshll.8h v2, v0, #0
454 ; CHECK-NEXT: sshll2.8h v0, v0, #0
455 ; CHECK-NEXT: movi.4s v1, #10
456 ; CHECK-NEXT: sshll.4s v3, v2, #0
457 ; CHECK-NEXT: sshll2.4s v4, v0, #0
458 ; CHECK-NEXT: sshll2.4s v2, v2, #0
459 ; CHECK-NEXT: sshll.4s v5, v0, #0
460 ; CHECK-NEXT: cmeq.4s v0, v3, v1
461 ; CHECK-NEXT: cmeq.4s v7, v2, v1
462 ; CHECK-NEXT: cmeq.4s v6, v5, v1
463 ; CHECK-NEXT: cmeq.4s v1, v4, v1
464 ; CHECK-NEXT: bic.16b v0, v3, v0
465 ; CHECK-NEXT: bic.16b v3, v4, v1
466 ; CHECK-NEXT: bic.16b v1, v2, v7
467 ; CHECK-NEXT: bic.16b v2, v5, v6
469 %ext = sext <16 x i8> %a to <16 x i32>
470 %cmp = icmp ne <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
471 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
475 define <8 x i32> @same_sext_used_in_cmp_signed_pred_and_select_v8i32(<8 x i16> %a) {
476 ; CHECK-LABEL: same_sext_used_in_cmp_signed_pred_and_select_v8i32:
477 ; CHECK: ; %bb.0: ; %entry
478 ; CHECK-NEXT: movi.4s v1, #10
479 ; CHECK-NEXT: sshll2.4s v2, v0, #0
480 ; CHECK-NEXT: sshll.4s v0, v0, #0
481 ; CHECK-NEXT: cmgt.4s v3, v0, v1
482 ; CHECK-NEXT: cmgt.4s v1, v2, v1
483 ; CHECK-NEXT: and.16b v1, v2, v1
484 ; CHECK-NEXT: and.16b v0, v0, v3
487 %ext = sext <8 x i16> %a to <8 x i32>
488 %cmp = icmp sgt <8 x i16> %a, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
489 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
493 define <8 x i32> @same_sext_used_in_cmp_unsigned_pred_and_select_v8i32_from_v8i15(<8 x i15> %a) {
494 ; CHECK-LABEL: same_sext_used_in_cmp_unsigned_pred_and_select_v8i32_from_v8i15:
496 ; CHECK-NEXT: ushll.4s v2, v0, #0
497 ; CHECK-NEXT: ushll2.4s v0, v0, #0
498 ; CHECK-NEXT: movi.4s v1, #10
499 ; CHECK-NEXT: shl.4s v0, v0, #17
500 ; CHECK-NEXT: shl.4s v2, v2, #17
501 ; CHECK-NEXT: sshr.4s v0, v0, #17
502 ; CHECK-NEXT: sshr.4s v2, v2, #17
503 ; CHECK-NEXT: cmge.4s v3, v2, v1
504 ; CHECK-NEXT: cmge.4s v1, v0, v1
505 ; CHECK-NEXT: and.16b v1, v0, v1
506 ; CHECK-NEXT: and.16b v0, v2, v3
508 %ext = sext <8 x i15> %a to <8 x i32>
509 %cmp = icmp sge <8 x i15> %a, <i15 10, i15 10, i15 10, i15 10, i15 10, i15 10, i15 10, i15 10>
510 %sel = select <8 x i1> %cmp, <8 x i32> %ext, <8 x i32> zeroinitializer
514 define <16 x i32> @same_sext_used_in_cmp_unsigned_pred_and_select(<16 x i8> %a) {
515 ; CHECK-LABEL: same_sext_used_in_cmp_unsigned_pred_and_select:
516 ; CHECK: ; %bb.0: ; %entry
517 ; CHECK-NEXT: movi.16b v1, #10
518 ; CHECK-NEXT: sshll.8h v2, v0, #0
519 ; CHECK-NEXT: ext.16b v4, v2, v2, #8
520 ; CHECK-NEXT: cmhi.16b v1, v0, v1
521 ; CHECK-NEXT: sshll2.8h v0, v0, #0
522 ; CHECK-NEXT: sshll.8h v3, v1, #0
523 ; CHECK-NEXT: sshll2.8h v1, v1, #0
524 ; CHECK-NEXT: ext.16b v5, v0, v0, #8
525 ; CHECK-NEXT: ext.16b v6, v3, v3, #8
526 ; CHECK-NEXT: ext.16b v7, v1, v1, #8
527 ; CHECK-NEXT: and.8b v2, v2, v3
528 ; CHECK-NEXT: and.8b v1, v0, v1
529 ; CHECK-NEXT: sshll.4s v0, v2, #0
530 ; CHECK-NEXT: and.8b v3, v5, v7
531 ; CHECK-NEXT: and.8b v4, v4, v6
532 ; CHECK-NEXT: sshll.4s v2, v1, #0
533 ; CHECK-NEXT: sshll.4s v3, v3, #0
534 ; CHECK-NEXT: sshll.4s v1, v4, #0
537 %ext = sext <16 x i8> %a to <16 x i32>
538 %cmp = icmp ugt <16 x i8> %a, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
539 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
543 define <16 x i32> @same_zext_used_in_cmp_signed_pred_and_select_can_convert_to_unsigned_pred(<16 x i8> %a) {
544 ; CHECK-LABEL: same_zext_used_in_cmp_signed_pred_and_select_can_convert_to_unsigned_pred:
545 ; CHECK: ; %bb.0: ; %entry
546 ; CHECK-NEXT: movi.2d v1, #0xffffffffffffffff
547 ; CHECK-NEXT: ushll.8h v2, v0, #0
548 ; CHECK-NEXT: ushll.4s v4, v2, #0
549 ; CHECK-NEXT: ushll2.4s v2, v2, #0
550 ; CHECK-NEXT: cmgt.16b v1, v0, v1
551 ; CHECK-NEXT: ushll2.8h v0, v0, #0
552 ; CHECK-NEXT: sshll.8h v3, v1, #0
553 ; CHECK-NEXT: sshll2.8h v1, v1, #0
554 ; CHECK-NEXT: ushll.4s v5, v0, #0
555 ; CHECK-NEXT: ushll2.4s v6, v0, #0
556 ; CHECK-NEXT: sshll.4s v0, v3, #0
557 ; CHECK-NEXT: sshll.4s v7, v1, #0
558 ; CHECK-NEXT: sshll2.4s v16, v3, #0
559 ; CHECK-NEXT: sshll2.4s v1, v1, #0
560 ; CHECK-NEXT: and.16b v0, v4, v0
561 ; CHECK-NEXT: and.16b v3, v6, v1
562 ; CHECK-NEXT: and.16b v1, v2, v16
563 ; CHECK-NEXT: and.16b v2, v5, v7
566 %ext = zext <16 x i8> %a to <16 x i32>
567 %cmp = icmp sgt <16 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
568 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
572 define void @extension_in_loop_v16i8_to_v16i32(ptr %src, ptr %dst) {
573 ; CHECK-LABEL: extension_in_loop_v16i8_to_v16i32:
574 ; CHECK: ; %bb.0: ; %entry
576 ; CHECK-NEXT: adrp x8, lCPI24_0@PAGE
577 ; CHECK-NEXT: movi.2d v0, #0xffffffffffffffff
579 ; CHECK-NEXT: adrp x9, lCPI24_2@PAGE
581 ; CHECK-NEXT: ldr q1, [x8, lCPI24_0@PAGEOFF]
583 ; CHECK-NEXT: adrp x8, lCPI24_1@PAGE
585 ; CHECK-NEXT: adrp x10, lCPI24_3@PAGE
587 ; CHECK-NEXT: ldr q2, [x8, lCPI24_1@PAGEOFF]
589 ; CHECK-NEXT: ldr q3, [x9, lCPI24_2@PAGEOFF]
591 ; CHECK-NEXT: ldr q4, [x10, lCPI24_3@PAGEOFF]
592 ; CHECK-NEXT: mov x8, xzr
593 ; CHECK-NEXT: LBB24_1: ; %loop
594 ; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1
595 ; CHECK-NEXT: ldr q5, [x0, x8]
596 ; CHECK-NEXT: add x8, x8, #16
597 ; CHECK-NEXT: cmp x8, #128
598 ; CHECK-NEXT: cmgt.16b v6, v5, v0
599 ; CHECK-NEXT: tbl.16b v16, { v5 }, v1
600 ; CHECK-NEXT: tbl.16b v17, { v5 }, v2
601 ; CHECK-NEXT: tbl.16b v19, { v5 }, v3
602 ; CHECK-NEXT: tbl.16b v5, { v5 }, v4
603 ; CHECK-NEXT: sshll2.8h v7, v6, #0
604 ; CHECK-NEXT: sshll.8h v6, v6, #0
605 ; CHECK-NEXT: sshll2.4s v18, v7, #0
606 ; CHECK-NEXT: sshll.4s v7, v7, #0
607 ; CHECK-NEXT: sshll2.4s v20, v6, #0
608 ; CHECK-NEXT: sshll.4s v6, v6, #0
609 ; CHECK-NEXT: and.16b v16, v16, v18
610 ; CHECK-NEXT: and.16b v7, v17, v7
611 ; CHECK-NEXT: and.16b v17, v19, v20
612 ; CHECK-NEXT: and.16b v5, v5, v6
613 ; CHECK-NEXT: stp q7, q16, [x1, #32]
614 ; CHECK-NEXT: stp q5, q17, [x1], #64
615 ; CHECK-NEXT: b.ne LBB24_1
616 ; CHECK-NEXT: ; %bb.2: ; %exit
618 ; CHECK-NEXT: .loh AdrpLdr Lloh6, Lloh9
619 ; CHECK-NEXT: .loh AdrpLdr Lloh5, Lloh7
620 ; CHECK-NEXT: .loh AdrpLdr Lloh3, Lloh8
621 ; CHECK-NEXT: .loh AdrpAdrp Lloh2, Lloh5
622 ; CHECK-NEXT: .loh AdrpLdr Lloh2, Lloh4
627 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
628 %src.gep = getelementptr i8, ptr %src, i64 %iv
629 %load = load <16 x i8>, ptr %src.gep
630 %cmp = icmp sgt <16 x i8> %load, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
631 %ext = zext <16 x i8> %load to <16 x i32>
632 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
633 %dst.gep = getelementptr i32, ptr %dst, i64 %iv
634 store <16 x i32> %sel, ptr %dst.gep
635 %iv.next = add nuw i64 %iv, 16
636 %ec = icmp eq i64 %iv.next, 128
637 br i1 %ec, label %exit, label %loop
643 define void @extension_in_loop_as_shuffle_v16i8_to_v16i32(ptr %src, ptr %dst) {
644 ; CHECK-LABEL: extension_in_loop_as_shuffle_v16i8_to_v16i32:
645 ; CHECK: ; %bb.0: ; %entry
646 ; CHECK-NEXT: Lloh10:
647 ; CHECK-NEXT: adrp x8, lCPI25_0@PAGE
648 ; CHECK-NEXT: movi.2d v0, #0xffffffffffffffff
649 ; CHECK-NEXT: Lloh11:
650 ; CHECK-NEXT: adrp x9, lCPI25_2@PAGE
651 ; CHECK-NEXT: Lloh12:
652 ; CHECK-NEXT: ldr q1, [x8, lCPI25_0@PAGEOFF]
653 ; CHECK-NEXT: Lloh13:
654 ; CHECK-NEXT: adrp x8, lCPI25_1@PAGE
655 ; CHECK-NEXT: Lloh14:
656 ; CHECK-NEXT: adrp x10, lCPI25_3@PAGE
657 ; CHECK-NEXT: Lloh15:
658 ; CHECK-NEXT: ldr q2, [x8, lCPI25_1@PAGEOFF]
659 ; CHECK-NEXT: Lloh16:
660 ; CHECK-NEXT: ldr q3, [x9, lCPI25_2@PAGEOFF]
661 ; CHECK-NEXT: Lloh17:
662 ; CHECK-NEXT: ldr q4, [x10, lCPI25_3@PAGEOFF]
663 ; CHECK-NEXT: mov x8, xzr
664 ; CHECK-NEXT: LBB25_1: ; %loop
665 ; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1
666 ; CHECK-NEXT: ldr q5, [x0, x8]
667 ; CHECK-NEXT: add x8, x8, #16
668 ; CHECK-NEXT: cmp x8, #128
669 ; CHECK-NEXT: cmgt.16b v6, v5, v0
670 ; CHECK-NEXT: tbl.16b v16, { v5 }, v1
671 ; CHECK-NEXT: tbl.16b v17, { v5 }, v2
672 ; CHECK-NEXT: tbl.16b v19, { v5 }, v3
673 ; CHECK-NEXT: tbl.16b v5, { v5 }, v4
674 ; CHECK-NEXT: sshll2.8h v7, v6, #0
675 ; CHECK-NEXT: sshll.8h v6, v6, #0
676 ; CHECK-NEXT: sshll2.4s v18, v7, #0
677 ; CHECK-NEXT: sshll.4s v7, v7, #0
678 ; CHECK-NEXT: sshll2.4s v20, v6, #0
679 ; CHECK-NEXT: sshll.4s v6, v6, #0
680 ; CHECK-NEXT: and.16b v16, v16, v18
681 ; CHECK-NEXT: and.16b v7, v17, v7
682 ; CHECK-NEXT: and.16b v17, v19, v20
683 ; CHECK-NEXT: and.16b v5, v5, v6
684 ; CHECK-NEXT: stp q7, q16, [x1, #32]
685 ; CHECK-NEXT: stp q5, q17, [x1], #64
686 ; CHECK-NEXT: b.ne LBB25_1
687 ; CHECK-NEXT: ; %bb.2: ; %exit
689 ; CHECK-NEXT: .loh AdrpLdr Lloh14, Lloh17
690 ; CHECK-NEXT: .loh AdrpLdr Lloh13, Lloh15
691 ; CHECK-NEXT: .loh AdrpLdr Lloh11, Lloh16
692 ; CHECK-NEXT: .loh AdrpAdrp Lloh10, Lloh13
693 ; CHECK-NEXT: .loh AdrpLdr Lloh10, Lloh12
698 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
699 %src.gep = getelementptr i8, ptr %src, i64 %iv
700 %load = load <16 x i8>, ptr %src.gep
701 %cmp = icmp sgt <16 x i8> %load, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
702 %ext.shuf = shufflevector <16 x i8> %load, <16 x i8> zeroinitializer, <64 x i32> <i32 16, i32 16, i32 16, i32 0, i32 16, i32 16, i32 16, i32 1, i32 16, i32 16, i32 16, i32 2, i32 16, i32 16, i32 16, i32 3, i32 16, i32 16, i32 16, i32 4, i32 16, i32 16, i32 16, i32 5, i32 16, i32 16, i32 16, i32 6, i32 16, i32 16, i32 16, i32 7, i32 16, i32 16, i32 16, i32 8, i32 16, i32 16, i32 16, i32 9, i32 16, i32 16, i32 16, i32 10, i32 16, i32 16, i32 16, i32 11, i32 16, i32 16, i32 16, i32 12, i32 16, i32 16, i32 16, i32 13, i32 16, i32 16, i32 16, i32 14, i32 16, i32 16, i32 16, i32 15>
703 %ext = bitcast <64 x i8> %ext.shuf to <16 x i32>
704 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
705 %dst.gep = getelementptr i32, ptr %dst, i64 %iv
706 store <16 x i32> %sel, ptr %dst.gep
707 %iv.next = add nuw i64 %iv, 16
708 %ec = icmp eq i64 %iv.next, 128
709 br i1 %ec, label %exit, label %loop
715 define void @shuffle_in_loop_is_no_extend_v16i8_to_v16i32(ptr %src, ptr %dst) {
716 ; CHECK-LABEL: shuffle_in_loop_is_no_extend_v16i8_to_v16i32:
717 ; CHECK: ; %bb.0: ; %entry
718 ; CHECK-NEXT: Lloh18:
719 ; CHECK-NEXT: adrp x8, lCPI26_0@PAGE
720 ; CHECK-NEXT: movi.2d v0, #0xffffffffffffffff
721 ; CHECK-NEXT: Lloh19:
722 ; CHECK-NEXT: adrp x9, lCPI26_2@PAGE
723 ; CHECK-NEXT: Lloh20:
724 ; CHECK-NEXT: ldr q1, [x8, lCPI26_0@PAGEOFF]
725 ; CHECK-NEXT: Lloh21:
726 ; CHECK-NEXT: adrp x8, lCPI26_1@PAGE
727 ; CHECK-NEXT: Lloh22:
728 ; CHECK-NEXT: adrp x10, lCPI26_3@PAGE
729 ; CHECK-NEXT: Lloh23:
730 ; CHECK-NEXT: ldr q2, [x8, lCPI26_1@PAGEOFF]
731 ; CHECK-NEXT: Lloh24:
732 ; CHECK-NEXT: ldr q3, [x9, lCPI26_2@PAGEOFF]
733 ; CHECK-NEXT: Lloh25:
734 ; CHECK-NEXT: ldr q4, [x10, lCPI26_3@PAGEOFF]
735 ; CHECK-NEXT: mov x8, xzr
736 ; CHECK-NEXT: LBB26_1: ; %loop
737 ; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1
738 ; CHECK-NEXT: ldr q5, [x0, x8]
739 ; CHECK-NEXT: add x8, x8, #16
740 ; CHECK-NEXT: cmp x8, #128
741 ; CHECK-NEXT: cmgt.16b v6, v5, v0
742 ; CHECK-NEXT: tbl.16b v16, { v5 }, v1
743 ; CHECK-NEXT: tbl.16b v17, { v5 }, v2
744 ; CHECK-NEXT: tbl.16b v19, { v5 }, v3
745 ; CHECK-NEXT: tbl.16b v5, { v5 }, v4
746 ; CHECK-NEXT: sshll2.8h v7, v6, #0
747 ; CHECK-NEXT: sshll.8h v6, v6, #0
748 ; CHECK-NEXT: sshll2.4s v18, v7, #0
749 ; CHECK-NEXT: sshll.4s v7, v7, #0
750 ; CHECK-NEXT: sshll2.4s v20, v6, #0
751 ; CHECK-NEXT: sshll.4s v6, v6, #0
752 ; CHECK-NEXT: and.16b v16, v16, v18
753 ; CHECK-NEXT: and.16b v7, v17, v7
754 ; CHECK-NEXT: and.16b v17, v19, v20
755 ; CHECK-NEXT: and.16b v5, v5, v6
756 ; CHECK-NEXT: stp q7, q16, [x1, #32]
757 ; CHECK-NEXT: stp q5, q17, [x1], #64
758 ; CHECK-NEXT: b.ne LBB26_1
759 ; CHECK-NEXT: ; %bb.2: ; %exit
761 ; CHECK-NEXT: .loh AdrpLdr Lloh22, Lloh25
762 ; CHECK-NEXT: .loh AdrpLdr Lloh21, Lloh23
763 ; CHECK-NEXT: .loh AdrpLdr Lloh19, Lloh24
764 ; CHECK-NEXT: .loh AdrpAdrp Lloh18, Lloh21
765 ; CHECK-NEXT: .loh AdrpLdr Lloh18, Lloh20
770 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
771 %src.gep = getelementptr i8, ptr %src, i64 %iv
772 %load = load <16 x i8>, ptr %src.gep
773 %cmp = icmp sgt <16 x i8> %load, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
774 %ext.shuf = shufflevector <16 x i8> %load, <16 x i8> zeroinitializer, <64 x i32> <i32 1, i32 16, i32 16, i32 0, i32 16, i32 16, i32 16, i32 1, i32 16, i32 16, i32 16, i32 2, i32 16, i32 16, i32 16, i32 3, i32 16, i32 16, i32 16, i32 4, i32 16, i32 16, i32 16, i32 5, i32 16, i32 16, i32 16, i32 6, i32 16, i32 16, i32 16, i32 7, i32 16, i32 16, i32 16, i32 8, i32 16, i32 16, i32 16, i32 9, i32 16, i32 16, i32 16, i32 10, i32 16, i32 16, i32 16, i32 11, i32 16, i32 16, i32 16, i32 12, i32 16, i32 16, i32 16, i32 13, i32 16, i32 16, i32 16, i32 14, i32 16, i32 16, i32 16, i32 15>
775 %ext = bitcast <64 x i8> %ext.shuf to <16 x i32>
776 %sel = select <16 x i1> %cmp, <16 x i32> %ext, <16 x i32> zeroinitializer
777 %dst.gep = getelementptr i32, ptr %dst, i64 %iv
778 store <16 x i32> %sel, ptr %dst.gep
779 %iv.next = add nuw i64 %iv, 16
780 %ec = icmp eq i64 %iv.next, 128
781 br i1 %ec, label %exit, label %loop