1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s
4 ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
6 target triple = "aarch64-unknown-linux-gnu"
8 ; Although SVE immediate packing should be fully tested using scalable vectors,
9 ; these tests protects against the possibility that scalable nodes, resulting
10 ; from lowering fixed length vector operations, trigger different isel patterns.
12 ; FIXME: These instructions should have the immediate form
18 define void @add_v32i8(ptr %a) {
19 ; CHECK-LABEL: add_v32i8:
21 ; CHECK-NEXT: ldp q0, q1, [x0]
22 ; CHECK-NEXT: add z0.b, z0.b, #7 // =0x7
23 ; CHECK-NEXT: add z1.b, z1.b, #7 // =0x7
24 ; CHECK-NEXT: stp q0, q1, [x0]
27 ; NONEON-NOSVE-LABEL: add_v32i8:
28 ; NONEON-NOSVE: // %bb.0:
29 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
30 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
31 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
32 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
33 ; NONEON-NOSVE-NEXT: add w8, w8, #7
34 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
35 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
36 ; NONEON-NOSVE-NEXT: add w8, w8, #7
37 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
38 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
39 ; NONEON-NOSVE-NEXT: add w8, w8, #7
40 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
41 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
42 ; NONEON-NOSVE-NEXT: add w8, w8, #7
43 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
44 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
45 ; NONEON-NOSVE-NEXT: add w8, w8, #7
46 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
47 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
48 ; NONEON-NOSVE-NEXT: add w8, w8, #7
49 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
50 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
51 ; NONEON-NOSVE-NEXT: add w8, w8, #7
52 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
53 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
54 ; NONEON-NOSVE-NEXT: add w8, w8, #7
55 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
56 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
57 ; NONEON-NOSVE-NEXT: add w8, w8, #7
58 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
59 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
60 ; NONEON-NOSVE-NEXT: add w8, w8, #7
61 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
62 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
63 ; NONEON-NOSVE-NEXT: add w8, w8, #7
64 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
65 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
66 ; NONEON-NOSVE-NEXT: add w8, w8, #7
67 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
68 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
69 ; NONEON-NOSVE-NEXT: add w8, w8, #7
70 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
71 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
72 ; NONEON-NOSVE-NEXT: add w8, w8, #7
73 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
74 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
75 ; NONEON-NOSVE-NEXT: add w8, w8, #7
76 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
77 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
78 ; NONEON-NOSVE-NEXT: add w8, w8, #7
79 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
80 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
81 ; NONEON-NOSVE-NEXT: add w8, w8, #7
82 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
83 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
84 ; NONEON-NOSVE-NEXT: add w8, w8, #7
85 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
86 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
87 ; NONEON-NOSVE-NEXT: add w8, w8, #7
88 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
89 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
90 ; NONEON-NOSVE-NEXT: add w8, w8, #7
91 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
92 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
93 ; NONEON-NOSVE-NEXT: add w8, w8, #7
94 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
95 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
96 ; NONEON-NOSVE-NEXT: add w8, w8, #7
97 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
98 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
99 ; NONEON-NOSVE-NEXT: add w8, w8, #7
100 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
101 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
102 ; NONEON-NOSVE-NEXT: add w8, w8, #7
103 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
104 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
105 ; NONEON-NOSVE-NEXT: add w8, w8, #7
106 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
107 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
108 ; NONEON-NOSVE-NEXT: add w8, w8, #7
109 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
110 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
111 ; NONEON-NOSVE-NEXT: add w8, w8, #7
112 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
113 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
114 ; NONEON-NOSVE-NEXT: add w8, w8, #7
115 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
116 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
117 ; NONEON-NOSVE-NEXT: add w8, w8, #7
118 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
119 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
120 ; NONEON-NOSVE-NEXT: add w8, w8, #7
121 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
122 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
123 ; NONEON-NOSVE-NEXT: add w8, w8, #7
124 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
125 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
126 ; NONEON-NOSVE-NEXT: add w8, w8, #7
127 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
128 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
129 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
130 ; NONEON-NOSVE-NEXT: add sp, sp, #64
131 ; NONEON-NOSVE-NEXT: ret
132 %op1 = load <32 x i8>, ptr %a
133 %ins = insertelement <32 x i8> undef, i8 7, i32 0
134 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
135 %res = add <32 x i8> %op1, %op2
136 store <32 x i8> %res, ptr %a
140 define void @add_v16i16(ptr %a) {
141 ; CHECK-LABEL: add_v16i16:
143 ; CHECK-NEXT: ldp q0, q1, [x0]
144 ; CHECK-NEXT: add z0.h, z0.h, #15 // =0xf
145 ; CHECK-NEXT: add z1.h, z1.h, #15 // =0xf
146 ; CHECK-NEXT: stp q0, q1, [x0]
149 ; NONEON-NOSVE-LABEL: add_v16i16:
150 ; NONEON-NOSVE: // %bb.0:
151 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
152 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
153 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
154 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
155 ; NONEON-NOSVE-NEXT: add w8, w8, #15
156 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
157 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
158 ; NONEON-NOSVE-NEXT: add w8, w8, #15
159 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
160 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
161 ; NONEON-NOSVE-NEXT: add w8, w8, #15
162 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
163 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
164 ; NONEON-NOSVE-NEXT: add w8, w8, #15
165 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
166 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
167 ; NONEON-NOSVE-NEXT: add w8, w8, #15
168 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
169 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
170 ; NONEON-NOSVE-NEXT: add w8, w8, #15
171 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
172 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
173 ; NONEON-NOSVE-NEXT: add w8, w8, #15
174 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
175 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
176 ; NONEON-NOSVE-NEXT: add w8, w8, #15
177 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
178 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
179 ; NONEON-NOSVE-NEXT: add w8, w8, #15
180 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
181 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
182 ; NONEON-NOSVE-NEXT: add w8, w8, #15
183 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
184 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
185 ; NONEON-NOSVE-NEXT: add w8, w8, #15
186 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
187 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
188 ; NONEON-NOSVE-NEXT: add w8, w8, #15
189 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
190 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
191 ; NONEON-NOSVE-NEXT: add w8, w8, #15
192 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
193 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
194 ; NONEON-NOSVE-NEXT: add w8, w8, #15
195 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
196 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
197 ; NONEON-NOSVE-NEXT: add w8, w8, #15
198 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
199 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
200 ; NONEON-NOSVE-NEXT: add w8, w8, #15
201 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
202 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
203 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
204 ; NONEON-NOSVE-NEXT: add sp, sp, #64
205 ; NONEON-NOSVE-NEXT: ret
206 %op1 = load <16 x i16>, ptr %a
207 %ins = insertelement <16 x i16> undef, i16 15, i64 0
208 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
209 %res = add <16 x i16> %op1, %op2
210 store <16 x i16> %res, ptr %a
214 define void @add_v8i32(ptr %a) {
215 ; CHECK-LABEL: add_v8i32:
217 ; CHECK-NEXT: ldp q0, q1, [x0]
218 ; CHECK-NEXT: add z0.s, z0.s, #31 // =0x1f
219 ; CHECK-NEXT: add z1.s, z1.s, #31 // =0x1f
220 ; CHECK-NEXT: stp q0, q1, [x0]
223 ; NONEON-NOSVE-LABEL: add_v8i32:
224 ; NONEON-NOSVE: // %bb.0:
225 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
226 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
227 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
228 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
229 ; NONEON-NOSVE-NEXT: add w9, w8, #31
230 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
231 ; NONEON-NOSVE-NEXT: add w8, w8, #31
232 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
233 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
234 ; NONEON-NOSVE-NEXT: add w9, w8, #31
235 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
236 ; NONEON-NOSVE-NEXT: add w8, w8, #31
237 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
238 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
239 ; NONEON-NOSVE-NEXT: add w9, w8, #31
240 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
241 ; NONEON-NOSVE-NEXT: add w8, w8, #31
242 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
243 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
244 ; NONEON-NOSVE-NEXT: add w9, w8, #31
245 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
246 ; NONEON-NOSVE-NEXT: add w8, w8, #31
247 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
248 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
249 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
250 ; NONEON-NOSVE-NEXT: add sp, sp, #64
251 ; NONEON-NOSVE-NEXT: ret
252 %op1 = load <8 x i32>, ptr %a
253 %ins = insertelement <8 x i32> undef, i32 31, i64 0
254 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
255 %res = add <8 x i32> %op1, %op2
256 store <8 x i32> %res, ptr %a
260 define void @add_v4i64(ptr %a) {
261 ; CHECK-LABEL: add_v4i64:
263 ; CHECK-NEXT: ldp q0, q1, [x0]
264 ; CHECK-NEXT: add z0.d, z0.d, #63 // =0x3f
265 ; CHECK-NEXT: add z1.d, z1.d, #63 // =0x3f
266 ; CHECK-NEXT: stp q0, q1, [x0]
269 ; NONEON-NOSVE-LABEL: add_v4i64:
270 ; NONEON-NOSVE: // %bb.0:
271 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
272 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
273 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
274 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
275 ; NONEON-NOSVE-NEXT: add x9, x8, #63
276 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
277 ; NONEON-NOSVE-NEXT: add x8, x8, #63
278 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
279 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
280 ; NONEON-NOSVE-NEXT: add x9, x8, #63
281 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
282 ; NONEON-NOSVE-NEXT: add x8, x8, #63
283 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
284 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
285 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
286 ; NONEON-NOSVE-NEXT: add sp, sp, #64
287 ; NONEON-NOSVE-NEXT: ret
288 %op1 = load <4 x i64>, ptr %a
289 %ins = insertelement <4 x i64> undef, i64 63, i64 0
290 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
291 %res = add <4 x i64> %op1, %op2
292 store <4 x i64> %res, ptr %a
300 define void @and_v32i8(ptr %a) {
301 ; CHECK-LABEL: and_v32i8:
303 ; CHECK-NEXT: ldp q0, q1, [x0]
304 ; CHECK-NEXT: and z0.b, z0.b, #0x7
305 ; CHECK-NEXT: and z1.b, z1.b, #0x7
306 ; CHECK-NEXT: stp q0, q1, [x0]
309 ; NONEON-NOSVE-LABEL: and_v32i8:
310 ; NONEON-NOSVE: // %bb.0:
311 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
312 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
313 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
314 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
315 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
316 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
317 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
318 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
319 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
320 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
321 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
322 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
323 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
324 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
325 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
326 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
327 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
328 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
329 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
330 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
331 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
332 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
333 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
334 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
335 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
336 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
337 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
338 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
339 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
340 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
341 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
342 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
343 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
344 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
345 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
346 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
347 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
348 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
349 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
350 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
351 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
352 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
353 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
354 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
355 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
356 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
357 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
358 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
359 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
360 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
361 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
362 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
363 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
364 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
365 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
366 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
367 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
368 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
369 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
370 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
371 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
372 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
373 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
374 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
375 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
376 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
377 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
378 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
379 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
380 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
381 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
382 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
383 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
384 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
385 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
386 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
387 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
388 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
389 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
390 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
391 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
392 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
393 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
394 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
395 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
396 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
397 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
398 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
399 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
400 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
401 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
402 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
403 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
404 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
405 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
406 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
407 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
408 ; NONEON-NOSVE-NEXT: and w8, w8, #0x7
409 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
410 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
411 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
412 ; NONEON-NOSVE-NEXT: add sp, sp, #64
413 ; NONEON-NOSVE-NEXT: ret
414 %op1 = load <32 x i8>, ptr %a
415 %ins = insertelement <32 x i8> undef, i8 7, i32 0
416 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
417 %res = and <32 x i8> %op1, %op2
418 store <32 x i8> %res, ptr %a
422 define void @and_v16i16(ptr %a) {
423 ; CHECK-LABEL: and_v16i16:
425 ; CHECK-NEXT: ldp q0, q1, [x0]
426 ; CHECK-NEXT: and z0.h, z0.h, #0xf
427 ; CHECK-NEXT: and z1.h, z1.h, #0xf
428 ; CHECK-NEXT: stp q0, q1, [x0]
431 ; NONEON-NOSVE-LABEL: and_v16i16:
432 ; NONEON-NOSVE: // %bb.0:
433 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
434 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
435 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
436 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
437 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
438 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
439 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
440 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
441 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
442 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
443 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
444 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
445 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
446 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
447 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
448 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
449 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
450 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
451 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
452 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
453 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
454 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
455 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
456 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
457 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
458 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
459 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
460 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
461 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
462 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
463 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
464 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
465 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
466 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
467 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
468 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
469 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
470 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
471 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
472 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
473 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
474 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
475 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
476 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
477 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
478 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
479 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
480 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
481 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
482 ; NONEON-NOSVE-NEXT: and w8, w8, #0xf
483 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
484 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
485 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
486 ; NONEON-NOSVE-NEXT: add sp, sp, #64
487 ; NONEON-NOSVE-NEXT: ret
488 %op1 = load <16 x i16>, ptr %a
489 %ins = insertelement <16 x i16> undef, i16 15, i64 0
490 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
491 %res = and <16 x i16> %op1, %op2
492 store <16 x i16> %res, ptr %a
496 define void @and_v8i32(ptr %a) {
497 ; CHECK-LABEL: and_v8i32:
499 ; CHECK-NEXT: ldp q0, q1, [x0]
500 ; CHECK-NEXT: and z0.s, z0.s, #0x1f
501 ; CHECK-NEXT: and z1.s, z1.s, #0x1f
502 ; CHECK-NEXT: stp q0, q1, [x0]
505 ; NONEON-NOSVE-LABEL: and_v8i32:
506 ; NONEON-NOSVE: // %bb.0:
507 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
508 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
509 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
510 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
511 ; NONEON-NOSVE-NEXT: and w9, w8, #0x1f
512 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
513 ; NONEON-NOSVE-NEXT: and w8, w8, #0x1f
514 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
515 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
516 ; NONEON-NOSVE-NEXT: and w9, w8, #0x1f
517 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
518 ; NONEON-NOSVE-NEXT: and w8, w8, #0x1f
519 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
520 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
521 ; NONEON-NOSVE-NEXT: and w9, w8, #0x1f
522 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
523 ; NONEON-NOSVE-NEXT: and w8, w8, #0x1f
524 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
525 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
526 ; NONEON-NOSVE-NEXT: and w9, w8, #0x1f
527 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
528 ; NONEON-NOSVE-NEXT: and w8, w8, #0x1f
529 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
530 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
531 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
532 ; NONEON-NOSVE-NEXT: add sp, sp, #64
533 ; NONEON-NOSVE-NEXT: ret
534 %op1 = load <8 x i32>, ptr %a
535 %ins = insertelement <8 x i32> undef, i32 31, i64 0
536 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
537 %res = and <8 x i32> %op1, %op2
538 store <8 x i32> %res, ptr %a
542 define void @and_v4i64(ptr %a) {
543 ; CHECK-LABEL: and_v4i64:
545 ; CHECK-NEXT: ldp q0, q1, [x0]
546 ; CHECK-NEXT: and z0.d, z0.d, #0x3f
547 ; CHECK-NEXT: and z1.d, z1.d, #0x3f
548 ; CHECK-NEXT: stp q0, q1, [x0]
551 ; NONEON-NOSVE-LABEL: and_v4i64:
552 ; NONEON-NOSVE: // %bb.0:
553 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
554 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
555 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
556 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
557 ; NONEON-NOSVE-NEXT: and x9, x8, #0x3f
558 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
559 ; NONEON-NOSVE-NEXT: and x8, x8, #0x3f
560 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
561 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
562 ; NONEON-NOSVE-NEXT: and x9, x8, #0x3f
563 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
564 ; NONEON-NOSVE-NEXT: and x8, x8, #0x3f
565 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
566 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
567 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
568 ; NONEON-NOSVE-NEXT: add sp, sp, #64
569 ; NONEON-NOSVE-NEXT: ret
570 %op1 = load <4 x i64>, ptr %a
571 %ins = insertelement <4 x i64> undef, i64 63, i64 0
572 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
573 %res = and <4 x i64> %op1, %op2
574 store <4 x i64> %res, ptr %a
582 define void @ashr_v32i8(ptr %a) {
583 ; CHECK-LABEL: ashr_v32i8:
585 ; CHECK-NEXT: ldp q0, q1, [x0]
586 ; CHECK-NEXT: asr z0.b, z0.b, #7
587 ; CHECK-NEXT: asr z1.b, z1.b, #7
588 ; CHECK-NEXT: stp q0, q1, [x0]
591 ; NONEON-NOSVE-LABEL: ashr_v32i8:
592 ; NONEON-NOSVE: // %bb.0:
593 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
594 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
595 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
596 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #31]
597 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
598 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
599 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #30]
600 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
601 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
602 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #29]
603 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
604 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
605 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #28]
606 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
607 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
608 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #27]
609 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
610 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
611 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #26]
612 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
613 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
614 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #25]
615 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
616 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
617 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #24]
618 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
619 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
620 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #23]
621 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
622 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
623 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]
624 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
625 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
626 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #21]
627 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
628 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
629 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #20]
630 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
631 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
632 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #19]
633 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
634 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
635 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #18]
636 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
637 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
638 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #17]
639 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
640 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
641 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #16]
642 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
643 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
644 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #15]
645 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
646 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
647 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #14]
648 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
649 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
650 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #13]
651 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
652 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
653 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #12]
654 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
655 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
656 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #11]
657 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
658 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
659 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #10]
660 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
661 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
662 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #9]
663 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
664 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
665 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #8]
666 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
667 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
668 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #7]
669 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
670 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
671 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #6]
672 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
673 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
674 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #5]
675 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
676 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
677 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #4]
678 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
679 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
680 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #3]
681 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
682 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
683 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #2]
684 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
685 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
686 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #1]
687 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
688 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
689 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp]
690 ; NONEON-NOSVE-NEXT: lsr w8, w8, #7
691 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
692 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
693 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
694 ; NONEON-NOSVE-NEXT: add sp, sp, #64
695 ; NONEON-NOSVE-NEXT: ret
696 %op1 = load <32 x i8>, ptr %a
697 %ins = insertelement <32 x i8> undef, i8 7, i32 0
698 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
699 %res = ashr <32 x i8> %op1, %op2
700 store <32 x i8> %res, ptr %a
704 define void @ashr_v16i16(ptr %a) {
705 ; CHECK-LABEL: ashr_v16i16:
707 ; CHECK-NEXT: ldp q0, q1, [x0]
708 ; CHECK-NEXT: asr z0.h, z0.h, #15
709 ; CHECK-NEXT: asr z1.h, z1.h, #15
710 ; CHECK-NEXT: stp q0, q1, [x0]
713 ; NONEON-NOSVE-LABEL: ashr_v16i16:
714 ; NONEON-NOSVE: // %bb.0:
715 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
716 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
717 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
718 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
719 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
720 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
721 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
722 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
723 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
724 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
725 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
726 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
727 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
728 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
729 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
730 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
731 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
732 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
733 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
734 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
735 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
736 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
737 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
738 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
739 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
740 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
741 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
742 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #14]
743 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
744 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
745 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #12]
746 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
747 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
748 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #10]
749 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
750 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
751 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #8]
752 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
753 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
754 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #6]
755 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
756 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
757 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]
758 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
759 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
760 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #2]
761 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
762 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
763 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp]
764 ; NONEON-NOSVE-NEXT: lsr w8, w8, #15
765 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
766 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
767 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
768 ; NONEON-NOSVE-NEXT: add sp, sp, #64
769 ; NONEON-NOSVE-NEXT: ret
770 %op1 = load <16 x i16>, ptr %a
771 %ins = insertelement <16 x i16> undef, i16 15, i64 0
772 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
773 %res = ashr <16 x i16> %op1, %op2
774 store <16 x i16> %res, ptr %a
778 define void @ashr_v8i32(ptr %a) {
779 ; CHECK-LABEL: ashr_v8i32:
781 ; CHECK-NEXT: ldp q0, q1, [x0]
782 ; CHECK-NEXT: asr z0.s, z0.s, #31
783 ; CHECK-NEXT: asr z1.s, z1.s, #31
784 ; CHECK-NEXT: stp q0, q1, [x0]
787 ; NONEON-NOSVE-LABEL: ashr_v8i32:
788 ; NONEON-NOSVE: // %bb.0:
789 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
790 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
791 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
792 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
793 ; NONEON-NOSVE-NEXT: asr w9, w8, #31
794 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
795 ; NONEON-NOSVE-NEXT: asr w8, w8, #31
796 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
797 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
798 ; NONEON-NOSVE-NEXT: asr w9, w8, #31
799 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
800 ; NONEON-NOSVE-NEXT: asr w8, w8, #31
801 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
802 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
803 ; NONEON-NOSVE-NEXT: asr w9, w8, #31
804 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
805 ; NONEON-NOSVE-NEXT: asr w8, w8, #31
806 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
807 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
808 ; NONEON-NOSVE-NEXT: asr w9, w8, #31
809 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
810 ; NONEON-NOSVE-NEXT: asr w8, w8, #31
811 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
812 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
813 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
814 ; NONEON-NOSVE-NEXT: add sp, sp, #64
815 ; NONEON-NOSVE-NEXT: ret
816 %op1 = load <8 x i32>, ptr %a
817 %ins = insertelement <8 x i32> undef, i32 31, i64 0
818 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
819 %res = ashr <8 x i32> %op1, %op2
820 store <8 x i32> %res, ptr %a
824 define void @ashr_v4i64(ptr %a) {
825 ; CHECK-LABEL: ashr_v4i64:
827 ; CHECK-NEXT: ldp q0, q1, [x0]
828 ; CHECK-NEXT: asr z0.d, z0.d, #63
829 ; CHECK-NEXT: asr z1.d, z1.d, #63
830 ; CHECK-NEXT: stp q0, q1, [x0]
833 ; NONEON-NOSVE-LABEL: ashr_v4i64:
834 ; NONEON-NOSVE: // %bb.0:
835 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
836 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
837 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
838 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
839 ; NONEON-NOSVE-NEXT: asr x9, x8, #63
840 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
841 ; NONEON-NOSVE-NEXT: asr x8, x8, #63
842 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
843 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
844 ; NONEON-NOSVE-NEXT: asr x9, x8, #63
845 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
846 ; NONEON-NOSVE-NEXT: asr x8, x8, #63
847 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
848 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
849 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
850 ; NONEON-NOSVE-NEXT: add sp, sp, #64
851 ; NONEON-NOSVE-NEXT: ret
852 %op1 = load <4 x i64>, ptr %a
853 %ins = insertelement <4 x i64> undef, i64 63, i64 0
854 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
855 %res = ashr <4 x i64> %op1, %op2
856 store <4 x i64> %res, ptr %a
864 define void @icmp_eq_v32i8(ptr %a) {
865 ; CHECK-LABEL: icmp_eq_v32i8:
867 ; CHECK-NEXT: ldp q0, q1, [x0]
868 ; CHECK-NEXT: ptrue p0.b, vl16
869 ; CHECK-NEXT: cmpeq p1.b, p0/z, z0.b, #7
870 ; CHECK-NEXT: cmpeq p0.b, p0/z, z1.b, #7
871 ; CHECK-NEXT: mov z0.b, p1/z, #-1 // =0xffffffffffffffff
872 ; CHECK-NEXT: mov z1.b, p0/z, #-1 // =0xffffffffffffffff
873 ; CHECK-NEXT: stp q0, q1, [x0]
876 ; NONEON-NOSVE-LABEL: icmp_eq_v32i8:
877 ; NONEON-NOSVE: // %bb.0:
878 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
879 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
880 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
881 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
882 ; NONEON-NOSVE-NEXT: cmp w8, #7
883 ; NONEON-NOSVE-NEXT: csetm w8, eq
884 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
885 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
886 ; NONEON-NOSVE-NEXT: cmp w8, #7
887 ; NONEON-NOSVE-NEXT: csetm w8, eq
888 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
889 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
890 ; NONEON-NOSVE-NEXT: cmp w8, #7
891 ; NONEON-NOSVE-NEXT: csetm w8, eq
892 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
893 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
894 ; NONEON-NOSVE-NEXT: cmp w8, #7
895 ; NONEON-NOSVE-NEXT: csetm w8, eq
896 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
897 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
898 ; NONEON-NOSVE-NEXT: cmp w8, #7
899 ; NONEON-NOSVE-NEXT: csetm w8, eq
900 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
901 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
902 ; NONEON-NOSVE-NEXT: cmp w8, #7
903 ; NONEON-NOSVE-NEXT: csetm w8, eq
904 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
905 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
906 ; NONEON-NOSVE-NEXT: cmp w8, #7
907 ; NONEON-NOSVE-NEXT: csetm w8, eq
908 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
909 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
910 ; NONEON-NOSVE-NEXT: cmp w8, #7
911 ; NONEON-NOSVE-NEXT: csetm w8, eq
912 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
913 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
914 ; NONEON-NOSVE-NEXT: cmp w8, #7
915 ; NONEON-NOSVE-NEXT: csetm w8, eq
916 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
917 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
918 ; NONEON-NOSVE-NEXT: cmp w8, #7
919 ; NONEON-NOSVE-NEXT: csetm w8, eq
920 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
921 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
922 ; NONEON-NOSVE-NEXT: cmp w8, #7
923 ; NONEON-NOSVE-NEXT: csetm w8, eq
924 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
925 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
926 ; NONEON-NOSVE-NEXT: cmp w8, #7
927 ; NONEON-NOSVE-NEXT: csetm w8, eq
928 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
929 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
930 ; NONEON-NOSVE-NEXT: cmp w8, #7
931 ; NONEON-NOSVE-NEXT: csetm w8, eq
932 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
933 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
934 ; NONEON-NOSVE-NEXT: cmp w8, #7
935 ; NONEON-NOSVE-NEXT: csetm w8, eq
936 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
937 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
938 ; NONEON-NOSVE-NEXT: cmp w8, #7
939 ; NONEON-NOSVE-NEXT: csetm w8, eq
940 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
941 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
942 ; NONEON-NOSVE-NEXT: cmp w8, #7
943 ; NONEON-NOSVE-NEXT: csetm w8, eq
944 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
945 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
946 ; NONEON-NOSVE-NEXT: cmp w8, #7
947 ; NONEON-NOSVE-NEXT: csetm w8, eq
948 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
949 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
950 ; NONEON-NOSVE-NEXT: cmp w8, #7
951 ; NONEON-NOSVE-NEXT: csetm w8, eq
952 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
953 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
954 ; NONEON-NOSVE-NEXT: cmp w8, #7
955 ; NONEON-NOSVE-NEXT: csetm w8, eq
956 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
957 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
958 ; NONEON-NOSVE-NEXT: cmp w8, #7
959 ; NONEON-NOSVE-NEXT: csetm w8, eq
960 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
961 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
962 ; NONEON-NOSVE-NEXT: cmp w8, #7
963 ; NONEON-NOSVE-NEXT: csetm w8, eq
964 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
965 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
966 ; NONEON-NOSVE-NEXT: cmp w8, #7
967 ; NONEON-NOSVE-NEXT: csetm w8, eq
968 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
969 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
970 ; NONEON-NOSVE-NEXT: cmp w8, #7
971 ; NONEON-NOSVE-NEXT: csetm w8, eq
972 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
973 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
974 ; NONEON-NOSVE-NEXT: cmp w8, #7
975 ; NONEON-NOSVE-NEXT: csetm w8, eq
976 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
977 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
978 ; NONEON-NOSVE-NEXT: cmp w8, #7
979 ; NONEON-NOSVE-NEXT: csetm w8, eq
980 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
981 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
982 ; NONEON-NOSVE-NEXT: cmp w8, #7
983 ; NONEON-NOSVE-NEXT: csetm w8, eq
984 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
985 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
986 ; NONEON-NOSVE-NEXT: cmp w8, #7
987 ; NONEON-NOSVE-NEXT: csetm w8, eq
988 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
989 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
990 ; NONEON-NOSVE-NEXT: cmp w8, #7
991 ; NONEON-NOSVE-NEXT: csetm w8, eq
992 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
993 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
994 ; NONEON-NOSVE-NEXT: cmp w8, #7
995 ; NONEON-NOSVE-NEXT: csetm w8, eq
996 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
997 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
998 ; NONEON-NOSVE-NEXT: cmp w8, #7
999 ; NONEON-NOSVE-NEXT: csetm w8, eq
1000 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
1001 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
1002 ; NONEON-NOSVE-NEXT: cmp w8, #7
1003 ; NONEON-NOSVE-NEXT: csetm w8, eq
1004 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
1005 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
1006 ; NONEON-NOSVE-NEXT: cmp w8, #7
1007 ; NONEON-NOSVE-NEXT: csetm w8, eq
1008 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
1009 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1010 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1011 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1012 ; NONEON-NOSVE-NEXT: ret
1013 %op1 = load <32 x i8>, ptr %a
1014 %ins = insertelement <32 x i8> undef, i8 7, i64 0
1015 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
1016 %cmp = icmp eq <32 x i8> %op1, %op2
1017 %res = sext <32 x i1> %cmp to <32 x i8>
1018 store <32 x i8> %res, ptr %a
1022 define void @icmp_sge_v16i16(ptr %a) {
1023 ; CHECK-LABEL: icmp_sge_v16i16:
1025 ; CHECK-NEXT: ldp q0, q1, [x0]
1026 ; CHECK-NEXT: ptrue p0.h, vl8
1027 ; CHECK-NEXT: cmpge p1.h, p0/z, z0.h, #15
1028 ; CHECK-NEXT: cmpge p0.h, p0/z, z1.h, #15
1029 ; CHECK-NEXT: mov z0.h, p1/z, #-1 // =0xffffffffffffffff
1030 ; CHECK-NEXT: mov z1.h, p0/z, #-1 // =0xffffffffffffffff
1031 ; CHECK-NEXT: stp q0, q1, [x0]
1034 ; NONEON-NOSVE-LABEL: icmp_sge_v16i16:
1035 ; NONEON-NOSVE: // %bb.0:
1036 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1037 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1038 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1039 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
1040 ; NONEON-NOSVE-NEXT: cmp w8, #14
1041 ; NONEON-NOSVE-NEXT: csetm w8, gt
1042 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
1043 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
1044 ; NONEON-NOSVE-NEXT: cmp w8, #14
1045 ; NONEON-NOSVE-NEXT: csetm w8, gt
1046 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
1047 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
1048 ; NONEON-NOSVE-NEXT: cmp w8, #14
1049 ; NONEON-NOSVE-NEXT: csetm w8, gt
1050 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
1051 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
1052 ; NONEON-NOSVE-NEXT: cmp w8, #14
1053 ; NONEON-NOSVE-NEXT: csetm w8, gt
1054 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
1055 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
1056 ; NONEON-NOSVE-NEXT: cmp w8, #14
1057 ; NONEON-NOSVE-NEXT: csetm w8, gt
1058 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
1059 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
1060 ; NONEON-NOSVE-NEXT: cmp w8, #14
1061 ; NONEON-NOSVE-NEXT: csetm w8, gt
1062 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
1063 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
1064 ; NONEON-NOSVE-NEXT: cmp w8, #14
1065 ; NONEON-NOSVE-NEXT: csetm w8, gt
1066 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
1067 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
1068 ; NONEON-NOSVE-NEXT: cmp w8, #14
1069 ; NONEON-NOSVE-NEXT: csetm w8, gt
1070 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
1071 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #14]
1072 ; NONEON-NOSVE-NEXT: cmp w8, #14
1073 ; NONEON-NOSVE-NEXT: csetm w8, gt
1074 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1075 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #12]
1076 ; NONEON-NOSVE-NEXT: cmp w8, #14
1077 ; NONEON-NOSVE-NEXT: csetm w8, gt
1078 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1079 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #10]
1080 ; NONEON-NOSVE-NEXT: cmp w8, #14
1081 ; NONEON-NOSVE-NEXT: csetm w8, gt
1082 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1083 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #8]
1084 ; NONEON-NOSVE-NEXT: cmp w8, #14
1085 ; NONEON-NOSVE-NEXT: csetm w8, gt
1086 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1087 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #6]
1088 ; NONEON-NOSVE-NEXT: cmp w8, #14
1089 ; NONEON-NOSVE-NEXT: csetm w8, gt
1090 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1091 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]
1092 ; NONEON-NOSVE-NEXT: cmp w8, #14
1093 ; NONEON-NOSVE-NEXT: csetm w8, gt
1094 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1095 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #2]
1096 ; NONEON-NOSVE-NEXT: cmp w8, #14
1097 ; NONEON-NOSVE-NEXT: csetm w8, gt
1098 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1099 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp]
1100 ; NONEON-NOSVE-NEXT: cmp w8, #14
1101 ; NONEON-NOSVE-NEXT: csetm w8, gt
1102 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1103 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1104 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1105 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1106 ; NONEON-NOSVE-NEXT: ret
1107 %op1 = load <16 x i16>, ptr %a
1108 %ins = insertelement <16 x i16> undef, i16 15, i64 0
1109 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
1110 %cmp = icmp sge <16 x i16> %op1, %op2
1111 %res = sext <16 x i1> %cmp to <16 x i16>
1112 store <16 x i16> %res, ptr %a
1116 define void @icmp_sgt_v8i32(ptr %a) {
1117 ; CHECK-LABEL: icmp_sgt_v8i32:
1119 ; CHECK-NEXT: ldp q0, q1, [x0]
1120 ; CHECK-NEXT: ptrue p0.s, vl4
1121 ; CHECK-NEXT: cmpgt p1.s, p0/z, z0.s, #-8
1122 ; CHECK-NEXT: cmpgt p0.s, p0/z, z1.s, #-8
1123 ; CHECK-NEXT: mov z0.s, p1/z, #-1 // =0xffffffffffffffff
1124 ; CHECK-NEXT: mov z1.s, p0/z, #-1 // =0xffffffffffffffff
1125 ; CHECK-NEXT: stp q0, q1, [x0]
1128 ; NONEON-NOSVE-LABEL: icmp_sgt_v8i32:
1129 ; NONEON-NOSVE: // %bb.0:
1130 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1131 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1132 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1133 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
1134 ; NONEON-NOSVE-NEXT: cmn w8, #8
1135 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
1136 ; NONEON-NOSVE-NEXT: csetm w9, gt
1137 ; NONEON-NOSVE-NEXT: cmn w8, #8
1138 ; NONEON-NOSVE-NEXT: csetm w8, gt
1139 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
1140 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
1141 ; NONEON-NOSVE-NEXT: cmn w8, #8
1142 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1143 ; NONEON-NOSVE-NEXT: csetm w9, gt
1144 ; NONEON-NOSVE-NEXT: cmn w8, #8
1145 ; NONEON-NOSVE-NEXT: csetm w8, gt
1146 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
1147 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
1148 ; NONEON-NOSVE-NEXT: cmn w8, #8
1149 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
1150 ; NONEON-NOSVE-NEXT: csetm w9, gt
1151 ; NONEON-NOSVE-NEXT: cmn w8, #8
1152 ; NONEON-NOSVE-NEXT: csetm w8, gt
1153 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
1154 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
1155 ; NONEON-NOSVE-NEXT: cmn w8, #8
1156 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
1157 ; NONEON-NOSVE-NEXT: csetm w9, gt
1158 ; NONEON-NOSVE-NEXT: cmn w8, #8
1159 ; NONEON-NOSVE-NEXT: csetm w8, gt
1160 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
1161 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1162 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1163 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1164 ; NONEON-NOSVE-NEXT: ret
1165 %op1 = load <8 x i32>, ptr %a
1166 %ins = insertelement <8 x i32> undef, i32 -8, i64 0
1167 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
1168 %cmp = icmp sgt <8 x i32> %op1, %op2
1169 %res = sext <8 x i1> %cmp to <8 x i32>
1170 store <8 x i32> %res, ptr %a
1174 define void @icmp_ult_v4i64(ptr %a) {
1175 ; CHECK-LABEL: icmp_ult_v4i64:
1177 ; CHECK-NEXT: ldp q0, q1, [x0]
1178 ; CHECK-NEXT: ptrue p0.d, vl2
1179 ; CHECK-NEXT: cmplo p1.d, p0/z, z0.d, #63
1180 ; CHECK-NEXT: cmplo p0.d, p0/z, z1.d, #63
1181 ; CHECK-NEXT: mov z0.d, p1/z, #-1 // =0xffffffffffffffff
1182 ; CHECK-NEXT: mov z1.d, p0/z, #-1 // =0xffffffffffffffff
1183 ; CHECK-NEXT: stp q0, q1, [x0]
1186 ; NONEON-NOSVE-LABEL: icmp_ult_v4i64:
1187 ; NONEON-NOSVE: // %bb.0:
1188 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1189 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1190 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1191 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1192 ; NONEON-NOSVE-NEXT: cmp x8, #63
1193 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1194 ; NONEON-NOSVE-NEXT: csetm x9, lo
1195 ; NONEON-NOSVE-NEXT: cmp x8, #63
1196 ; NONEON-NOSVE-NEXT: csetm x8, lo
1197 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
1198 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
1199 ; NONEON-NOSVE-NEXT: cmp x8, #63
1200 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
1201 ; NONEON-NOSVE-NEXT: csetm x9, lo
1202 ; NONEON-NOSVE-NEXT: cmp x8, #63
1203 ; NONEON-NOSVE-NEXT: csetm x8, lo
1204 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
1205 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1206 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1207 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1208 ; NONEON-NOSVE-NEXT: ret
1209 %op1 = load <4 x i64>, ptr %a
1210 %ins = insertelement <4 x i64> undef, i64 63, i64 0
1211 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
1212 %cmp = icmp ult <4 x i64> %op1, %op2
1213 %res = sext <4 x i1> %cmp to <4 x i64>
1214 store <4 x i64> %res, ptr %a
1222 define void @lshr_v32i8(ptr %a) {
1223 ; CHECK-LABEL: lshr_v32i8:
1225 ; CHECK-NEXT: ldp q0, q1, [x0]
1226 ; CHECK-NEXT: lsr z0.b, z0.b, #7
1227 ; CHECK-NEXT: lsr z1.b, z1.b, #7
1228 ; CHECK-NEXT: stp q0, q1, [x0]
1231 ; NONEON-NOSVE-LABEL: lshr_v32i8:
1232 ; NONEON-NOSVE: // %bb.0:
1233 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1234 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1235 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1236 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
1237 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1238 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
1239 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
1240 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1241 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
1242 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
1243 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1244 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
1245 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
1246 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1247 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
1248 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
1249 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1250 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
1251 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
1252 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1253 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
1254 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
1255 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1256 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
1257 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
1258 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1259 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
1260 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1261 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1262 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
1263 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1264 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1265 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
1266 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1267 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1268 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
1269 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1270 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1271 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
1272 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1273 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1274 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
1275 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1276 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1277 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
1278 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1279 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1280 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
1281 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1282 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1283 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
1284 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
1285 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1286 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
1287 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
1288 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1289 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
1290 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
1291 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1292 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
1293 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
1294 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1295 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
1296 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
1297 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1298 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
1299 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
1300 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1301 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
1302 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
1303 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1304 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
1305 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
1306 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1307 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
1308 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
1309 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1310 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
1311 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
1312 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1313 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
1314 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
1315 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1316 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
1317 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
1318 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1319 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
1320 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
1321 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1322 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
1323 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
1324 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1325 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
1326 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
1327 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1328 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
1329 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
1330 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #7, #1
1331 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
1332 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1333 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1334 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1335 ; NONEON-NOSVE-NEXT: ret
1336 %op1 = load <32 x i8>, ptr %a
1337 %ins = insertelement <32 x i8> undef, i8 7, i64 0
1338 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
1339 %res = lshr <32 x i8> %op1, %op2
1340 store <32 x i8> %res, ptr %a
1344 define void @lshr_v16i16(ptr %a) {
1345 ; CHECK-LABEL: lshr_v16i16:
1347 ; CHECK-NEXT: ldp q0, q1, [x0]
1348 ; CHECK-NEXT: lsr z0.h, z0.h, #15
1349 ; CHECK-NEXT: lsr z1.h, z1.h, #15
1350 ; CHECK-NEXT: stp q0, q1, [x0]
1353 ; NONEON-NOSVE-LABEL: lshr_v16i16:
1354 ; NONEON-NOSVE: // %bb.0:
1355 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1356 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1357 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1358 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
1359 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1360 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
1361 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
1362 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1363 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
1364 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
1365 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1366 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
1367 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
1368 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1369 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
1370 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
1371 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1372 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
1373 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1374 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1375 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
1376 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
1377 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1378 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
1379 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
1380 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1381 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
1382 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
1383 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1384 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1385 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
1386 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1387 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1388 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
1389 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1390 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1391 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
1392 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1393 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1394 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
1395 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1396 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1397 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
1398 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1399 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1400 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
1401 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1402 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1403 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
1404 ; NONEON-NOSVE-NEXT: ubfx w8, w8, #15, #1
1405 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1406 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1407 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1408 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1409 ; NONEON-NOSVE-NEXT: ret
1410 %op1 = load <16 x i16>, ptr %a
1411 %ins = insertelement <16 x i16> undef, i16 15, i64 0
1412 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
1413 %res = lshr <16 x i16> %op1, %op2
1414 store <16 x i16> %res, ptr %a
1418 define void @lshr_v8i32(ptr %a) {
1419 ; CHECK-LABEL: lshr_v8i32:
1421 ; CHECK-NEXT: ldp q0, q1, [x0]
1422 ; CHECK-NEXT: lsr z0.s, z0.s, #31
1423 ; CHECK-NEXT: lsr z1.s, z1.s, #31
1424 ; CHECK-NEXT: stp q0, q1, [x0]
1427 ; NONEON-NOSVE-LABEL: lshr_v8i32:
1428 ; NONEON-NOSVE: // %bb.0:
1429 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1430 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1431 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1432 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
1433 ; NONEON-NOSVE-NEXT: lsr w9, w8, #31
1434 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
1435 ; NONEON-NOSVE-NEXT: lsr w8, w8, #31
1436 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
1437 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
1438 ; NONEON-NOSVE-NEXT: lsr w9, w8, #31
1439 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1440 ; NONEON-NOSVE-NEXT: lsr w8, w8, #31
1441 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
1442 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
1443 ; NONEON-NOSVE-NEXT: lsr w9, w8, #31
1444 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
1445 ; NONEON-NOSVE-NEXT: lsr w8, w8, #31
1446 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
1447 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
1448 ; NONEON-NOSVE-NEXT: lsr w9, w8, #31
1449 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
1450 ; NONEON-NOSVE-NEXT: lsr w8, w8, #31
1451 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
1452 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1453 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1454 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1455 ; NONEON-NOSVE-NEXT: ret
1456 %op1 = load <8 x i32>, ptr %a
1457 %ins = insertelement <8 x i32> undef, i32 31, i64 0
1458 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
1459 %res = lshr <8 x i32> %op1, %op2
1460 store <8 x i32> %res, ptr %a
1464 define void @lshr_v4i64(ptr %a) {
1465 ; CHECK-LABEL: lshr_v4i64:
1467 ; CHECK-NEXT: ldp q0, q1, [x0]
1468 ; CHECK-NEXT: lsr z0.d, z0.d, #63
1469 ; CHECK-NEXT: lsr z1.d, z1.d, #63
1470 ; CHECK-NEXT: stp q0, q1, [x0]
1473 ; NONEON-NOSVE-LABEL: lshr_v4i64:
1474 ; NONEON-NOSVE: // %bb.0:
1475 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1476 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1477 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1478 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1479 ; NONEON-NOSVE-NEXT: lsr x9, x8, #63
1480 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1481 ; NONEON-NOSVE-NEXT: lsr x8, x8, #63
1482 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
1483 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
1484 ; NONEON-NOSVE-NEXT: lsr x9, x8, #63
1485 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
1486 ; NONEON-NOSVE-NEXT: lsr x8, x8, #63
1487 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
1488 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1489 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1490 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1491 ; NONEON-NOSVE-NEXT: ret
1492 %op1 = load <4 x i64>, ptr %a
1493 %ins = insertelement <4 x i64> undef, i64 63, i64 0
1494 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
1495 %res = lshr <4 x i64> %op1, %op2
1496 store <4 x i64> %res, ptr %a
1504 define void @mul_v32i8(ptr %a) {
1505 ; CHECK-LABEL: mul_v32i8:
1507 ; CHECK-NEXT: ldp q0, q1, [x0]
1508 ; CHECK-NEXT: mul z0.b, z0.b, #7
1509 ; CHECK-NEXT: mul z1.b, z1.b, #7
1510 ; CHECK-NEXT: stp q0, q1, [x0]
1513 ; NONEON-NOSVE-LABEL: mul_v32i8:
1514 ; NONEON-NOSVE: // %bb.0:
1515 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1516 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1517 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1518 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
1519 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1520 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1521 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
1522 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
1523 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1524 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1525 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
1526 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
1527 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1528 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1529 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
1530 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
1531 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1532 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1533 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
1534 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
1535 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1536 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1537 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
1538 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
1539 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1540 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1541 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
1542 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
1543 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1544 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1545 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
1546 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
1547 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1548 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1549 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
1550 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1551 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1552 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1553 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
1554 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1555 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1556 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1557 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
1558 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1559 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1560 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1561 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
1562 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1563 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1564 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1565 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
1566 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1567 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1568 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1569 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
1570 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1571 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1572 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1573 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
1574 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1575 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1576 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1577 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
1578 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1579 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1580 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1581 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
1582 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
1583 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1584 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1585 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
1586 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
1587 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1588 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1589 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
1590 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
1591 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1592 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1593 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
1594 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
1595 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1596 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1597 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
1598 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
1599 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1600 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1601 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
1602 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
1603 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1604 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1605 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
1606 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
1607 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1608 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1609 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
1610 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
1611 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1612 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1613 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
1614 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
1615 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1616 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1617 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
1618 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
1619 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1620 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1621 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
1622 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
1623 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1624 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1625 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
1626 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
1627 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1628 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1629 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
1630 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
1631 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1632 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1633 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
1634 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
1635 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1636 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1637 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
1638 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
1639 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1640 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1641 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
1642 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
1643 ; NONEON-NOSVE-NEXT: lsl w9, w8, #3
1644 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1645 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
1646 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1647 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1648 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1649 ; NONEON-NOSVE-NEXT: ret
1650 %op1 = load <32 x i8>, ptr %a
1651 %ins = insertelement <32 x i8> undef, i8 7, i64 0
1652 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
1653 %res = mul <32 x i8> %op1, %op2
1654 store <32 x i8> %res, ptr %a
1658 define void @mul_v16i16(ptr %a) {
1659 ; CHECK-LABEL: mul_v16i16:
1661 ; CHECK-NEXT: ldp q0, q1, [x0]
1662 ; CHECK-NEXT: mul z0.h, z0.h, #15
1663 ; CHECK-NEXT: mul z1.h, z1.h, #15
1664 ; CHECK-NEXT: stp q0, q1, [x0]
1667 ; NONEON-NOSVE-LABEL: mul_v16i16:
1668 ; NONEON-NOSVE: // %bb.0:
1669 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1670 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1671 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1672 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
1673 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1674 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1675 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
1676 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
1677 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1678 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1679 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
1680 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
1681 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1682 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1683 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
1684 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
1685 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1686 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1687 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
1688 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
1689 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1690 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1691 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
1692 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1693 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1694 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1695 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
1696 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
1697 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1698 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1699 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
1700 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
1701 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1702 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1703 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
1704 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
1705 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1706 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1707 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1708 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
1709 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1710 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1711 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1712 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
1713 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1714 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1715 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1716 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
1717 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1718 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1719 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1720 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
1721 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1722 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1723 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1724 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
1725 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1726 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1727 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1728 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
1729 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1730 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1731 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1732 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
1733 ; NONEON-NOSVE-NEXT: lsl w9, w8, #4
1734 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1735 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1736 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1737 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1738 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1739 ; NONEON-NOSVE-NEXT: ret
1740 %op1 = load <16 x i16>, ptr %a
1741 %ins = insertelement <16 x i16> undef, i16 15, i64 0
1742 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
1743 %res = mul <16 x i16> %op1, %op2
1744 store <16 x i16> %res, ptr %a
1748 define void @mul_v8i32(ptr %a) {
1749 ; CHECK-LABEL: mul_v8i32:
1751 ; CHECK-NEXT: ldp q0, q1, [x0]
1752 ; CHECK-NEXT: mul z0.s, z0.s, #31
1753 ; CHECK-NEXT: mul z1.s, z1.s, #31
1754 ; CHECK-NEXT: stp q0, q1, [x0]
1757 ; NONEON-NOSVE-LABEL: mul_v8i32:
1758 ; NONEON-NOSVE: // %bb.0:
1759 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1760 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1761 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1762 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
1763 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1764 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1765 ; NONEON-NOSVE-NEXT: str w8, [sp, #60]
1766 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
1767 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1768 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1769 ; NONEON-NOSVE-NEXT: str w8, [sp, #56]
1770 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
1771 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1772 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1773 ; NONEON-NOSVE-NEXT: str w8, [sp, #52]
1774 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1775 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1776 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1777 ; NONEON-NOSVE-NEXT: str w8, [sp, #48]
1778 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
1779 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1780 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1781 ; NONEON-NOSVE-NEXT: str w8, [sp, #44]
1782 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
1783 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1784 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1785 ; NONEON-NOSVE-NEXT: str w8, [sp, #40]
1786 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
1787 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1788 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1789 ; NONEON-NOSVE-NEXT: str w8, [sp, #36]
1790 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
1791 ; NONEON-NOSVE-NEXT: lsl w9, w8, #5
1792 ; NONEON-NOSVE-NEXT: sub w8, w9, w8
1793 ; NONEON-NOSVE-NEXT: str w8, [sp, #32]
1794 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1795 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1796 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1797 ; NONEON-NOSVE-NEXT: ret
1798 %op1 = load <8 x i32>, ptr %a
1799 %ins = insertelement <8 x i32> undef, i32 31, i64 0
1800 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
1801 %res = mul <8 x i32> %op1, %op2
1802 store <8 x i32> %res, ptr %a
1806 define void @mul_v4i64(ptr %a) {
1807 ; CHECK-LABEL: mul_v4i64:
1809 ; CHECK-NEXT: ldp q0, q1, [x0]
1810 ; CHECK-NEXT: mul z0.d, z0.d, #63
1811 ; CHECK-NEXT: mul z1.d, z1.d, #63
1812 ; CHECK-NEXT: stp q0, q1, [x0]
1815 ; NONEON-NOSVE-LABEL: mul_v4i64:
1816 ; NONEON-NOSVE: // %bb.0:
1817 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1818 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1819 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1820 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1821 ; NONEON-NOSVE-NEXT: lsl x9, x8, #6
1822 ; NONEON-NOSVE-NEXT: sub x8, x9, x8
1823 ; NONEON-NOSVE-NEXT: str x8, [sp, #56]
1824 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1825 ; NONEON-NOSVE-NEXT: lsl x9, x8, #6
1826 ; NONEON-NOSVE-NEXT: sub x8, x9, x8
1827 ; NONEON-NOSVE-NEXT: str x8, [sp, #48]
1828 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
1829 ; NONEON-NOSVE-NEXT: lsl x9, x8, #6
1830 ; NONEON-NOSVE-NEXT: sub x8, x9, x8
1831 ; NONEON-NOSVE-NEXT: str x8, [sp, #40]
1832 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
1833 ; NONEON-NOSVE-NEXT: lsl x9, x8, #6
1834 ; NONEON-NOSVE-NEXT: sub x8, x9, x8
1835 ; NONEON-NOSVE-NEXT: str x8, [sp, #32]
1836 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1837 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1838 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1839 ; NONEON-NOSVE-NEXT: ret
1840 %op1 = load <4 x i64>, ptr %a
1841 %ins = insertelement <4 x i64> undef, i64 63, i64 0
1842 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
1843 %res = mul <4 x i64> %op1, %op2
1844 store <4 x i64> %res, ptr %a
1852 define void @or_v32i8(ptr %a) {
1853 ; CHECK-LABEL: or_v32i8:
1855 ; CHECK-NEXT: ldp q0, q1, [x0]
1856 ; CHECK-NEXT: orr z0.b, z0.b, #0x7
1857 ; CHECK-NEXT: orr z1.b, z1.b, #0x7
1858 ; CHECK-NEXT: stp q0, q1, [x0]
1861 ; NONEON-NOSVE-LABEL: or_v32i8:
1862 ; NONEON-NOSVE: // %bb.0:
1863 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1864 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1865 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1866 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
1867 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1868 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
1869 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
1870 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1871 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
1872 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
1873 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1874 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
1875 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
1876 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1877 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
1878 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
1879 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1880 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
1881 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
1882 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1883 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
1884 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
1885 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1886 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
1887 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
1888 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1889 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
1890 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1891 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1892 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
1893 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1894 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1895 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
1896 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1897 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1898 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
1899 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1900 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1901 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
1902 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1903 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1904 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
1905 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1906 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1907 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
1908 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1909 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1910 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
1911 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1912 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1913 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
1914 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
1915 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1916 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
1917 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
1918 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1919 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
1920 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
1921 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1922 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
1923 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
1924 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1925 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
1926 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
1927 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1928 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
1929 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
1930 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1931 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
1932 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
1933 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1934 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
1935 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
1936 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1937 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
1938 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
1939 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1940 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
1941 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
1942 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1943 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
1944 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
1945 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1946 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
1947 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
1948 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1949 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
1950 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
1951 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1952 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
1953 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
1954 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1955 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
1956 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
1957 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1958 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
1959 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
1960 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x7
1961 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
1962 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1963 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1964 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1965 ; NONEON-NOSVE-NEXT: ret
1966 %op1 = load <32 x i8>, ptr %a
1967 %ins = insertelement <32 x i8> undef, i8 7, i64 0
1968 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
1969 %res = or <32 x i8> %op1, %op2
1970 store <32 x i8> %res, ptr %a
1974 define void @or_v16i16(ptr %a) {
1975 ; CHECK-LABEL: or_v16i16:
1977 ; CHECK-NEXT: ldp q0, q1, [x0]
1978 ; CHECK-NEXT: orr z0.h, z0.h, #0xf
1979 ; CHECK-NEXT: orr z1.h, z1.h, #0xf
1980 ; CHECK-NEXT: stp q0, q1, [x0]
1983 ; NONEON-NOSVE-LABEL: or_v16i16:
1984 ; NONEON-NOSVE: // %bb.0:
1985 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1986 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1987 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1988 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
1989 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
1990 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
1991 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
1992 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
1993 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
1994 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
1995 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
1996 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
1997 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
1998 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
1999 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
2000 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
2001 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2002 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
2003 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
2004 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2005 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
2006 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
2007 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2008 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
2009 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
2010 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2011 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
2012 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
2013 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2014 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
2015 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
2016 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2017 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
2018 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
2019 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2020 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
2021 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
2022 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2023 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
2024 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
2025 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2026 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
2027 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
2028 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2029 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
2030 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
2031 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2032 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
2033 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
2034 ; NONEON-NOSVE-NEXT: orr w8, w8, #0xf
2035 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
2036 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2037 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2038 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2039 ; NONEON-NOSVE-NEXT: ret
2040 %op1 = load <16 x i16>, ptr %a
2041 %ins = insertelement <16 x i16> undef, i16 15, i64 0
2042 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
2043 %res = or <16 x i16> %op1, %op2
2044 store <16 x i16> %res, ptr %a
2048 define void @or_v8i32(ptr %a) {
2049 ; CHECK-LABEL: or_v8i32:
2051 ; CHECK-NEXT: ldp q0, q1, [x0]
2052 ; CHECK-NEXT: orr z0.s, z0.s, #0x1f
2053 ; CHECK-NEXT: orr z1.s, z1.s, #0x1f
2054 ; CHECK-NEXT: stp q0, q1, [x0]
2057 ; NONEON-NOSVE-LABEL: or_v8i32:
2058 ; NONEON-NOSVE: // %bb.0:
2059 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2060 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2061 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2062 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
2063 ; NONEON-NOSVE-NEXT: orr w9, w8, #0x1f
2064 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
2065 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x1f
2066 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
2067 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
2068 ; NONEON-NOSVE-NEXT: orr w9, w8, #0x1f
2069 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
2070 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x1f
2071 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
2072 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
2073 ; NONEON-NOSVE-NEXT: orr w9, w8, #0x1f
2074 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
2075 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x1f
2076 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
2077 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
2078 ; NONEON-NOSVE-NEXT: orr w9, w8, #0x1f
2079 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
2080 ; NONEON-NOSVE-NEXT: orr w8, w8, #0x1f
2081 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
2082 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2083 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2084 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2085 ; NONEON-NOSVE-NEXT: ret
2086 %op1 = load <8 x i32>, ptr %a
2087 %ins = insertelement <8 x i32> undef, i32 31, i64 0
2088 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
2089 %res = or <8 x i32> %op1, %op2
2090 store <8 x i32> %res, ptr %a
2094 define void @or_v4i64(ptr %a) {
2095 ; CHECK-LABEL: or_v4i64:
2097 ; CHECK-NEXT: ldp q0, q1, [x0]
2098 ; CHECK-NEXT: orr z0.d, z0.d, #0x3f
2099 ; CHECK-NEXT: orr z1.d, z1.d, #0x3f
2100 ; CHECK-NEXT: stp q0, q1, [x0]
2103 ; NONEON-NOSVE-LABEL: or_v4i64:
2104 ; NONEON-NOSVE: // %bb.0:
2105 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2106 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2107 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2108 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
2109 ; NONEON-NOSVE-NEXT: orr x9, x8, #0x3f
2110 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
2111 ; NONEON-NOSVE-NEXT: orr x8, x8, #0x3f
2112 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
2113 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
2114 ; NONEON-NOSVE-NEXT: orr x9, x8, #0x3f
2115 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
2116 ; NONEON-NOSVE-NEXT: orr x8, x8, #0x3f
2117 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
2118 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2119 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2120 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2121 ; NONEON-NOSVE-NEXT: ret
2122 %op1 = load <4 x i64>, ptr %a
2123 %ins = insertelement <4 x i64> undef, i64 63, i64 0
2124 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
2125 %res = or <4 x i64> %op1, %op2
2126 store <4 x i64> %res, ptr %a
2134 define void @shl_v32i8(ptr %a) {
2135 ; CHECK-LABEL: shl_v32i8:
2137 ; CHECK-NEXT: ldp q0, q1, [x0]
2138 ; CHECK-NEXT: lsl z0.b, z0.b, #7
2139 ; CHECK-NEXT: lsl z1.b, z1.b, #7
2140 ; CHECK-NEXT: stp q0, q1, [x0]
2143 ; NONEON-NOSVE-LABEL: shl_v32i8:
2144 ; NONEON-NOSVE: // %bb.0:
2145 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2146 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2147 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2148 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
2149 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2150 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
2151 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
2152 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2153 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
2154 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
2155 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2156 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
2157 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
2158 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2159 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
2160 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
2161 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2162 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
2163 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
2164 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2165 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
2166 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
2167 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2168 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
2169 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
2170 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2171 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
2172 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
2173 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2174 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
2175 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
2176 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2177 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
2178 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
2179 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2180 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
2181 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
2182 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2183 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
2184 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
2185 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2186 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
2187 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
2188 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2189 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
2190 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
2191 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2192 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
2193 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
2194 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2195 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
2196 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
2197 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2198 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
2199 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
2200 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2201 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
2202 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
2203 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2204 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
2205 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
2206 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2207 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
2208 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
2209 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2210 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
2211 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
2212 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2213 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
2214 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
2215 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2216 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
2217 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
2218 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2219 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
2220 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
2221 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2222 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
2223 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
2224 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2225 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
2226 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
2227 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2228 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
2229 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
2230 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2231 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
2232 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
2233 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2234 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
2235 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
2236 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2237 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
2238 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
2239 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2240 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
2241 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
2242 ; NONEON-NOSVE-NEXT: lsl w8, w8, #7
2243 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
2244 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2245 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2246 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2247 ; NONEON-NOSVE-NEXT: ret
2248 %op1 = load <32 x i8>, ptr %a
2249 %ins = insertelement <32 x i8> undef, i8 7, i64 0
2250 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
2251 %res = shl <32 x i8> %op1, %op2
2252 store <32 x i8> %res, ptr %a
2256 define void @shl_v16i16(ptr %a) {
2257 ; CHECK-LABEL: shl_v16i16:
2259 ; CHECK-NEXT: ldp q0, q1, [x0]
2260 ; CHECK-NEXT: lsl z0.h, z0.h, #15
2261 ; CHECK-NEXT: lsl z1.h, z1.h, #15
2262 ; CHECK-NEXT: stp q0, q1, [x0]
2265 ; NONEON-NOSVE-LABEL: shl_v16i16:
2266 ; NONEON-NOSVE: // %bb.0:
2267 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2268 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2269 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2270 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
2271 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2272 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
2273 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
2274 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2275 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
2276 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
2277 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2278 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
2279 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
2280 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2281 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
2282 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
2283 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2284 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
2285 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
2286 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2287 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
2288 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
2289 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2290 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
2291 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
2292 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2293 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
2294 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
2295 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2296 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
2297 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
2298 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2299 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
2300 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
2301 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2302 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
2303 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
2304 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2305 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
2306 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
2307 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2308 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
2309 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
2310 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2311 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
2312 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
2313 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2314 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
2315 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
2316 ; NONEON-NOSVE-NEXT: lsl w8, w8, #15
2317 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
2318 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2319 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2320 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2321 ; NONEON-NOSVE-NEXT: ret
2322 %op1 = load <16 x i16>, ptr %a
2323 %ins = insertelement <16 x i16> undef, i16 15, i64 0
2324 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
2325 %res = shl <16 x i16> %op1, %op2
2326 store <16 x i16> %res, ptr %a
2330 define void @shl_v8i32(ptr %a) {
2331 ; CHECK-LABEL: shl_v8i32:
2333 ; CHECK-NEXT: ldp q0, q1, [x0]
2334 ; CHECK-NEXT: lsl z0.s, z0.s, #31
2335 ; CHECK-NEXT: lsl z1.s, z1.s, #31
2336 ; CHECK-NEXT: stp q0, q1, [x0]
2339 ; NONEON-NOSVE-LABEL: shl_v8i32:
2340 ; NONEON-NOSVE: // %bb.0:
2341 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2342 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2343 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2344 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
2345 ; NONEON-NOSVE-NEXT: lsl w9, w8, #31
2346 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
2347 ; NONEON-NOSVE-NEXT: lsl w8, w8, #31
2348 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
2349 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
2350 ; NONEON-NOSVE-NEXT: lsl w9, w8, #31
2351 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
2352 ; NONEON-NOSVE-NEXT: lsl w8, w8, #31
2353 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
2354 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
2355 ; NONEON-NOSVE-NEXT: lsl w9, w8, #31
2356 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
2357 ; NONEON-NOSVE-NEXT: lsl w8, w8, #31
2358 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
2359 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
2360 ; NONEON-NOSVE-NEXT: lsl w9, w8, #31
2361 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
2362 ; NONEON-NOSVE-NEXT: lsl w8, w8, #31
2363 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
2364 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2365 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2366 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2367 ; NONEON-NOSVE-NEXT: ret
2368 %op1 = load <8 x i32>, ptr %a
2369 %ins = insertelement <8 x i32> undef, i32 31, i64 0
2370 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
2371 %res = shl <8 x i32> %op1, %op2
2372 store <8 x i32> %res, ptr %a
2376 define void @shl_v4i64(ptr %a) {
2377 ; CHECK-LABEL: shl_v4i64:
2379 ; CHECK-NEXT: ldp q0, q1, [x0]
2380 ; CHECK-NEXT: lsl z0.d, z0.d, #63
2381 ; CHECK-NEXT: lsl z1.d, z1.d, #63
2382 ; CHECK-NEXT: stp q0, q1, [x0]
2385 ; NONEON-NOSVE-LABEL: shl_v4i64:
2386 ; NONEON-NOSVE: // %bb.0:
2387 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2388 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2389 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2390 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
2391 ; NONEON-NOSVE-NEXT: lsl x9, x8, #63
2392 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
2393 ; NONEON-NOSVE-NEXT: lsl x8, x8, #63
2394 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
2395 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
2396 ; NONEON-NOSVE-NEXT: lsl x9, x8, #63
2397 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
2398 ; NONEON-NOSVE-NEXT: lsl x8, x8, #63
2399 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
2400 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2401 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2402 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2403 ; NONEON-NOSVE-NEXT: ret
2404 %op1 = load <4 x i64>, ptr %a
2405 %ins = insertelement <4 x i64> undef, i64 63, i64 0
2406 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
2407 %res = shl <4 x i64> %op1, %op2
2408 store <4 x i64> %res, ptr %a
2416 define void @smax_v32i8(ptr %a) {
2417 ; CHECK-LABEL: smax_v32i8:
2419 ; CHECK-NEXT: ldp q0, q1, [x0]
2420 ; CHECK-NEXT: smax z0.b, z0.b, #7
2421 ; CHECK-NEXT: smax z1.b, z1.b, #7
2422 ; CHECK-NEXT: stp q0, q1, [x0]
2425 ; NONEON-NOSVE-LABEL: smax_v32i8:
2426 ; NONEON-NOSVE: // %bb.0:
2427 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2428 ; NONEON-NOSVE-NEXT: mov w8, #7 // =0x7
2429 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2430 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2431 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #31]
2432 ; NONEON-NOSVE-NEXT: cmp w9, #7
2433 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2434 ; NONEON-NOSVE-NEXT: strb w9, [sp, #63]
2435 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #30]
2436 ; NONEON-NOSVE-NEXT: cmp w9, #7
2437 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2438 ; NONEON-NOSVE-NEXT: strb w9, [sp, #62]
2439 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #29]
2440 ; NONEON-NOSVE-NEXT: cmp w9, #7
2441 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2442 ; NONEON-NOSVE-NEXT: strb w9, [sp, #61]
2443 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #28]
2444 ; NONEON-NOSVE-NEXT: cmp w9, #7
2445 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2446 ; NONEON-NOSVE-NEXT: strb w9, [sp, #60]
2447 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #27]
2448 ; NONEON-NOSVE-NEXT: cmp w9, #7
2449 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2450 ; NONEON-NOSVE-NEXT: strb w9, [sp, #59]
2451 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #26]
2452 ; NONEON-NOSVE-NEXT: cmp w9, #7
2453 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2454 ; NONEON-NOSVE-NEXT: strb w9, [sp, #58]
2455 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #25]
2456 ; NONEON-NOSVE-NEXT: cmp w9, #7
2457 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2458 ; NONEON-NOSVE-NEXT: strb w9, [sp, #57]
2459 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #24]
2460 ; NONEON-NOSVE-NEXT: cmp w9, #7
2461 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2462 ; NONEON-NOSVE-NEXT: strb w9, [sp, #56]
2463 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #23]
2464 ; NONEON-NOSVE-NEXT: cmp w9, #7
2465 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2466 ; NONEON-NOSVE-NEXT: strb w9, [sp, #55]
2467 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #22]
2468 ; NONEON-NOSVE-NEXT: cmp w9, #7
2469 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2470 ; NONEON-NOSVE-NEXT: strb w9, [sp, #54]
2471 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #21]
2472 ; NONEON-NOSVE-NEXT: cmp w9, #7
2473 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2474 ; NONEON-NOSVE-NEXT: strb w9, [sp, #53]
2475 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #20]
2476 ; NONEON-NOSVE-NEXT: cmp w9, #7
2477 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2478 ; NONEON-NOSVE-NEXT: strb w9, [sp, #52]
2479 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #19]
2480 ; NONEON-NOSVE-NEXT: cmp w9, #7
2481 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2482 ; NONEON-NOSVE-NEXT: strb w9, [sp, #51]
2483 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #18]
2484 ; NONEON-NOSVE-NEXT: cmp w9, #7
2485 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2486 ; NONEON-NOSVE-NEXT: strb w9, [sp, #50]
2487 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #17]
2488 ; NONEON-NOSVE-NEXT: cmp w9, #7
2489 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2490 ; NONEON-NOSVE-NEXT: strb w9, [sp, #49]
2491 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #16]
2492 ; NONEON-NOSVE-NEXT: cmp w9, #7
2493 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2494 ; NONEON-NOSVE-NEXT: strb w9, [sp, #48]
2495 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #15]
2496 ; NONEON-NOSVE-NEXT: cmp w9, #7
2497 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2498 ; NONEON-NOSVE-NEXT: strb w9, [sp, #47]
2499 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
2500 ; NONEON-NOSVE-NEXT: cmp w9, #7
2501 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2502 ; NONEON-NOSVE-NEXT: strb w9, [sp, #46]
2503 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #13]
2504 ; NONEON-NOSVE-NEXT: cmp w9, #7
2505 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2506 ; NONEON-NOSVE-NEXT: strb w9, [sp, #45]
2507 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #12]
2508 ; NONEON-NOSVE-NEXT: cmp w9, #7
2509 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2510 ; NONEON-NOSVE-NEXT: strb w9, [sp, #44]
2511 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #11]
2512 ; NONEON-NOSVE-NEXT: cmp w9, #7
2513 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2514 ; NONEON-NOSVE-NEXT: strb w9, [sp, #43]
2515 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #10]
2516 ; NONEON-NOSVE-NEXT: cmp w9, #7
2517 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2518 ; NONEON-NOSVE-NEXT: strb w9, [sp, #42]
2519 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #9]
2520 ; NONEON-NOSVE-NEXT: cmp w9, #7
2521 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2522 ; NONEON-NOSVE-NEXT: strb w9, [sp, #41]
2523 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #8]
2524 ; NONEON-NOSVE-NEXT: cmp w9, #7
2525 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2526 ; NONEON-NOSVE-NEXT: strb w9, [sp, #40]
2527 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #7]
2528 ; NONEON-NOSVE-NEXT: cmp w9, #7
2529 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2530 ; NONEON-NOSVE-NEXT: strb w9, [sp, #39]
2531 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #6]
2532 ; NONEON-NOSVE-NEXT: cmp w9, #7
2533 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2534 ; NONEON-NOSVE-NEXT: strb w9, [sp, #38]
2535 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #5]
2536 ; NONEON-NOSVE-NEXT: cmp w9, #7
2537 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2538 ; NONEON-NOSVE-NEXT: strb w9, [sp, #37]
2539 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #4]
2540 ; NONEON-NOSVE-NEXT: cmp w9, #7
2541 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2542 ; NONEON-NOSVE-NEXT: strb w9, [sp, #36]
2543 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #3]
2544 ; NONEON-NOSVE-NEXT: cmp w9, #7
2545 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2546 ; NONEON-NOSVE-NEXT: strb w9, [sp, #35]
2547 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #2]
2548 ; NONEON-NOSVE-NEXT: cmp w9, #7
2549 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2550 ; NONEON-NOSVE-NEXT: strb w9, [sp, #34]
2551 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #1]
2552 ; NONEON-NOSVE-NEXT: cmp w9, #7
2553 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2554 ; NONEON-NOSVE-NEXT: strb w9, [sp, #33]
2555 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp]
2556 ; NONEON-NOSVE-NEXT: cmp w9, #7
2557 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, gt
2558 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
2559 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2560 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2561 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2562 ; NONEON-NOSVE-NEXT: ret
2563 %op1 = load <32 x i8>, ptr %a
2564 %ins = insertelement <32 x i8> undef, i8 7, i64 0
2565 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
2566 %res = call <32 x i8> @llvm.smax.v32i8(<32 x i8> %op1, <32 x i8> %op2)
2567 store <32 x i8> %res, ptr %a
2571 define void @smax_v16i16(ptr %a) {
2572 ; CHECK-LABEL: smax_v16i16:
2574 ; CHECK-NEXT: ldp q0, q1, [x0]
2575 ; CHECK-NEXT: smax z0.h, z0.h, #15
2576 ; CHECK-NEXT: smax z1.h, z1.h, #15
2577 ; CHECK-NEXT: stp q0, q1, [x0]
2580 ; NONEON-NOSVE-LABEL: smax_v16i16:
2581 ; NONEON-NOSVE: // %bb.0:
2582 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2583 ; NONEON-NOSVE-NEXT: mov w8, #15 // =0xf
2584 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2585 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2586 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #30]
2587 ; NONEON-NOSVE-NEXT: cmp w9, #15
2588 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2589 ; NONEON-NOSVE-NEXT: strh w9, [sp, #62]
2590 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #28]
2591 ; NONEON-NOSVE-NEXT: cmp w9, #15
2592 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2593 ; NONEON-NOSVE-NEXT: strh w9, [sp, #60]
2594 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #26]
2595 ; NONEON-NOSVE-NEXT: cmp w9, #15
2596 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2597 ; NONEON-NOSVE-NEXT: strh w9, [sp, #58]
2598 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #24]
2599 ; NONEON-NOSVE-NEXT: cmp w9, #15
2600 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2601 ; NONEON-NOSVE-NEXT: strh w9, [sp, #56]
2602 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #22]
2603 ; NONEON-NOSVE-NEXT: cmp w9, #15
2604 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2605 ; NONEON-NOSVE-NEXT: strh w9, [sp, #54]
2606 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #20]
2607 ; NONEON-NOSVE-NEXT: cmp w9, #15
2608 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2609 ; NONEON-NOSVE-NEXT: strh w9, [sp, #52]
2610 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #18]
2611 ; NONEON-NOSVE-NEXT: cmp w9, #15
2612 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2613 ; NONEON-NOSVE-NEXT: strh w9, [sp, #50]
2614 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #16]
2615 ; NONEON-NOSVE-NEXT: cmp w9, #15
2616 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2617 ; NONEON-NOSVE-NEXT: strh w9, [sp, #48]
2618 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
2619 ; NONEON-NOSVE-NEXT: cmp w9, #15
2620 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2621 ; NONEON-NOSVE-NEXT: strh w9, [sp, #46]
2622 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
2623 ; NONEON-NOSVE-NEXT: cmp w9, #15
2624 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2625 ; NONEON-NOSVE-NEXT: strh w9, [sp, #44]
2626 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
2627 ; NONEON-NOSVE-NEXT: cmp w9, #15
2628 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2629 ; NONEON-NOSVE-NEXT: strh w9, [sp, #42]
2630 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
2631 ; NONEON-NOSVE-NEXT: cmp w9, #15
2632 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2633 ; NONEON-NOSVE-NEXT: strh w9, [sp, #40]
2634 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
2635 ; NONEON-NOSVE-NEXT: cmp w9, #15
2636 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2637 ; NONEON-NOSVE-NEXT: strh w9, [sp, #38]
2638 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
2639 ; NONEON-NOSVE-NEXT: cmp w9, #15
2640 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2641 ; NONEON-NOSVE-NEXT: strh w9, [sp, #36]
2642 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
2643 ; NONEON-NOSVE-NEXT: cmp w9, #15
2644 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2645 ; NONEON-NOSVE-NEXT: strh w9, [sp, #34]
2646 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
2647 ; NONEON-NOSVE-NEXT: cmp w9, #15
2648 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, gt
2649 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
2650 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2651 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2652 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2653 ; NONEON-NOSVE-NEXT: ret
2654 %op1 = load <16 x i16>, ptr %a
2655 %ins = insertelement <16 x i16> undef, i16 15, i64 0
2656 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
2657 %res = call <16 x i16> @llvm.smax.v16i16(<16 x i16> %op1, <16 x i16> %op2)
2658 store <16 x i16> %res, ptr %a
2662 define void @smax_v8i32(ptr %a) {
2663 ; CHECK-LABEL: smax_v8i32:
2665 ; CHECK-NEXT: ldp q0, q1, [x0]
2666 ; CHECK-NEXT: smax z0.s, z0.s, #31
2667 ; CHECK-NEXT: smax z1.s, z1.s, #31
2668 ; CHECK-NEXT: stp q0, q1, [x0]
2671 ; NONEON-NOSVE-LABEL: smax_v8i32:
2672 ; NONEON-NOSVE: // %bb.0:
2673 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2674 ; NONEON-NOSVE-NEXT: mov w8, #31 // =0x1f
2675 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2676 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2677 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #28]
2678 ; NONEON-NOSVE-NEXT: cmp w9, #31
2679 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, gt
2680 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #24]
2681 ; NONEON-NOSVE-NEXT: cmp w9, #31
2682 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2683 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #56]
2684 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #20]
2685 ; NONEON-NOSVE-NEXT: cmp w9, #31
2686 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, gt
2687 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #16]
2688 ; NONEON-NOSVE-NEXT: cmp w9, #31
2689 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2690 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #48]
2691 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #12]
2692 ; NONEON-NOSVE-NEXT: cmp w9, #31
2693 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, gt
2694 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #8]
2695 ; NONEON-NOSVE-NEXT: cmp w9, #31
2696 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, gt
2697 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #40]
2698 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #4]
2699 ; NONEON-NOSVE-NEXT: cmp w9, #31
2700 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, gt
2701 ; NONEON-NOSVE-NEXT: ldr w9, [sp]
2702 ; NONEON-NOSVE-NEXT: cmp w9, #31
2703 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, gt
2704 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
2705 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2706 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2707 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2708 ; NONEON-NOSVE-NEXT: ret
2709 %op1 = load <8 x i32>, ptr %a
2710 %ins = insertelement <8 x i32> undef, i32 31, i64 0
2711 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
2712 %res = call <8 x i32> @llvm.smax.v8i32(<8 x i32> %op1, <8 x i32> %op2)
2713 store <8 x i32> %res, ptr %a
2717 define void @smax_v4i64(ptr %a) {
2718 ; CHECK-LABEL: smax_v4i64:
2720 ; CHECK-NEXT: ldp q0, q1, [x0]
2721 ; CHECK-NEXT: smax z0.d, z0.d, #63
2722 ; CHECK-NEXT: smax z1.d, z1.d, #63
2723 ; CHECK-NEXT: stp q0, q1, [x0]
2726 ; NONEON-NOSVE-LABEL: smax_v4i64:
2727 ; NONEON-NOSVE: // %bb.0:
2728 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2729 ; NONEON-NOSVE-NEXT: mov w8, #63 // =0x3f
2730 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2731 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2732 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #24]
2733 ; NONEON-NOSVE-NEXT: cmp x9, #63
2734 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, gt
2735 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #16]
2736 ; NONEON-NOSVE-NEXT: cmp x9, #63
2737 ; NONEON-NOSVE-NEXT: csel x9, x9, x8, gt
2738 ; NONEON-NOSVE-NEXT: stp x9, x10, [sp, #48]
2739 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #8]
2740 ; NONEON-NOSVE-NEXT: cmp x9, #63
2741 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, gt
2742 ; NONEON-NOSVE-NEXT: ldr x9, [sp]
2743 ; NONEON-NOSVE-NEXT: cmp x9, #63
2744 ; NONEON-NOSVE-NEXT: csel x8, x9, x8, gt
2745 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
2746 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2747 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2748 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2749 ; NONEON-NOSVE-NEXT: ret
2750 %op1 = load <4 x i64>, ptr %a
2751 %ins = insertelement <4 x i64> undef, i64 63, i64 0
2752 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
2753 %res = call <4 x i64> @llvm.smax.v4i64(<4 x i64> %op1, <4 x i64> %op2)
2754 store <4 x i64> %res, ptr %a
2762 define void @smin_v32i8(ptr %a) {
2763 ; CHECK-LABEL: smin_v32i8:
2765 ; CHECK-NEXT: ldp q0, q1, [x0]
2766 ; CHECK-NEXT: smin z0.b, z0.b, #7
2767 ; CHECK-NEXT: smin z1.b, z1.b, #7
2768 ; CHECK-NEXT: stp q0, q1, [x0]
2771 ; NONEON-NOSVE-LABEL: smin_v32i8:
2772 ; NONEON-NOSVE: // %bb.0:
2773 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2774 ; NONEON-NOSVE-NEXT: mov w8, #7 // =0x7
2775 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2776 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2777 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #31]
2778 ; NONEON-NOSVE-NEXT: cmp w9, #7
2779 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2780 ; NONEON-NOSVE-NEXT: strb w9, [sp, #63]
2781 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #30]
2782 ; NONEON-NOSVE-NEXT: cmp w9, #7
2783 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2784 ; NONEON-NOSVE-NEXT: strb w9, [sp, #62]
2785 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #29]
2786 ; NONEON-NOSVE-NEXT: cmp w9, #7
2787 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2788 ; NONEON-NOSVE-NEXT: strb w9, [sp, #61]
2789 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #28]
2790 ; NONEON-NOSVE-NEXT: cmp w9, #7
2791 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2792 ; NONEON-NOSVE-NEXT: strb w9, [sp, #60]
2793 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #27]
2794 ; NONEON-NOSVE-NEXT: cmp w9, #7
2795 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2796 ; NONEON-NOSVE-NEXT: strb w9, [sp, #59]
2797 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #26]
2798 ; NONEON-NOSVE-NEXT: cmp w9, #7
2799 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2800 ; NONEON-NOSVE-NEXT: strb w9, [sp, #58]
2801 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #25]
2802 ; NONEON-NOSVE-NEXT: cmp w9, #7
2803 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2804 ; NONEON-NOSVE-NEXT: strb w9, [sp, #57]
2805 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #24]
2806 ; NONEON-NOSVE-NEXT: cmp w9, #7
2807 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2808 ; NONEON-NOSVE-NEXT: strb w9, [sp, #56]
2809 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #23]
2810 ; NONEON-NOSVE-NEXT: cmp w9, #7
2811 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2812 ; NONEON-NOSVE-NEXT: strb w9, [sp, #55]
2813 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #22]
2814 ; NONEON-NOSVE-NEXT: cmp w9, #7
2815 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2816 ; NONEON-NOSVE-NEXT: strb w9, [sp, #54]
2817 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #21]
2818 ; NONEON-NOSVE-NEXT: cmp w9, #7
2819 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2820 ; NONEON-NOSVE-NEXT: strb w9, [sp, #53]
2821 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #20]
2822 ; NONEON-NOSVE-NEXT: cmp w9, #7
2823 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2824 ; NONEON-NOSVE-NEXT: strb w9, [sp, #52]
2825 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #19]
2826 ; NONEON-NOSVE-NEXT: cmp w9, #7
2827 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2828 ; NONEON-NOSVE-NEXT: strb w9, [sp, #51]
2829 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #18]
2830 ; NONEON-NOSVE-NEXT: cmp w9, #7
2831 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2832 ; NONEON-NOSVE-NEXT: strb w9, [sp, #50]
2833 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #17]
2834 ; NONEON-NOSVE-NEXT: cmp w9, #7
2835 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2836 ; NONEON-NOSVE-NEXT: strb w9, [sp, #49]
2837 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #16]
2838 ; NONEON-NOSVE-NEXT: cmp w9, #7
2839 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2840 ; NONEON-NOSVE-NEXT: strb w9, [sp, #48]
2841 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #15]
2842 ; NONEON-NOSVE-NEXT: cmp w9, #7
2843 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2844 ; NONEON-NOSVE-NEXT: strb w9, [sp, #47]
2845 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
2846 ; NONEON-NOSVE-NEXT: cmp w9, #7
2847 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2848 ; NONEON-NOSVE-NEXT: strb w9, [sp, #46]
2849 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #13]
2850 ; NONEON-NOSVE-NEXT: cmp w9, #7
2851 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2852 ; NONEON-NOSVE-NEXT: strb w9, [sp, #45]
2853 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #12]
2854 ; NONEON-NOSVE-NEXT: cmp w9, #7
2855 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2856 ; NONEON-NOSVE-NEXT: strb w9, [sp, #44]
2857 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #11]
2858 ; NONEON-NOSVE-NEXT: cmp w9, #7
2859 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2860 ; NONEON-NOSVE-NEXT: strb w9, [sp, #43]
2861 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #10]
2862 ; NONEON-NOSVE-NEXT: cmp w9, #7
2863 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2864 ; NONEON-NOSVE-NEXT: strb w9, [sp, #42]
2865 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #9]
2866 ; NONEON-NOSVE-NEXT: cmp w9, #7
2867 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2868 ; NONEON-NOSVE-NEXT: strb w9, [sp, #41]
2869 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #8]
2870 ; NONEON-NOSVE-NEXT: cmp w9, #7
2871 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2872 ; NONEON-NOSVE-NEXT: strb w9, [sp, #40]
2873 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #7]
2874 ; NONEON-NOSVE-NEXT: cmp w9, #7
2875 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2876 ; NONEON-NOSVE-NEXT: strb w9, [sp, #39]
2877 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #6]
2878 ; NONEON-NOSVE-NEXT: cmp w9, #7
2879 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2880 ; NONEON-NOSVE-NEXT: strb w9, [sp, #38]
2881 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #5]
2882 ; NONEON-NOSVE-NEXT: cmp w9, #7
2883 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2884 ; NONEON-NOSVE-NEXT: strb w9, [sp, #37]
2885 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #4]
2886 ; NONEON-NOSVE-NEXT: cmp w9, #7
2887 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2888 ; NONEON-NOSVE-NEXT: strb w9, [sp, #36]
2889 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #3]
2890 ; NONEON-NOSVE-NEXT: cmp w9, #7
2891 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2892 ; NONEON-NOSVE-NEXT: strb w9, [sp, #35]
2893 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #2]
2894 ; NONEON-NOSVE-NEXT: cmp w9, #7
2895 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2896 ; NONEON-NOSVE-NEXT: strb w9, [sp, #34]
2897 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #1]
2898 ; NONEON-NOSVE-NEXT: cmp w9, #7
2899 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2900 ; NONEON-NOSVE-NEXT: strb w9, [sp, #33]
2901 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp]
2902 ; NONEON-NOSVE-NEXT: cmp w9, #7
2903 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lt
2904 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
2905 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2906 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2907 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2908 ; NONEON-NOSVE-NEXT: ret
2909 %op1 = load <32 x i8>, ptr %a
2910 %ins = insertelement <32 x i8> undef, i8 7, i64 0
2911 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
2912 %res = call <32 x i8> @llvm.smin.v32i8(<32 x i8> %op1, <32 x i8> %op2)
2913 store <32 x i8> %res, ptr %a
2917 define void @smin_v16i16(ptr %a) {
2918 ; CHECK-LABEL: smin_v16i16:
2920 ; CHECK-NEXT: ldp q0, q1, [x0]
2921 ; CHECK-NEXT: smin z0.h, z0.h, #15
2922 ; CHECK-NEXT: smin z1.h, z1.h, #15
2923 ; CHECK-NEXT: stp q0, q1, [x0]
2926 ; NONEON-NOSVE-LABEL: smin_v16i16:
2927 ; NONEON-NOSVE: // %bb.0:
2928 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2929 ; NONEON-NOSVE-NEXT: mov w8, #15 // =0xf
2930 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2931 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2932 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #30]
2933 ; NONEON-NOSVE-NEXT: cmp w9, #15
2934 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2935 ; NONEON-NOSVE-NEXT: strh w9, [sp, #62]
2936 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #28]
2937 ; NONEON-NOSVE-NEXT: cmp w9, #15
2938 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2939 ; NONEON-NOSVE-NEXT: strh w9, [sp, #60]
2940 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #26]
2941 ; NONEON-NOSVE-NEXT: cmp w9, #15
2942 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2943 ; NONEON-NOSVE-NEXT: strh w9, [sp, #58]
2944 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #24]
2945 ; NONEON-NOSVE-NEXT: cmp w9, #15
2946 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2947 ; NONEON-NOSVE-NEXT: strh w9, [sp, #56]
2948 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #22]
2949 ; NONEON-NOSVE-NEXT: cmp w9, #15
2950 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2951 ; NONEON-NOSVE-NEXT: strh w9, [sp, #54]
2952 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #20]
2953 ; NONEON-NOSVE-NEXT: cmp w9, #15
2954 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2955 ; NONEON-NOSVE-NEXT: strh w9, [sp, #52]
2956 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #18]
2957 ; NONEON-NOSVE-NEXT: cmp w9, #15
2958 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2959 ; NONEON-NOSVE-NEXT: strh w9, [sp, #50]
2960 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #16]
2961 ; NONEON-NOSVE-NEXT: cmp w9, #15
2962 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2963 ; NONEON-NOSVE-NEXT: strh w9, [sp, #48]
2964 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
2965 ; NONEON-NOSVE-NEXT: cmp w9, #15
2966 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2967 ; NONEON-NOSVE-NEXT: strh w9, [sp, #46]
2968 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
2969 ; NONEON-NOSVE-NEXT: cmp w9, #15
2970 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2971 ; NONEON-NOSVE-NEXT: strh w9, [sp, #44]
2972 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
2973 ; NONEON-NOSVE-NEXT: cmp w9, #15
2974 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2975 ; NONEON-NOSVE-NEXT: strh w9, [sp, #42]
2976 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
2977 ; NONEON-NOSVE-NEXT: cmp w9, #15
2978 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2979 ; NONEON-NOSVE-NEXT: strh w9, [sp, #40]
2980 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
2981 ; NONEON-NOSVE-NEXT: cmp w9, #15
2982 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2983 ; NONEON-NOSVE-NEXT: strh w9, [sp, #38]
2984 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
2985 ; NONEON-NOSVE-NEXT: cmp w9, #15
2986 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2987 ; NONEON-NOSVE-NEXT: strh w9, [sp, #36]
2988 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
2989 ; NONEON-NOSVE-NEXT: cmp w9, #15
2990 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
2991 ; NONEON-NOSVE-NEXT: strh w9, [sp, #34]
2992 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
2993 ; NONEON-NOSVE-NEXT: cmp w9, #15
2994 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lt
2995 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
2996 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2997 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2998 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2999 ; NONEON-NOSVE-NEXT: ret
3000 %op1 = load <16 x i16>, ptr %a
3001 %ins = insertelement <16 x i16> undef, i16 15, i64 0
3002 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
3003 %res = call <16 x i16> @llvm.smin.v16i16(<16 x i16> %op1, <16 x i16> %op2)
3004 store <16 x i16> %res, ptr %a
3008 define void @smin_v8i32(ptr %a) {
3009 ; CHECK-LABEL: smin_v8i32:
3011 ; CHECK-NEXT: ldp q0, q1, [x0]
3012 ; CHECK-NEXT: smin z0.s, z0.s, #31
3013 ; CHECK-NEXT: smin z1.s, z1.s, #31
3014 ; CHECK-NEXT: stp q0, q1, [x0]
3017 ; NONEON-NOSVE-LABEL: smin_v8i32:
3018 ; NONEON-NOSVE: // %bb.0:
3019 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3020 ; NONEON-NOSVE-NEXT: mov w8, #31 // =0x1f
3021 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3022 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3023 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #28]
3024 ; NONEON-NOSVE-NEXT: cmp w9, #31
3025 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lt
3026 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #24]
3027 ; NONEON-NOSVE-NEXT: cmp w9, #31
3028 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
3029 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #56]
3030 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #20]
3031 ; NONEON-NOSVE-NEXT: cmp w9, #31
3032 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lt
3033 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #16]
3034 ; NONEON-NOSVE-NEXT: cmp w9, #31
3035 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
3036 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #48]
3037 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #12]
3038 ; NONEON-NOSVE-NEXT: cmp w9, #31
3039 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lt
3040 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #8]
3041 ; NONEON-NOSVE-NEXT: cmp w9, #31
3042 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lt
3043 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #40]
3044 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #4]
3045 ; NONEON-NOSVE-NEXT: cmp w9, #31
3046 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lt
3047 ; NONEON-NOSVE-NEXT: ldr w9, [sp]
3048 ; NONEON-NOSVE-NEXT: cmp w9, #31
3049 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lt
3050 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
3051 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3052 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3053 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3054 ; NONEON-NOSVE-NEXT: ret
3055 %op1 = load <8 x i32>, ptr %a
3056 %ins = insertelement <8 x i32> undef, i32 31, i64 0
3057 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
3058 %res = call <8 x i32> @llvm.smin.v8i32(<8 x i32> %op1, <8 x i32> %op2)
3059 store <8 x i32> %res, ptr %a
3063 define void @smin_v4i64(ptr %a) {
3064 ; CHECK-LABEL: smin_v4i64:
3066 ; CHECK-NEXT: ldp q0, q1, [x0]
3067 ; CHECK-NEXT: smin z0.d, z0.d, #63
3068 ; CHECK-NEXT: smin z1.d, z1.d, #63
3069 ; CHECK-NEXT: stp q0, q1, [x0]
3072 ; NONEON-NOSVE-LABEL: smin_v4i64:
3073 ; NONEON-NOSVE: // %bb.0:
3074 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3075 ; NONEON-NOSVE-NEXT: mov w8, #63 // =0x3f
3076 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3077 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3078 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #24]
3079 ; NONEON-NOSVE-NEXT: cmp x9, #63
3080 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, lt
3081 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #16]
3082 ; NONEON-NOSVE-NEXT: cmp x9, #63
3083 ; NONEON-NOSVE-NEXT: csel x9, x9, x8, lt
3084 ; NONEON-NOSVE-NEXT: stp x9, x10, [sp, #48]
3085 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #8]
3086 ; NONEON-NOSVE-NEXT: cmp x9, #63
3087 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, lt
3088 ; NONEON-NOSVE-NEXT: ldr x9, [sp]
3089 ; NONEON-NOSVE-NEXT: cmp x9, #63
3090 ; NONEON-NOSVE-NEXT: csel x8, x9, x8, lt
3091 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
3092 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3093 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3094 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3095 ; NONEON-NOSVE-NEXT: ret
3096 %op1 = load <4 x i64>, ptr %a
3097 %ins = insertelement <4 x i64> undef, i64 63, i64 0
3098 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
3099 %res = call <4 x i64> @llvm.smin.v4i64(<4 x i64> %op1, <4 x i64> %op2)
3100 store <4 x i64> %res, ptr %a
3108 define void @sub_v32i8(ptr %a) {
3109 ; CHECK-LABEL: sub_v32i8:
3111 ; CHECK-NEXT: ldp q0, q1, [x0]
3112 ; CHECK-NEXT: sub z0.b, z0.b, #7 // =0x7
3113 ; CHECK-NEXT: sub z1.b, z1.b, #7 // =0x7
3114 ; CHECK-NEXT: stp q0, q1, [x0]
3117 ; NONEON-NOSVE-LABEL: sub_v32i8:
3118 ; NONEON-NOSVE: // %bb.0:
3119 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3120 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3121 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3122 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
3123 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3124 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
3125 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
3126 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3127 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
3128 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
3129 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3130 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
3131 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
3132 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3133 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
3134 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
3135 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3136 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
3137 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
3138 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3139 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
3140 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
3141 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3142 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
3143 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
3144 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3145 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
3146 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
3147 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3148 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
3149 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
3150 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3151 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
3152 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
3153 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3154 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
3155 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
3156 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3157 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
3158 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
3159 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3160 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
3161 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
3162 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3163 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
3164 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
3165 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3166 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
3167 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
3168 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3169 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
3170 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
3171 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3172 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
3173 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
3174 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3175 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
3176 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
3177 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3178 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
3179 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
3180 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3181 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
3182 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
3183 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3184 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
3185 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
3186 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3187 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
3188 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
3189 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3190 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
3191 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
3192 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3193 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
3194 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
3195 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3196 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
3197 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
3198 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3199 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
3200 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
3201 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3202 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
3203 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
3204 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3205 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
3206 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
3207 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3208 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
3209 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
3210 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3211 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
3212 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
3213 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3214 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
3215 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
3216 ; NONEON-NOSVE-NEXT: sub w8, w8, #7
3217 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
3218 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3219 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3220 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3221 ; NONEON-NOSVE-NEXT: ret
3222 %op1 = load <32 x i8>, ptr %a
3223 %ins = insertelement <32 x i8> undef, i8 7, i64 0
3224 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
3225 %res = sub <32 x i8> %op1, %op2
3226 store <32 x i8> %res, ptr %a
3230 define void @sub_v16i16(ptr %a) {
3231 ; CHECK-LABEL: sub_v16i16:
3233 ; CHECK-NEXT: ldp q0, q1, [x0]
3234 ; CHECK-NEXT: sub z0.h, z0.h, #15 // =0xf
3235 ; CHECK-NEXT: sub z1.h, z1.h, #15 // =0xf
3236 ; CHECK-NEXT: stp q0, q1, [x0]
3239 ; NONEON-NOSVE-LABEL: sub_v16i16:
3240 ; NONEON-NOSVE: // %bb.0:
3241 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3242 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3243 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3244 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
3245 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3246 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
3247 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
3248 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3249 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
3250 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
3251 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3252 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
3253 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
3254 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3255 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
3256 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
3257 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3258 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
3259 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
3260 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3261 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
3262 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
3263 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3264 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
3265 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
3266 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3267 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
3268 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
3269 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3270 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
3271 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
3272 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3273 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
3274 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
3275 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3276 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
3277 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
3278 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3279 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
3280 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
3281 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3282 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
3283 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
3284 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3285 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
3286 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
3287 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3288 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
3289 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
3290 ; NONEON-NOSVE-NEXT: sub w8, w8, #15
3291 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
3292 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3293 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3294 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3295 ; NONEON-NOSVE-NEXT: ret
3296 %op1 = load <16 x i16>, ptr %a
3297 %ins = insertelement <16 x i16> undef, i16 15, i64 0
3298 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
3299 %res = sub <16 x i16> %op1, %op2
3300 store <16 x i16> %res, ptr %a
3304 define void @sub_v8i32(ptr %a) {
3305 ; CHECK-LABEL: sub_v8i32:
3307 ; CHECK-NEXT: ldp q0, q1, [x0]
3308 ; CHECK-NEXT: sub z0.s, z0.s, #31 // =0x1f
3309 ; CHECK-NEXT: sub z1.s, z1.s, #31 // =0x1f
3310 ; CHECK-NEXT: stp q0, q1, [x0]
3313 ; NONEON-NOSVE-LABEL: sub_v8i32:
3314 ; NONEON-NOSVE: // %bb.0:
3315 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3316 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3317 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3318 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
3319 ; NONEON-NOSVE-NEXT: sub w9, w8, #31
3320 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
3321 ; NONEON-NOSVE-NEXT: sub w8, w8, #31
3322 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
3323 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
3324 ; NONEON-NOSVE-NEXT: sub w9, w8, #31
3325 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
3326 ; NONEON-NOSVE-NEXT: sub w8, w8, #31
3327 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
3328 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
3329 ; NONEON-NOSVE-NEXT: sub w9, w8, #31
3330 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
3331 ; NONEON-NOSVE-NEXT: sub w8, w8, #31
3332 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
3333 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
3334 ; NONEON-NOSVE-NEXT: sub w9, w8, #31
3335 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
3336 ; NONEON-NOSVE-NEXT: sub w8, w8, #31
3337 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
3338 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3339 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3340 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3341 ; NONEON-NOSVE-NEXT: ret
3342 %op1 = load <8 x i32>, ptr %a
3343 %ins = insertelement <8 x i32> undef, i32 31, i64 0
3344 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
3345 %res = sub <8 x i32> %op1, %op2
3346 store <8 x i32> %res, ptr %a
3350 define void @sub_v4i64(ptr %a) {
3351 ; CHECK-LABEL: sub_v4i64:
3353 ; CHECK-NEXT: ldp q0, q1, [x0]
3354 ; CHECK-NEXT: sub z0.d, z0.d, #63 // =0x3f
3355 ; CHECK-NEXT: sub z1.d, z1.d, #63 // =0x3f
3356 ; CHECK-NEXT: stp q0, q1, [x0]
3359 ; NONEON-NOSVE-LABEL: sub_v4i64:
3360 ; NONEON-NOSVE: // %bb.0:
3361 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3362 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3363 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3364 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
3365 ; NONEON-NOSVE-NEXT: sub x9, x8, #63
3366 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
3367 ; NONEON-NOSVE-NEXT: sub x8, x8, #63
3368 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
3369 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
3370 ; NONEON-NOSVE-NEXT: sub x9, x8, #63
3371 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
3372 ; NONEON-NOSVE-NEXT: sub x8, x8, #63
3373 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
3374 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3375 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3376 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3377 ; NONEON-NOSVE-NEXT: ret
3378 %op1 = load <4 x i64>, ptr %a
3379 %ins = insertelement <4 x i64> undef, i64 63, i64 0
3380 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
3381 %res = sub <4 x i64> %op1, %op2
3382 store <4 x i64> %res, ptr %a
3390 define void @umax_v32i8(ptr %a) {
3391 ; CHECK-LABEL: umax_v32i8:
3393 ; CHECK-NEXT: ldp q0, q1, [x0]
3394 ; CHECK-NEXT: umax z0.b, z0.b, #7
3395 ; CHECK-NEXT: umax z1.b, z1.b, #7
3396 ; CHECK-NEXT: stp q0, q1, [x0]
3399 ; NONEON-NOSVE-LABEL: umax_v32i8:
3400 ; NONEON-NOSVE: // %bb.0:
3401 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3402 ; NONEON-NOSVE-NEXT: mov w8, #7 // =0x7
3403 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3404 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3405 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #31]
3406 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3407 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3408 ; NONEON-NOSVE-NEXT: strb w9, [sp, #63]
3409 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #30]
3410 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3411 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3412 ; NONEON-NOSVE-NEXT: strb w9, [sp, #62]
3413 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #29]
3414 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3415 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3416 ; NONEON-NOSVE-NEXT: strb w9, [sp, #61]
3417 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #28]
3418 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3419 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3420 ; NONEON-NOSVE-NEXT: strb w9, [sp, #60]
3421 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #27]
3422 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3423 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3424 ; NONEON-NOSVE-NEXT: strb w9, [sp, #59]
3425 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #26]
3426 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3427 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3428 ; NONEON-NOSVE-NEXT: strb w9, [sp, #58]
3429 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #25]
3430 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3431 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3432 ; NONEON-NOSVE-NEXT: strb w9, [sp, #57]
3433 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #24]
3434 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3435 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3436 ; NONEON-NOSVE-NEXT: strb w9, [sp, #56]
3437 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #23]
3438 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3439 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3440 ; NONEON-NOSVE-NEXT: strb w9, [sp, #55]
3441 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #22]
3442 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3443 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3444 ; NONEON-NOSVE-NEXT: strb w9, [sp, #54]
3445 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #21]
3446 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3447 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3448 ; NONEON-NOSVE-NEXT: strb w9, [sp, #53]
3449 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #20]
3450 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3451 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3452 ; NONEON-NOSVE-NEXT: strb w9, [sp, #52]
3453 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #19]
3454 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3455 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3456 ; NONEON-NOSVE-NEXT: strb w9, [sp, #51]
3457 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #18]
3458 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3459 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3460 ; NONEON-NOSVE-NEXT: strb w9, [sp, #50]
3461 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #17]
3462 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3463 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3464 ; NONEON-NOSVE-NEXT: strb w9, [sp, #49]
3465 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #16]
3466 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3467 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3468 ; NONEON-NOSVE-NEXT: strb w9, [sp, #48]
3469 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
3470 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3471 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3472 ; NONEON-NOSVE-NEXT: strb w9, [sp, #47]
3473 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
3474 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3475 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3476 ; NONEON-NOSVE-NEXT: strb w9, [sp, #46]
3477 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
3478 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3479 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3480 ; NONEON-NOSVE-NEXT: strb w9, [sp, #45]
3481 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
3482 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3483 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3484 ; NONEON-NOSVE-NEXT: strb w9, [sp, #44]
3485 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
3486 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3487 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3488 ; NONEON-NOSVE-NEXT: strb w9, [sp, #43]
3489 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
3490 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3491 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3492 ; NONEON-NOSVE-NEXT: strb w9, [sp, #42]
3493 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
3494 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3495 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3496 ; NONEON-NOSVE-NEXT: strb w9, [sp, #41]
3497 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
3498 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3499 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3500 ; NONEON-NOSVE-NEXT: strb w9, [sp, #40]
3501 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
3502 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3503 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3504 ; NONEON-NOSVE-NEXT: strb w9, [sp, #39]
3505 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
3506 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3507 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3508 ; NONEON-NOSVE-NEXT: strb w9, [sp, #38]
3509 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
3510 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3511 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3512 ; NONEON-NOSVE-NEXT: strb w9, [sp, #37]
3513 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
3514 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3515 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3516 ; NONEON-NOSVE-NEXT: strb w9, [sp, #36]
3517 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
3518 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3519 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3520 ; NONEON-NOSVE-NEXT: strb w9, [sp, #35]
3521 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
3522 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3523 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3524 ; NONEON-NOSVE-NEXT: strb w9, [sp, #34]
3525 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
3526 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3527 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3528 ; NONEON-NOSVE-NEXT: strb w9, [sp, #33]
3529 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
3530 ; NONEON-NOSVE-NEXT: tst w9, #0xf8
3531 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, ne
3532 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
3533 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3534 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3535 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3536 ; NONEON-NOSVE-NEXT: ret
3537 %op1 = load <32 x i8>, ptr %a
3538 %ins = insertelement <32 x i8> undef, i8 7, i64 0
3539 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
3540 %res = call <32 x i8> @llvm.umax.v32i8(<32 x i8> %op1, <32 x i8> %op2)
3541 store <32 x i8> %res, ptr %a
3545 define void @umax_v16i16(ptr %a) {
3546 ; CHECK-LABEL: umax_v16i16:
3548 ; CHECK-NEXT: ldp q0, q1, [x0]
3549 ; CHECK-NEXT: umax z0.h, z0.h, #15
3550 ; CHECK-NEXT: umax z1.h, z1.h, #15
3551 ; CHECK-NEXT: stp q0, q1, [x0]
3554 ; NONEON-NOSVE-LABEL: umax_v16i16:
3555 ; NONEON-NOSVE: // %bb.0:
3556 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3557 ; NONEON-NOSVE-NEXT: mov w8, #15 // =0xf
3558 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3559 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3560 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #30]
3561 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3562 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3563 ; NONEON-NOSVE-NEXT: strh w9, [sp, #62]
3564 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #28]
3565 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3566 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3567 ; NONEON-NOSVE-NEXT: strh w9, [sp, #60]
3568 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #26]
3569 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3570 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3571 ; NONEON-NOSVE-NEXT: strh w9, [sp, #58]
3572 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #24]
3573 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3574 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3575 ; NONEON-NOSVE-NEXT: strh w9, [sp, #56]
3576 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #22]
3577 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3578 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3579 ; NONEON-NOSVE-NEXT: strh w9, [sp, #54]
3580 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #20]
3581 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3582 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3583 ; NONEON-NOSVE-NEXT: strh w9, [sp, #52]
3584 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #18]
3585 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3586 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3587 ; NONEON-NOSVE-NEXT: strh w9, [sp, #50]
3588 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #16]
3589 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3590 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3591 ; NONEON-NOSVE-NEXT: strh w9, [sp, #48]
3592 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
3593 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3594 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3595 ; NONEON-NOSVE-NEXT: strh w9, [sp, #46]
3596 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
3597 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3598 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3599 ; NONEON-NOSVE-NEXT: strh w9, [sp, #44]
3600 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
3601 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3602 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3603 ; NONEON-NOSVE-NEXT: strh w9, [sp, #42]
3604 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
3605 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3606 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3607 ; NONEON-NOSVE-NEXT: strh w9, [sp, #40]
3608 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
3609 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3610 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3611 ; NONEON-NOSVE-NEXT: strh w9, [sp, #38]
3612 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
3613 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3614 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3615 ; NONEON-NOSVE-NEXT: strh w9, [sp, #36]
3616 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
3617 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3618 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, ne
3619 ; NONEON-NOSVE-NEXT: strh w9, [sp, #34]
3620 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
3621 ; NONEON-NOSVE-NEXT: tst w9, #0xfff0
3622 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, ne
3623 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
3624 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3625 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3626 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3627 ; NONEON-NOSVE-NEXT: ret
3628 %op1 = load <16 x i16>, ptr %a
3629 %ins = insertelement <16 x i16> undef, i16 15, i64 0
3630 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
3631 %res = call <16 x i16> @llvm.umax.v16i16(<16 x i16> %op1, <16 x i16> %op2)
3632 store <16 x i16> %res, ptr %a
3636 define void @umax_v8i32(ptr %a) {
3637 ; CHECK-LABEL: umax_v8i32:
3639 ; CHECK-NEXT: ldp q0, q1, [x0]
3640 ; CHECK-NEXT: umax z0.s, z0.s, #31
3641 ; CHECK-NEXT: umax z1.s, z1.s, #31
3642 ; CHECK-NEXT: stp q0, q1, [x0]
3645 ; NONEON-NOSVE-LABEL: umax_v8i32:
3646 ; NONEON-NOSVE: // %bb.0:
3647 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3648 ; NONEON-NOSVE-NEXT: mov w8, #31 // =0x1f
3649 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3650 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3651 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #28]
3652 ; NONEON-NOSVE-NEXT: cmp w9, #31
3653 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, hi
3654 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #24]
3655 ; NONEON-NOSVE-NEXT: cmp w9, #31
3656 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, hi
3657 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #56]
3658 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #20]
3659 ; NONEON-NOSVE-NEXT: cmp w9, #31
3660 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, hi
3661 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #16]
3662 ; NONEON-NOSVE-NEXT: cmp w9, #31
3663 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, hi
3664 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #48]
3665 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #12]
3666 ; NONEON-NOSVE-NEXT: cmp w9, #31
3667 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, hi
3668 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #8]
3669 ; NONEON-NOSVE-NEXT: cmp w9, #31
3670 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, hi
3671 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #40]
3672 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #4]
3673 ; NONEON-NOSVE-NEXT: cmp w9, #31
3674 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, hi
3675 ; NONEON-NOSVE-NEXT: ldr w9, [sp]
3676 ; NONEON-NOSVE-NEXT: cmp w9, #31
3677 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, hi
3678 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
3679 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3680 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3681 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3682 ; NONEON-NOSVE-NEXT: ret
3683 %op1 = load <8 x i32>, ptr %a
3684 %ins = insertelement <8 x i32> undef, i32 31, i64 0
3685 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
3686 %res = call <8 x i32> @llvm.umax.v8i32(<8 x i32> %op1, <8 x i32> %op2)
3687 store <8 x i32> %res, ptr %a
3691 define void @umax_v4i64(ptr %a) {
3692 ; CHECK-LABEL: umax_v4i64:
3694 ; CHECK-NEXT: ldp q0, q1, [x0]
3695 ; CHECK-NEXT: umax z0.d, z0.d, #63
3696 ; CHECK-NEXT: umax z1.d, z1.d, #63
3697 ; CHECK-NEXT: stp q0, q1, [x0]
3700 ; NONEON-NOSVE-LABEL: umax_v4i64:
3701 ; NONEON-NOSVE: // %bb.0:
3702 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3703 ; NONEON-NOSVE-NEXT: mov w8, #63 // =0x3f
3704 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3705 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3706 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #24]
3707 ; NONEON-NOSVE-NEXT: cmp x9, #63
3708 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, hi
3709 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #16]
3710 ; NONEON-NOSVE-NEXT: cmp x9, #63
3711 ; NONEON-NOSVE-NEXT: csel x9, x9, x8, hi
3712 ; NONEON-NOSVE-NEXT: stp x9, x10, [sp, #48]
3713 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #8]
3714 ; NONEON-NOSVE-NEXT: cmp x9, #63
3715 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, hi
3716 ; NONEON-NOSVE-NEXT: ldr x9, [sp]
3717 ; NONEON-NOSVE-NEXT: cmp x9, #63
3718 ; NONEON-NOSVE-NEXT: csel x8, x9, x8, hi
3719 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
3720 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3721 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3722 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3723 ; NONEON-NOSVE-NEXT: ret
3724 %op1 = load <4 x i64>, ptr %a
3725 %ins = insertelement <4 x i64> undef, i64 63, i64 0
3726 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
3727 %res = call <4 x i64> @llvm.umax.v4i64(<4 x i64> %op1, <4 x i64> %op2)
3728 store <4 x i64> %res, ptr %a
3736 define void @umin_v32i8(ptr %a) {
3737 ; CHECK-LABEL: umin_v32i8:
3739 ; CHECK-NEXT: ldp q0, q1, [x0]
3740 ; CHECK-NEXT: umin z0.b, z0.b, #7
3741 ; CHECK-NEXT: umin z1.b, z1.b, #7
3742 ; CHECK-NEXT: stp q0, q1, [x0]
3745 ; NONEON-NOSVE-LABEL: umin_v32i8:
3746 ; NONEON-NOSVE: // %bb.0:
3747 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3748 ; NONEON-NOSVE-NEXT: mov w8, #7 // =0x7
3749 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3750 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3751 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #31]
3752 ; NONEON-NOSVE-NEXT: cmp w9, #7
3753 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3754 ; NONEON-NOSVE-NEXT: strb w9, [sp, #63]
3755 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #30]
3756 ; NONEON-NOSVE-NEXT: cmp w9, #7
3757 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3758 ; NONEON-NOSVE-NEXT: strb w9, [sp, #62]
3759 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #29]
3760 ; NONEON-NOSVE-NEXT: cmp w9, #7
3761 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3762 ; NONEON-NOSVE-NEXT: strb w9, [sp, #61]
3763 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #28]
3764 ; NONEON-NOSVE-NEXT: cmp w9, #7
3765 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3766 ; NONEON-NOSVE-NEXT: strb w9, [sp, #60]
3767 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #27]
3768 ; NONEON-NOSVE-NEXT: cmp w9, #7
3769 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3770 ; NONEON-NOSVE-NEXT: strb w9, [sp, #59]
3771 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #26]
3772 ; NONEON-NOSVE-NEXT: cmp w9, #7
3773 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3774 ; NONEON-NOSVE-NEXT: strb w9, [sp, #58]
3775 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #25]
3776 ; NONEON-NOSVE-NEXT: cmp w9, #7
3777 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3778 ; NONEON-NOSVE-NEXT: strb w9, [sp, #57]
3779 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #24]
3780 ; NONEON-NOSVE-NEXT: cmp w9, #7
3781 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3782 ; NONEON-NOSVE-NEXT: strb w9, [sp, #56]
3783 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #23]
3784 ; NONEON-NOSVE-NEXT: cmp w9, #7
3785 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3786 ; NONEON-NOSVE-NEXT: strb w9, [sp, #55]
3787 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #22]
3788 ; NONEON-NOSVE-NEXT: cmp w9, #7
3789 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3790 ; NONEON-NOSVE-NEXT: strb w9, [sp, #54]
3791 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #21]
3792 ; NONEON-NOSVE-NEXT: cmp w9, #7
3793 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3794 ; NONEON-NOSVE-NEXT: strb w9, [sp, #53]
3795 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #20]
3796 ; NONEON-NOSVE-NEXT: cmp w9, #7
3797 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3798 ; NONEON-NOSVE-NEXT: strb w9, [sp, #52]
3799 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #19]
3800 ; NONEON-NOSVE-NEXT: cmp w9, #7
3801 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3802 ; NONEON-NOSVE-NEXT: strb w9, [sp, #51]
3803 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #18]
3804 ; NONEON-NOSVE-NEXT: cmp w9, #7
3805 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3806 ; NONEON-NOSVE-NEXT: strb w9, [sp, #50]
3807 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #17]
3808 ; NONEON-NOSVE-NEXT: cmp w9, #7
3809 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3810 ; NONEON-NOSVE-NEXT: strb w9, [sp, #49]
3811 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #16]
3812 ; NONEON-NOSVE-NEXT: cmp w9, #7
3813 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3814 ; NONEON-NOSVE-NEXT: strb w9, [sp, #48]
3815 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
3816 ; NONEON-NOSVE-NEXT: cmp w9, #7
3817 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3818 ; NONEON-NOSVE-NEXT: strb w9, [sp, #47]
3819 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
3820 ; NONEON-NOSVE-NEXT: cmp w9, #7
3821 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3822 ; NONEON-NOSVE-NEXT: strb w9, [sp, #46]
3823 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
3824 ; NONEON-NOSVE-NEXT: cmp w9, #7
3825 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3826 ; NONEON-NOSVE-NEXT: strb w9, [sp, #45]
3827 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
3828 ; NONEON-NOSVE-NEXT: cmp w9, #7
3829 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3830 ; NONEON-NOSVE-NEXT: strb w9, [sp, #44]
3831 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
3832 ; NONEON-NOSVE-NEXT: cmp w9, #7
3833 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3834 ; NONEON-NOSVE-NEXT: strb w9, [sp, #43]
3835 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
3836 ; NONEON-NOSVE-NEXT: cmp w9, #7
3837 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3838 ; NONEON-NOSVE-NEXT: strb w9, [sp, #42]
3839 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
3840 ; NONEON-NOSVE-NEXT: cmp w9, #7
3841 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3842 ; NONEON-NOSVE-NEXT: strb w9, [sp, #41]
3843 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
3844 ; NONEON-NOSVE-NEXT: cmp w9, #7
3845 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3846 ; NONEON-NOSVE-NEXT: strb w9, [sp, #40]
3847 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
3848 ; NONEON-NOSVE-NEXT: cmp w9, #7
3849 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3850 ; NONEON-NOSVE-NEXT: strb w9, [sp, #39]
3851 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
3852 ; NONEON-NOSVE-NEXT: cmp w9, #7
3853 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3854 ; NONEON-NOSVE-NEXT: strb w9, [sp, #38]
3855 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
3856 ; NONEON-NOSVE-NEXT: cmp w9, #7
3857 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3858 ; NONEON-NOSVE-NEXT: strb w9, [sp, #37]
3859 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
3860 ; NONEON-NOSVE-NEXT: cmp w9, #7
3861 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3862 ; NONEON-NOSVE-NEXT: strb w9, [sp, #36]
3863 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
3864 ; NONEON-NOSVE-NEXT: cmp w9, #7
3865 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3866 ; NONEON-NOSVE-NEXT: strb w9, [sp, #35]
3867 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
3868 ; NONEON-NOSVE-NEXT: cmp w9, #7
3869 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3870 ; NONEON-NOSVE-NEXT: strb w9, [sp, #34]
3871 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
3872 ; NONEON-NOSVE-NEXT: cmp w9, #7
3873 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3874 ; NONEON-NOSVE-NEXT: strb w9, [sp, #33]
3875 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
3876 ; NONEON-NOSVE-NEXT: cmp w9, #7
3877 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lo
3878 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
3879 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3880 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3881 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3882 ; NONEON-NOSVE-NEXT: ret
3883 %op1 = load <32 x i8>, ptr %a
3884 %ins = insertelement <32 x i8> undef, i8 7, i64 0
3885 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
3886 %res = call <32 x i8> @llvm.umin.v32i8(<32 x i8> %op1, <32 x i8> %op2)
3887 store <32 x i8> %res, ptr %a
3891 define void @umin_v16i16(ptr %a) {
3892 ; CHECK-LABEL: umin_v16i16:
3894 ; CHECK-NEXT: ldp q0, q1, [x0]
3895 ; CHECK-NEXT: umin z0.h, z0.h, #15
3896 ; CHECK-NEXT: umin z1.h, z1.h, #15
3897 ; CHECK-NEXT: stp q0, q1, [x0]
3900 ; NONEON-NOSVE-LABEL: umin_v16i16:
3901 ; NONEON-NOSVE: // %bb.0:
3902 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3903 ; NONEON-NOSVE-NEXT: mov w8, #15 // =0xf
3904 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3905 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3906 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #30]
3907 ; NONEON-NOSVE-NEXT: cmp w9, #15
3908 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3909 ; NONEON-NOSVE-NEXT: strh w9, [sp, #62]
3910 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #28]
3911 ; NONEON-NOSVE-NEXT: cmp w9, #15
3912 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3913 ; NONEON-NOSVE-NEXT: strh w9, [sp, #60]
3914 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #26]
3915 ; NONEON-NOSVE-NEXT: cmp w9, #15
3916 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3917 ; NONEON-NOSVE-NEXT: strh w9, [sp, #58]
3918 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #24]
3919 ; NONEON-NOSVE-NEXT: cmp w9, #15
3920 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3921 ; NONEON-NOSVE-NEXT: strh w9, [sp, #56]
3922 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #22]
3923 ; NONEON-NOSVE-NEXT: cmp w9, #15
3924 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3925 ; NONEON-NOSVE-NEXT: strh w9, [sp, #54]
3926 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #20]
3927 ; NONEON-NOSVE-NEXT: cmp w9, #15
3928 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3929 ; NONEON-NOSVE-NEXT: strh w9, [sp, #52]
3930 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #18]
3931 ; NONEON-NOSVE-NEXT: cmp w9, #15
3932 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3933 ; NONEON-NOSVE-NEXT: strh w9, [sp, #50]
3934 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #16]
3935 ; NONEON-NOSVE-NEXT: cmp w9, #15
3936 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3937 ; NONEON-NOSVE-NEXT: strh w9, [sp, #48]
3938 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
3939 ; NONEON-NOSVE-NEXT: cmp w9, #15
3940 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3941 ; NONEON-NOSVE-NEXT: strh w9, [sp, #46]
3942 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
3943 ; NONEON-NOSVE-NEXT: cmp w9, #15
3944 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3945 ; NONEON-NOSVE-NEXT: strh w9, [sp, #44]
3946 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
3947 ; NONEON-NOSVE-NEXT: cmp w9, #15
3948 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3949 ; NONEON-NOSVE-NEXT: strh w9, [sp, #42]
3950 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
3951 ; NONEON-NOSVE-NEXT: cmp w9, #15
3952 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3953 ; NONEON-NOSVE-NEXT: strh w9, [sp, #40]
3954 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
3955 ; NONEON-NOSVE-NEXT: cmp w9, #15
3956 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3957 ; NONEON-NOSVE-NEXT: strh w9, [sp, #38]
3958 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
3959 ; NONEON-NOSVE-NEXT: cmp w9, #15
3960 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3961 ; NONEON-NOSVE-NEXT: strh w9, [sp, #36]
3962 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
3963 ; NONEON-NOSVE-NEXT: cmp w9, #15
3964 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
3965 ; NONEON-NOSVE-NEXT: strh w9, [sp, #34]
3966 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
3967 ; NONEON-NOSVE-NEXT: cmp w9, #15
3968 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lo
3969 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
3970 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3971 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
3972 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3973 ; NONEON-NOSVE-NEXT: ret
3974 %op1 = load <16 x i16>, ptr %a
3975 %ins = insertelement <16 x i16> undef, i16 15, i64 0
3976 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
3977 %res = call <16 x i16> @llvm.umin.v16i16(<16 x i16> %op1, <16 x i16> %op2)
3978 store <16 x i16> %res, ptr %a
3982 define void @umin_v8i32(ptr %a) {
3983 ; CHECK-LABEL: umin_v8i32:
3985 ; CHECK-NEXT: ldp q0, q1, [x0]
3986 ; CHECK-NEXT: umin z0.s, z0.s, #31
3987 ; CHECK-NEXT: umin z1.s, z1.s, #31
3988 ; CHECK-NEXT: stp q0, q1, [x0]
3991 ; NONEON-NOSVE-LABEL: umin_v8i32:
3992 ; NONEON-NOSVE: // %bb.0:
3993 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3994 ; NONEON-NOSVE-NEXT: mov w8, #31 // =0x1f
3995 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3996 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3997 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #28]
3998 ; NONEON-NOSVE-NEXT: cmp w9, #31
3999 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lo
4000 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #24]
4001 ; NONEON-NOSVE-NEXT: cmp w9, #31
4002 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
4003 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #56]
4004 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #20]
4005 ; NONEON-NOSVE-NEXT: cmp w9, #31
4006 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lo
4007 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #16]
4008 ; NONEON-NOSVE-NEXT: cmp w9, #31
4009 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
4010 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #48]
4011 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #12]
4012 ; NONEON-NOSVE-NEXT: cmp w9, #31
4013 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lo
4014 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #8]
4015 ; NONEON-NOSVE-NEXT: cmp w9, #31
4016 ; NONEON-NOSVE-NEXT: csel w9, w9, w8, lo
4017 ; NONEON-NOSVE-NEXT: stp w9, w10, [sp, #40]
4018 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #4]
4019 ; NONEON-NOSVE-NEXT: cmp w9, #31
4020 ; NONEON-NOSVE-NEXT: csel w10, w9, w8, lo
4021 ; NONEON-NOSVE-NEXT: ldr w9, [sp]
4022 ; NONEON-NOSVE-NEXT: cmp w9, #31
4023 ; NONEON-NOSVE-NEXT: csel w8, w9, w8, lo
4024 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
4025 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4026 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4027 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4028 ; NONEON-NOSVE-NEXT: ret
4029 %op1 = load <8 x i32>, ptr %a
4030 %ins = insertelement <8 x i32> undef, i32 31, i64 0
4031 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
4032 %res = call <8 x i32> @llvm.umin.v8i32(<8 x i32> %op1, <8 x i32> %op2)
4033 store <8 x i32> %res, ptr %a
4037 define void @umin_v4i64(ptr %a) {
4038 ; CHECK-LABEL: umin_v4i64:
4040 ; CHECK-NEXT: ldp q0, q1, [x0]
4041 ; CHECK-NEXT: umin z0.d, z0.d, #63
4042 ; CHECK-NEXT: umin z1.d, z1.d, #63
4043 ; CHECK-NEXT: stp q0, q1, [x0]
4046 ; NONEON-NOSVE-LABEL: umin_v4i64:
4047 ; NONEON-NOSVE: // %bb.0:
4048 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
4049 ; NONEON-NOSVE-NEXT: mov w8, #63 // =0x3f
4050 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
4051 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
4052 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #24]
4053 ; NONEON-NOSVE-NEXT: cmp x9, #63
4054 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, lo
4055 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #16]
4056 ; NONEON-NOSVE-NEXT: cmp x9, #63
4057 ; NONEON-NOSVE-NEXT: csel x9, x9, x8, lo
4058 ; NONEON-NOSVE-NEXT: stp x9, x10, [sp, #48]
4059 ; NONEON-NOSVE-NEXT: ldr x9, [sp, #8]
4060 ; NONEON-NOSVE-NEXT: cmp x9, #63
4061 ; NONEON-NOSVE-NEXT: csel x10, x9, x8, lo
4062 ; NONEON-NOSVE-NEXT: ldr x9, [sp]
4063 ; NONEON-NOSVE-NEXT: cmp x9, #63
4064 ; NONEON-NOSVE-NEXT: csel x8, x9, x8, lo
4065 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
4066 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4067 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4068 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4069 ; NONEON-NOSVE-NEXT: ret
4070 %op1 = load <4 x i64>, ptr %a
4071 %ins = insertelement <4 x i64> undef, i64 63, i64 0
4072 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
4073 %res = call <4 x i64> @llvm.umin.v4i64(<4 x i64> %op1, <4 x i64> %op2)
4074 store <4 x i64> %res, ptr %a
4082 define void @xor_v32i8(ptr %a) {
4083 ; CHECK-LABEL: xor_v32i8:
4085 ; CHECK-NEXT: ldp q0, q1, [x0]
4086 ; CHECK-NEXT: eor z0.b, z0.b, #0x7
4087 ; CHECK-NEXT: eor z1.b, z1.b, #0x7
4088 ; CHECK-NEXT: stp q0, q1, [x0]
4091 ; NONEON-NOSVE-LABEL: xor_v32i8:
4092 ; NONEON-NOSVE: // %bb.0:
4093 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
4094 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
4095 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
4096 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
4097 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4098 ; NONEON-NOSVE-NEXT: strb w8, [sp, #63]
4099 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
4100 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4101 ; NONEON-NOSVE-NEXT: strb w8, [sp, #62]
4102 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
4103 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4104 ; NONEON-NOSVE-NEXT: strb w8, [sp, #61]
4105 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
4106 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4107 ; NONEON-NOSVE-NEXT: strb w8, [sp, #60]
4108 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
4109 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4110 ; NONEON-NOSVE-NEXT: strb w8, [sp, #59]
4111 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
4112 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4113 ; NONEON-NOSVE-NEXT: strb w8, [sp, #58]
4114 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
4115 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4116 ; NONEON-NOSVE-NEXT: strb w8, [sp, #57]
4117 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
4118 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4119 ; NONEON-NOSVE-NEXT: strb w8, [sp, #56]
4120 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
4121 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4122 ; NONEON-NOSVE-NEXT: strb w8, [sp, #55]
4123 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
4124 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4125 ; NONEON-NOSVE-NEXT: strb w8, [sp, #54]
4126 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
4127 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4128 ; NONEON-NOSVE-NEXT: strb w8, [sp, #53]
4129 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
4130 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4131 ; NONEON-NOSVE-NEXT: strb w8, [sp, #52]
4132 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
4133 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4134 ; NONEON-NOSVE-NEXT: strb w8, [sp, #51]
4135 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
4136 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4137 ; NONEON-NOSVE-NEXT: strb w8, [sp, #50]
4138 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
4139 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4140 ; NONEON-NOSVE-NEXT: strb w8, [sp, #49]
4141 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
4142 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4143 ; NONEON-NOSVE-NEXT: strb w8, [sp, #48]
4144 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #15]
4145 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4146 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
4147 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #14]
4148 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4149 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
4150 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #13]
4151 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4152 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
4153 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #12]
4154 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4155 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
4156 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #11]
4157 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4158 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
4159 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #10]
4160 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4161 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
4162 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #9]
4163 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4164 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
4165 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #8]
4166 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4167 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
4168 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #7]
4169 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4170 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
4171 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #6]
4172 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4173 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
4174 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #5]
4175 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4176 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
4177 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #4]
4178 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4179 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
4180 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #3]
4181 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4182 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
4183 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #2]
4184 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4185 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
4186 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #1]
4187 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4188 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
4189 ; NONEON-NOSVE-NEXT: ldrb w8, [sp]
4190 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x7
4191 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
4192 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4193 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4194 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4195 ; NONEON-NOSVE-NEXT: ret
4196 %op1 = load <32 x i8>, ptr %a
4197 %ins = insertelement <32 x i8> undef, i8 7, i64 0
4198 %op2 = shufflevector <32 x i8> %ins, <32 x i8> undef, <32 x i32> zeroinitializer
4199 %res = xor <32 x i8> %op1, %op2
4200 store <32 x i8> %res, ptr %a
4204 define void @xor_v16i16(ptr %a) {
4205 ; CHECK-LABEL: xor_v16i16:
4207 ; CHECK-NEXT: ldp q0, q1, [x0]
4208 ; CHECK-NEXT: eor z0.h, z0.h, #0xf
4209 ; CHECK-NEXT: eor z1.h, z1.h, #0xf
4210 ; CHECK-NEXT: stp q0, q1, [x0]
4213 ; NONEON-NOSVE-LABEL: xor_v16i16:
4214 ; NONEON-NOSVE: // %bb.0:
4215 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
4216 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
4217 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
4218 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
4219 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4220 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
4221 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
4222 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4223 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
4224 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
4225 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4226 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
4227 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
4228 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4229 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
4230 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
4231 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4232 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
4233 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
4234 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4235 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
4236 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
4237 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4238 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
4239 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
4240 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4241 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
4242 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #14]
4243 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4244 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
4245 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #12]
4246 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4247 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
4248 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #10]
4249 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4250 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
4251 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #8]
4252 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4253 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
4254 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #6]
4255 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4256 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
4257 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #4]
4258 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4259 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
4260 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #2]
4261 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4262 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
4263 ; NONEON-NOSVE-NEXT: ldrh w8, [sp]
4264 ; NONEON-NOSVE-NEXT: eor w8, w8, #0xf
4265 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
4266 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4267 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4268 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4269 ; NONEON-NOSVE-NEXT: ret
4270 %op1 = load <16 x i16>, ptr %a
4271 %ins = insertelement <16 x i16> undef, i16 15, i64 0
4272 %op2 = shufflevector <16 x i16> %ins, <16 x i16> undef, <16 x i32> zeroinitializer
4273 %res = xor <16 x i16> %op1, %op2
4274 store <16 x i16> %res, ptr %a
4278 define void @xor_v8i32(ptr %a) {
4279 ; CHECK-LABEL: xor_v8i32:
4281 ; CHECK-NEXT: ldp q0, q1, [x0]
4282 ; CHECK-NEXT: eor z0.s, z0.s, #0x1f
4283 ; CHECK-NEXT: eor z1.s, z1.s, #0x1f
4284 ; CHECK-NEXT: stp q0, q1, [x0]
4287 ; NONEON-NOSVE-LABEL: xor_v8i32:
4288 ; NONEON-NOSVE: // %bb.0:
4289 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
4290 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
4291 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
4292 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
4293 ; NONEON-NOSVE-NEXT: eor w9, w8, #0x1f
4294 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
4295 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x1f
4296 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
4297 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
4298 ; NONEON-NOSVE-NEXT: eor w9, w8, #0x1f
4299 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
4300 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x1f
4301 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
4302 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]
4303 ; NONEON-NOSVE-NEXT: eor w9, w8, #0x1f
4304 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]
4305 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x1f
4306 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
4307 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]
4308 ; NONEON-NOSVE-NEXT: eor w9, w8, #0x1f
4309 ; NONEON-NOSVE-NEXT: ldr w8, [sp]
4310 ; NONEON-NOSVE-NEXT: eor w8, w8, #0x1f
4311 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
4312 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4313 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4314 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4315 ; NONEON-NOSVE-NEXT: ret
4316 %op1 = load <8 x i32>, ptr %a
4317 %ins = insertelement <8 x i32> undef, i32 31, i64 0
4318 %op2 = shufflevector <8 x i32> %ins, <8 x i32> undef, <8 x i32> zeroinitializer
4319 %res = xor <8 x i32> %op1, %op2
4320 store <8 x i32> %res, ptr %a
4324 define void @xor_v4i64(ptr %a) {
4325 ; CHECK-LABEL: xor_v4i64:
4327 ; CHECK-NEXT: ldp q0, q1, [x0]
4328 ; CHECK-NEXT: eor z0.d, z0.d, #0x3f
4329 ; CHECK-NEXT: eor z1.d, z1.d, #0x3f
4330 ; CHECK-NEXT: stp q0, q1, [x0]
4333 ; NONEON-NOSVE-LABEL: xor_v4i64:
4334 ; NONEON-NOSVE: // %bb.0:
4335 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
4336 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
4337 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
4338 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
4339 ; NONEON-NOSVE-NEXT: eor x9, x8, #0x3f
4340 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
4341 ; NONEON-NOSVE-NEXT: eor x8, x8, #0x3f
4342 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
4343 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]
4344 ; NONEON-NOSVE-NEXT: eor x9, x8, #0x3f
4345 ; NONEON-NOSVE-NEXT: ldr x8, [sp]
4346 ; NONEON-NOSVE-NEXT: eor x8, x8, #0x3f
4347 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
4348 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
4349 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
4350 ; NONEON-NOSVE-NEXT: add sp, sp, #64
4351 ; NONEON-NOSVE-NEXT: ret
4352 %op1 = load <4 x i64>, ptr %a
4353 %ins = insertelement <4 x i64> undef, i64 63, i64 0
4354 %op2 = shufflevector <4 x i64> %ins, <4 x i64> undef, <4 x i32> zeroinitializer
4355 %res = xor <4 x i64> %op1, %op2
4356 store <4 x i64> %res, ptr %a
4360 declare <32 x i8> @llvm.smax.v32i8(<32 x i8>, <32 x i8>)
4361 declare <16 x i16> @llvm.smax.v16i16(<16 x i16>, <16 x i16>)
4362 declare <8 x i32> @llvm.smax.v8i32(<8 x i32>, <8 x i32>)
4363 declare <4 x i64> @llvm.smax.v4i64(<4 x i64>, <4 x i64>)
4365 declare <32 x i8> @llvm.smin.v32i8(<32 x i8>, <32 x i8>)
4366 declare <16 x i16> @llvm.smin.v16i16(<16 x i16>, <16 x i16>)
4367 declare <8 x i32> @llvm.smin.v8i32(<8 x i32>, <8 x i32>)
4368 declare <4 x i64> @llvm.smin.v4i64(<4 x i64>, <4 x i64>)
4370 declare <32 x i8> @llvm.umax.v32i8(<32 x i8>, <32 x i8>)
4371 declare <16 x i16> @llvm.umax.v16i16(<16 x i16>, <16 x i16>)
4372 declare <8 x i32> @llvm.umax.v8i32(<8 x i32>, <8 x i32>)
4373 declare <4 x i64> @llvm.umax.v4i64(<4 x i64>, <4 x i64>)
4375 declare <32 x i8> @llvm.umin.v32i8(<32 x i8>, <32 x i8>)
4376 declare <16 x i16> @llvm.umin.v16i16(<16 x i16>, <16 x i16>)
4377 declare <8 x i32> @llvm.umin.v8i32(<8 x i32>, <8 x i32>)
4378 declare <4 x i64> @llvm.umin.v4i64(<4 x i64>, <4 x i64>)