1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s --check-prefixes=CHECK,SVE
3 ; RUN: llc -mattr=+sve2 -force-streaming-compatible < %s | FileCheck %s --check-prefixes=CHECK,SVE2
4 ; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s --check-prefixes=CHECK,SVE2
5 ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
7 target triple = "aarch64-unknown-linux-gnu"
13 define <4 x i8> @sdiv_v4i8(<4 x i8> %op1, <4 x i8> %op2) {
14 ; CHECK-LABEL: sdiv_v4i8:
16 ; CHECK-NEXT: ptrue p0.h, vl4
17 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
18 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
19 ; CHECK-NEXT: sxtb z0.h, p0/m, z0.h
20 ; CHECK-NEXT: sxtb z1.h, p0/m, z1.h
21 ; CHECK-NEXT: ptrue p0.s, vl4
22 ; CHECK-NEXT: sunpklo z1.s, z1.h
23 ; CHECK-NEXT: sunpklo z0.s, z0.h
24 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
25 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
26 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
29 ; NEON-NOSVE-LABEL: sdiv_v4i8:
30 ; NEON-NOSVE: // %bb.0:
31 ; NEON-NOSVE-NEXT: shl v0.4h, v0.4h, #8
32 ; NEON-NOSVE-NEXT: shl v1.4h, v1.4h, #8
33 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
34 ; NEON-NOSVE-NEXT: sshr v0.4h, v0.4h, #8
35 ; NEON-NOSVE-NEXT: sshr v1.4h, v1.4h, #8
36 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
37 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
38 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
39 ; NEON-NOSVE-NEXT: xtn v0.4h, v0.4s
40 ; NEON-NOSVE-NEXT: ret
42 ; NONEON-NOSVE-LABEL: sdiv_v4i8:
43 ; NONEON-NOSVE: // %bb.0:
44 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
45 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
46 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
47 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]
48 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
49 ; NONEON-NOSVE-NEXT: ldrsb w10, [sp, #12]
50 ; NONEON-NOSVE-NEXT: ldrsb w11, [sp, #10]
51 ; NONEON-NOSVE-NEXT: ldrsb w12, [sp, #8]
52 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
53 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #20]
54 ; NONEON-NOSVE-NEXT: sdiv w9, w10, w9
55 ; NONEON-NOSVE-NEXT: ldrsb w10, [sp, #18]
56 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
57 ; NONEON-NOSVE-NEXT: sdiv w10, w11, w10
58 ; NONEON-NOSVE-NEXT: ldrsb w11, [sp, #16]
59 ; NONEON-NOSVE-NEXT: strh w9, [sp, #28]
60 ; NONEON-NOSVE-NEXT: sdiv w11, w12, w11
61 ; NONEON-NOSVE-NEXT: strh w10, [sp, #26]
62 ; NONEON-NOSVE-NEXT: strh w11, [sp, #24]
63 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
64 ; NONEON-NOSVE-NEXT: add sp, sp, #32
65 ; NONEON-NOSVE-NEXT: ret
66 %res = sdiv <4 x i8> %op1, %op2
70 define <8 x i8> @sdiv_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
71 ; CHECK-LABEL: sdiv_v8i8:
73 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
74 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
75 ; CHECK-NEXT: ptrue p0.s, vl4
76 ; CHECK-NEXT: sunpklo z1.h, z1.b
77 ; CHECK-NEXT: sunpklo z0.h, z0.b
78 ; CHECK-NEXT: sunpklo z2.s, z1.h
79 ; CHECK-NEXT: sunpklo z3.s, z0.h
80 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
81 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
82 ; CHECK-NEXT: sunpklo z1.s, z1.h
83 ; CHECK-NEXT: sunpklo z0.s, z0.h
84 ; CHECK-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
85 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
86 ; CHECK-NEXT: ptrue p0.h, vl4
87 ; CHECK-NEXT: uzp1 z1.h, z2.h, z2.h
88 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
89 ; CHECK-NEXT: splice z1.h, p0, z1.h, z0.h
90 ; CHECK-NEXT: uzp1 z0.b, z1.b, z1.b
91 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
94 ; NEON-NOSVE-LABEL: sdiv_v8i8:
95 ; NEON-NOSVE: // %bb.0:
96 ; NEON-NOSVE-NEXT: sshll v1.8h, v1.8b, #0
97 ; NEON-NOSVE-NEXT: sshll v0.8h, v0.8b, #0
98 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
99 ; NEON-NOSVE-NEXT: sshll2 v2.4s, v1.8h, #0
100 ; NEON-NOSVE-NEXT: sshll2 v3.4s, v0.8h, #0
101 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
102 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
103 ; NEON-NOSVE-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
104 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
105 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
106 ; NEON-NOSVE-NEXT: xtn v0.8b, v0.8h
107 ; NEON-NOSVE-NEXT: ret
109 ; NONEON-NOSVE-LABEL: sdiv_v8i8:
110 ; NONEON-NOSVE: // %bb.0:
111 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
112 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
113 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
114 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #23]
115 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #15]
116 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
117 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
118 ; NONEON-NOSVE-NEXT: strb w8, [sp, #31]
119 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]
120 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
121 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #13]
122 ; NONEON-NOSVE-NEXT: strb w8, [sp, #30]
123 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #21]
124 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
125 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #12]
126 ; NONEON-NOSVE-NEXT: strb w8, [sp, #29]
127 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #20]
128 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
129 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #11]
130 ; NONEON-NOSVE-NEXT: strb w8, [sp, #28]
131 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #19]
132 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
133 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #10]
134 ; NONEON-NOSVE-NEXT: strb w8, [sp, #27]
135 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #18]
136 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
137 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #9]
138 ; NONEON-NOSVE-NEXT: strb w8, [sp, #26]
139 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #17]
140 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
141 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #8]
142 ; NONEON-NOSVE-NEXT: strb w8, [sp, #25]
143 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #16]
144 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
145 ; NONEON-NOSVE-NEXT: strb w8, [sp, #24]
146 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
147 ; NONEON-NOSVE-NEXT: add sp, sp, #32
148 ; NONEON-NOSVE-NEXT: ret
149 %res = sdiv <8 x i8> %op1, %op2
153 define <16 x i8> @sdiv_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
154 ; CHECK-LABEL: sdiv_v16i8:
156 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
157 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
158 ; CHECK-NEXT: sunpklo z2.h, z1.b
159 ; CHECK-NEXT: sunpklo z3.h, z0.b
160 ; CHECK-NEXT: ptrue p0.s, vl4
161 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
162 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
163 ; CHECK-NEXT: sunpklo z4.s, z2.h
164 ; CHECK-NEXT: sunpklo z5.s, z3.h
165 ; CHECK-NEXT: ext z2.b, z2.b, z2.b, #8
166 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
167 ; CHECK-NEXT: sunpklo z1.h, z1.b
168 ; CHECK-NEXT: sunpklo z0.h, z0.b
169 ; CHECK-NEXT: sunpklo z2.s, z2.h
170 ; CHECK-NEXT: sunpklo z3.s, z3.h
171 ; CHECK-NEXT: sdivr z4.s, p0/m, z4.s, z5.s
172 ; CHECK-NEXT: sunpklo z5.s, z0.h
173 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
174 ; CHECK-NEXT: sunpklo z0.s, z0.h
175 ; CHECK-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
176 ; CHECK-NEXT: sunpklo z3.s, z1.h
177 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
178 ; CHECK-NEXT: sunpklo z1.s, z1.h
179 ; CHECK-NEXT: sdivr z3.s, p0/m, z3.s, z5.s
180 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
181 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
182 ; CHECK-NEXT: uzp1 z1.h, z4.h, z4.h
183 ; CHECK-NEXT: ptrue p0.h, vl4
184 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
185 ; CHECK-NEXT: splice z1.h, p0, z1.h, z2.h
186 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
187 ; CHECK-NEXT: splice z3.h, p0, z3.h, z0.h
188 ; CHECK-NEXT: uzp1 z0.b, z1.b, z1.b
189 ; CHECK-NEXT: ptrue p0.b, vl8
190 ; CHECK-NEXT: uzp1 z1.b, z3.b, z3.b
191 ; CHECK-NEXT: splice z0.b, p0, z0.b, z1.b
192 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
195 ; NEON-NOSVE-LABEL: sdiv_v16i8:
196 ; NEON-NOSVE: // %bb.0:
197 ; NEON-NOSVE-NEXT: sshll2 v2.8h, v1.16b, #0
198 ; NEON-NOSVE-NEXT: sshll2 v3.8h, v0.16b, #0
199 ; NEON-NOSVE-NEXT: sshll v1.8h, v1.8b, #0
200 ; NEON-NOSVE-NEXT: sshll v0.8h, v0.8b, #0
201 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
202 ; NEON-NOSVE-NEXT: sshll2 v4.4s, v2.8h, #0
203 ; NEON-NOSVE-NEXT: sshll2 v5.4s, v3.8h, #0
204 ; NEON-NOSVE-NEXT: sshll v2.4s, v2.4h, #0
205 ; NEON-NOSVE-NEXT: sshll v3.4s, v3.4h, #0
206 ; NEON-NOSVE-NEXT: sdivr z4.s, p0/m, z4.s, z5.s
207 ; NEON-NOSVE-NEXT: sshll2 v5.4s, v0.8h, #0
208 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
209 ; NEON-NOSVE-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
210 ; NEON-NOSVE-NEXT: sshll2 v3.4s, v1.8h, #0
211 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
212 ; NEON-NOSVE-NEXT: sdivr z3.s, p0/m, z3.s, z5.s
213 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
214 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v2.8h, v4.8h
215 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v3.8h
216 ; NEON-NOSVE-NEXT: uzp1 v0.16b, v0.16b, v1.16b
217 ; NEON-NOSVE-NEXT: ret
219 ; NONEON-NOSVE-LABEL: sdiv_v16i8:
220 ; NONEON-NOSVE: // %bb.0:
221 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
222 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
223 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #31]
224 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #15]
225 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
226 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
227 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
228 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #30]
229 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
230 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #13]
231 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
232 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #29]
233 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
234 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #12]
235 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
236 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #28]
237 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
238 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #11]
239 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
240 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #27]
241 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
242 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #10]
243 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
244 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #26]
245 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
246 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #9]
247 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
248 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #25]
249 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
250 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #8]
251 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
252 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #24]
253 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
254 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #7]
255 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
256 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #23]
257 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
258 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #6]
259 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
260 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]
261 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
262 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #5]
263 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
264 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #21]
265 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
266 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #4]
267 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
268 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #20]
269 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
270 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #3]
271 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
272 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #19]
273 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
274 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #2]
275 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
276 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #18]
277 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
278 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #1]
279 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
280 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #17]
281 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
282 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp]
283 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
284 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #16]
285 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
286 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
287 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
288 ; NONEON-NOSVE-NEXT: add sp, sp, #48
289 ; NONEON-NOSVE-NEXT: ret
290 %res = sdiv <16 x i8> %op1, %op2
294 define void @sdiv_v32i8(ptr %a, ptr %b) {
295 ; CHECK-LABEL: sdiv_v32i8:
297 ; CHECK-NEXT: ldp q6, q3, [x1]
298 ; CHECK-NEXT: ptrue p0.s, vl4
299 ; CHECK-NEXT: ldr q2, [x0, #16]
300 ; CHECK-NEXT: sunpklo z1.h, z3.b
301 ; CHECK-NEXT: sunpklo z4.h, z2.b
302 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
303 ; CHECK-NEXT: ext z2.b, z2.b, z2.b, #8
304 ; CHECK-NEXT: sunpklo z7.h, z6.b
305 ; CHECK-NEXT: ext z6.b, z6.b, z6.b, #8
306 ; CHECK-NEXT: sunpklo z3.h, z3.b
307 ; CHECK-NEXT: sunpklo z0.s, z1.h
308 ; CHECK-NEXT: sunpklo z5.s, z4.h
309 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
310 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
311 ; CHECK-NEXT: sunpklo z17.s, z7.h
312 ; CHECK-NEXT: ext z7.b, z7.b, z7.b, #8
313 ; CHECK-NEXT: sunpklo z6.h, z6.b
314 ; CHECK-NEXT: sunpklo z1.s, z1.h
315 ; CHECK-NEXT: sunpklo z4.s, z4.h
316 ; CHECK-NEXT: sunpklo z7.s, z7.h
317 ; CHECK-NEXT: sdivr z0.s, p0/m, z0.s, z5.s
318 ; CHECK-NEXT: sdivr z1.s, p0/m, z1.s, z4.s
319 ; CHECK-NEXT: sunpklo z4.h, z2.b
320 ; CHECK-NEXT: sunpklo z2.s, z3.h
321 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
322 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
323 ; CHECK-NEXT: sunpklo z5.s, z4.h
324 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
325 ; CHECK-NEXT: sunpklo z3.s, z3.h
326 ; CHECK-NEXT: sunpklo z4.s, z4.h
327 ; CHECK-NEXT: sdivr z2.s, p0/m, z2.s, z5.s
328 ; CHECK-NEXT: ldr q5, [x0]
329 ; CHECK-NEXT: sunpklo z16.h, z5.b
330 ; CHECK-NEXT: ext z5.b, z5.b, z5.b, #8
331 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
332 ; CHECK-NEXT: sunpklo z5.h, z5.b
333 ; CHECK-NEXT: sunpklo z18.s, z16.h
334 ; CHECK-NEXT: ext z16.b, z16.b, z16.b, #8
335 ; CHECK-NEXT: sunpklo z16.s, z16.h
336 ; CHECK-NEXT: sdivr z17.s, p0/m, z17.s, z18.s
337 ; CHECK-NEXT: sunpklo z18.s, z5.h
338 ; CHECK-NEXT: ext z5.b, z5.b, z5.b, #8
339 ; CHECK-NEXT: sunpklo z5.s, z5.h
340 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
341 ; CHECK-NEXT: sdivr z7.s, p0/m, z7.s, z16.s
342 ; CHECK-NEXT: sunpklo z16.s, z6.h
343 ; CHECK-NEXT: ext z6.b, z6.b, z6.b, #8
344 ; CHECK-NEXT: sunpklo z6.s, z6.h
345 ; CHECK-NEXT: sdivr z16.s, p0/m, z16.s, z18.s
346 ; CHECK-NEXT: sdiv z5.s, p0/m, z5.s, z6.s
347 ; CHECK-NEXT: uzp1 z6.h, z7.h, z7.h
348 ; CHECK-NEXT: uzp1 z7.h, z16.h, z16.h
349 ; CHECK-NEXT: sdivr z3.s, p0/m, z3.s, z4.s
350 ; CHECK-NEXT: uzp1 z4.h, z17.h, z17.h
351 ; CHECK-NEXT: ptrue p0.h, vl4
352 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
353 ; CHECK-NEXT: uzp1 z5.h, z5.h, z5.h
354 ; CHECK-NEXT: splice z4.h, p0, z4.h, z6.h
355 ; CHECK-NEXT: splice z7.h, p0, z7.h, z5.h
356 ; CHECK-NEXT: uzp1 z0.b, z0.b, z0.b
357 ; CHECK-NEXT: uzp1 z1.b, z4.b, z4.b
358 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
359 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
360 ; CHECK-NEXT: uzp1 z3.b, z7.b, z7.b
361 ; CHECK-NEXT: ptrue p0.b, vl8
362 ; CHECK-NEXT: splice z1.b, p0, z1.b, z3.b
363 ; CHECK-NEXT: uzp1 z2.b, z2.b, z2.b
364 ; CHECK-NEXT: splice z0.b, p0, z0.b, z2.b
365 ; CHECK-NEXT: stp q1, q0, [x0]
368 ; NEON-NOSVE-LABEL: sdiv_v32i8:
369 ; NEON-NOSVE: // %bb.0:
370 ; NEON-NOSVE-NEXT: ldp q6, q3, [x1]
371 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
372 ; NEON-NOSVE-NEXT: ldr q2, [x0, #16]
373 ; NEON-NOSVE-NEXT: sshll2 v1.8h, v3.16b, #0
374 ; NEON-NOSVE-NEXT: sshll2 v4.8h, v2.16b, #0
375 ; NEON-NOSVE-NEXT: sshll v3.8h, v3.8b, #0
376 ; NEON-NOSVE-NEXT: sshll v2.8h, v2.8b, #0
377 ; NEON-NOSVE-NEXT: sshll2 v7.8h, v6.16b, #0
378 ; NEON-NOSVE-NEXT: sshll v6.8h, v6.8b, #0
379 ; NEON-NOSVE-NEXT: sshll2 v0.4s, v1.8h, #0
380 ; NEON-NOSVE-NEXT: sshll2 v5.4s, v4.8h, #0
381 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
382 ; NEON-NOSVE-NEXT: sshll v4.4s, v4.4h, #0
383 ; NEON-NOSVE-NEXT: sshll2 v17.4s, v7.8h, #0
384 ; NEON-NOSVE-NEXT: sshll v7.4s, v7.4h, #0
385 ; NEON-NOSVE-NEXT: sdivr z0.s, p0/m, z0.s, z5.s
386 ; NEON-NOSVE-NEXT: sshll2 v5.4s, v2.8h, #0
387 ; NEON-NOSVE-NEXT: sshll v2.4s, v2.4h, #0
388 ; NEON-NOSVE-NEXT: sdivr z1.s, p0/m, z1.s, z4.s
389 ; NEON-NOSVE-NEXT: sshll2 v4.4s, v3.8h, #0
390 ; NEON-NOSVE-NEXT: sshll v3.4s, v3.4h, #0
391 ; NEON-NOSVE-NEXT: sdivr z4.s, p0/m, z4.s, z5.s
392 ; NEON-NOSVE-NEXT: ldr q5, [x0]
393 ; NEON-NOSVE-NEXT: sshll2 v16.8h, v5.16b, #0
394 ; NEON-NOSVE-NEXT: sshll v5.8h, v5.8b, #0
395 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v1.8h, v0.8h
396 ; NEON-NOSVE-NEXT: sshll2 v18.4s, v16.8h, #0
397 ; NEON-NOSVE-NEXT: sshll v16.4s, v16.4h, #0
398 ; NEON-NOSVE-NEXT: sdivr z17.s, p0/m, z17.s, z18.s
399 ; NEON-NOSVE-NEXT: sshll2 v18.4s, v5.8h, #0
400 ; NEON-NOSVE-NEXT: sshll v5.4s, v5.4h, #0
401 ; NEON-NOSVE-NEXT: sdivr z7.s, p0/m, z7.s, z16.s
402 ; NEON-NOSVE-NEXT: sshll2 v16.4s, v6.8h, #0
403 ; NEON-NOSVE-NEXT: sshll v6.4s, v6.4h, #0
404 ; NEON-NOSVE-NEXT: sdivr z16.s, p0/m, z16.s, z18.s
405 ; NEON-NOSVE-NEXT: sdiv z5.s, p0/m, z5.s, z6.s
406 ; NEON-NOSVE-NEXT: sdiv z2.s, p0/m, z2.s, z3.s
407 ; NEON-NOSVE-NEXT: uzp1 v3.8h, v7.8h, v17.8h
408 ; NEON-NOSVE-NEXT: uzp1 v5.8h, v5.8h, v16.8h
409 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v2.8h, v4.8h
410 ; NEON-NOSVE-NEXT: uzp1 v2.16b, v5.16b, v3.16b
411 ; NEON-NOSVE-NEXT: uzp1 v0.16b, v1.16b, v0.16b
412 ; NEON-NOSVE-NEXT: stp q2, q0, [x0]
413 ; NEON-NOSVE-NEXT: ret
415 ; NONEON-NOSVE-LABEL: sdiv_v32i8:
416 ; NONEON-NOSVE: // %bb.0:
417 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
418 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
419 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
420 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
421 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
422 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
423 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #63]
424 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #47]
425 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
426 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #46]
427 ; NONEON-NOSVE-NEXT: strb w8, [sp, #95]
428 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #62]
429 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
430 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #45]
431 ; NONEON-NOSVE-NEXT: strb w8, [sp, #94]
432 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #61]
433 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
434 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #44]
435 ; NONEON-NOSVE-NEXT: strb w8, [sp, #93]
436 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #60]
437 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
438 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #43]
439 ; NONEON-NOSVE-NEXT: strb w8, [sp, #92]
440 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #59]
441 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
442 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #42]
443 ; NONEON-NOSVE-NEXT: strb w8, [sp, #91]
444 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #58]
445 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
446 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #41]
447 ; NONEON-NOSVE-NEXT: strb w8, [sp, #90]
448 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #57]
449 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
450 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #40]
451 ; NONEON-NOSVE-NEXT: strb w8, [sp, #89]
452 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #56]
453 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
454 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #39]
455 ; NONEON-NOSVE-NEXT: strb w8, [sp, #88]
456 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #55]
457 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
458 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #38]
459 ; NONEON-NOSVE-NEXT: strb w8, [sp, #87]
460 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #54]
461 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
462 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #37]
463 ; NONEON-NOSVE-NEXT: strb w8, [sp, #86]
464 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #53]
465 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
466 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #36]
467 ; NONEON-NOSVE-NEXT: strb w8, [sp, #85]
468 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #52]
469 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
470 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #35]
471 ; NONEON-NOSVE-NEXT: strb w8, [sp, #84]
472 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #51]
473 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
474 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #34]
475 ; NONEON-NOSVE-NEXT: strb w8, [sp, #83]
476 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #50]
477 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
478 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #33]
479 ; NONEON-NOSVE-NEXT: strb w8, [sp, #82]
480 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #49]
481 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
482 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #32]
483 ; NONEON-NOSVE-NEXT: strb w8, [sp, #81]
484 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #48]
485 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
486 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #15]
487 ; NONEON-NOSVE-NEXT: strb w8, [sp, #80]
488 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #31]
489 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
490 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #14]
491 ; NONEON-NOSVE-NEXT: strb w8, [sp, #79]
492 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #30]
493 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
494 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #13]
495 ; NONEON-NOSVE-NEXT: strb w8, [sp, #78]
496 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #29]
497 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
498 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #12]
499 ; NONEON-NOSVE-NEXT: strb w8, [sp, #77]
500 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #28]
501 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
502 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #11]
503 ; NONEON-NOSVE-NEXT: strb w8, [sp, #76]
504 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #27]
505 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
506 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #10]
507 ; NONEON-NOSVE-NEXT: strb w8, [sp, #75]
508 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #26]
509 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
510 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #9]
511 ; NONEON-NOSVE-NEXT: strb w8, [sp, #74]
512 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #25]
513 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
514 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #8]
515 ; NONEON-NOSVE-NEXT: strb w8, [sp, #73]
516 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #24]
517 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
518 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #7]
519 ; NONEON-NOSVE-NEXT: strb w8, [sp, #72]
520 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #23]
521 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
522 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #6]
523 ; NONEON-NOSVE-NEXT: strb w8, [sp, #71]
524 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]
525 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
526 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #5]
527 ; NONEON-NOSVE-NEXT: strb w8, [sp, #70]
528 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #21]
529 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
530 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #4]
531 ; NONEON-NOSVE-NEXT: strb w8, [sp, #69]
532 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #20]
533 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
534 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #3]
535 ; NONEON-NOSVE-NEXT: strb w8, [sp, #68]
536 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #19]
537 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
538 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #2]
539 ; NONEON-NOSVE-NEXT: strb w8, [sp, #67]
540 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #18]
541 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
542 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #1]
543 ; NONEON-NOSVE-NEXT: strb w8, [sp, #66]
544 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #17]
545 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
546 ; NONEON-NOSVE-NEXT: ldrsb w9, [sp]
547 ; NONEON-NOSVE-NEXT: strb w8, [sp, #65]
548 ; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #16]
549 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
550 ; NONEON-NOSVE-NEXT: strb w8, [sp, #64]
551 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
552 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
553 ; NONEON-NOSVE-NEXT: add sp, sp, #96
554 ; NONEON-NOSVE-NEXT: ret
555 %op1 = load <32 x i8>, ptr %a
556 %op2 = load <32 x i8>, ptr %b
557 %res = sdiv <32 x i8> %op1, %op2
558 store <32 x i8> %res, ptr %a
562 define <2 x i16> @sdiv_v2i16(<2 x i16> %op1, <2 x i16> %op2) {
563 ; CHECK-LABEL: sdiv_v2i16:
565 ; CHECK-NEXT: ptrue p0.s, vl2
566 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
567 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
568 ; CHECK-NEXT: sxth z1.s, p0/m, z1.s
569 ; CHECK-NEXT: sxth z0.s, p0/m, z0.s
570 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
571 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
574 ; NEON-NOSVE-LABEL: sdiv_v2i16:
575 ; NEON-NOSVE: // %bb.0:
576 ; NEON-NOSVE-NEXT: shl v1.2s, v1.2s, #16
577 ; NEON-NOSVE-NEXT: shl v0.2s, v0.2s, #16
578 ; NEON-NOSVE-NEXT: ptrue p0.s, vl2
579 ; NEON-NOSVE-NEXT: sshr v1.2s, v1.2s, #16
580 ; NEON-NOSVE-NEXT: sshr v0.2s, v0.2s, #16
581 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
582 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
583 ; NEON-NOSVE-NEXT: ret
585 ; NONEON-NOSVE-LABEL: sdiv_v2i16:
586 ; NONEON-NOSVE: // %bb.0:
587 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
588 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
589 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
590 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
591 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
592 ; NONEON-NOSVE-NEXT: ldrsh w10, [sp, #8]
593 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
594 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #16]
595 ; NONEON-NOSVE-NEXT: sdiv w9, w10, w9
596 ; NONEON-NOSVE-NEXT: stp w9, w8, [sp, #24]
597 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
598 ; NONEON-NOSVE-NEXT: add sp, sp, #32
599 ; NONEON-NOSVE-NEXT: ret
600 %res = sdiv <2 x i16> %op1, %op2
604 define <4 x i16> @sdiv_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
605 ; CHECK-LABEL: sdiv_v4i16:
607 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
608 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
609 ; CHECK-NEXT: ptrue p0.s, vl4
610 ; CHECK-NEXT: sunpklo z1.s, z1.h
611 ; CHECK-NEXT: sunpklo z0.s, z0.h
612 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
613 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
614 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
617 ; NEON-NOSVE-LABEL: sdiv_v4i16:
618 ; NEON-NOSVE: // %bb.0:
619 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
620 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
621 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
622 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
623 ; NEON-NOSVE-NEXT: xtn v0.4h, v0.4s
624 ; NEON-NOSVE-NEXT: ret
626 ; NONEON-NOSVE-LABEL: sdiv_v4i16:
627 ; NONEON-NOSVE: // %bb.0:
628 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
629 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
630 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
631 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
632 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
633 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
634 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
635 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
636 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
637 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
638 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
639 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
640 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
641 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
642 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
643 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
644 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
645 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
646 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
647 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
648 ; NONEON-NOSVE-NEXT: add sp, sp, #32
649 ; NONEON-NOSVE-NEXT: ret
650 %res = sdiv <4 x i16> %op1, %op2
654 define <8 x i16> @sdiv_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
655 ; CHECK-LABEL: sdiv_v8i16:
657 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
658 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
659 ; CHECK-NEXT: sunpklo z2.s, z1.h
660 ; CHECK-NEXT: sunpklo z3.s, z0.h
661 ; CHECK-NEXT: ptrue p0.s, vl4
662 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
663 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
664 ; CHECK-NEXT: sunpklo z1.s, z1.h
665 ; CHECK-NEXT: sunpklo z0.s, z0.h
666 ; CHECK-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
667 ; CHECK-NEXT: sdivr z1.s, p0/m, z1.s, z0.s
668 ; CHECK-NEXT: ptrue p0.h, vl4
669 ; CHECK-NEXT: uzp1 z0.h, z2.h, z2.h
670 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
671 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
672 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
675 ; NEON-NOSVE-LABEL: sdiv_v8i16:
676 ; NEON-NOSVE: // %bb.0:
677 ; NEON-NOSVE-NEXT: sshll2 v2.4s, v1.8h, #0
678 ; NEON-NOSVE-NEXT: sshll2 v3.4s, v0.8h, #0
679 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
680 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
681 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
682 ; NEON-NOSVE-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
683 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
684 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
685 ; NEON-NOSVE-NEXT: ret
687 ; NONEON-NOSVE-LABEL: sdiv_v8i16:
688 ; NONEON-NOSVE: // %bb.0:
689 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
690 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
691 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
692 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
693 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
694 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
695 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
696 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
697 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
698 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
699 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
700 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
701 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
702 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
703 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
704 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
705 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
706 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
707 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
708 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
709 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
710 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
711 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
712 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
713 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
714 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
715 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
716 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
717 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
718 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
719 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
720 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
721 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
722 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
723 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
724 ; NONEON-NOSVE-NEXT: add sp, sp, #48
725 ; NONEON-NOSVE-NEXT: ret
726 %res = sdiv <8 x i16> %op1, %op2
730 define void @sdiv_v16i16(ptr %a, ptr %b) {
731 ; CHECK-LABEL: sdiv_v16i16:
733 ; CHECK-NEXT: ldp q4, q1, [x1]
734 ; CHECK-NEXT: ptrue p0.s, vl4
735 ; CHECK-NEXT: ldr q0, [x0, #16]
736 ; CHECK-NEXT: sunpklo z2.s, z1.h
737 ; CHECK-NEXT: sunpklo z3.s, z0.h
738 ; CHECK-NEXT: sunpklo z5.s, z4.h
739 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
740 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
741 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
742 ; CHECK-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
743 ; CHECK-NEXT: ldr q3, [x0]
744 ; CHECK-NEXT: sunpklo z4.s, z4.h
745 ; CHECK-NEXT: sunpklo z1.s, z1.h
746 ; CHECK-NEXT: sunpklo z0.s, z0.h
747 ; CHECK-NEXT: sunpklo z6.s, z3.h
748 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
749 ; CHECK-NEXT: sunpklo z3.s, z3.h
750 ; CHECK-NEXT: sdivr z5.s, p0/m, z5.s, z6.s
751 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
752 ; CHECK-NEXT: sdiv z3.s, p0/m, z3.s, z4.s
753 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
754 ; CHECK-NEXT: uzp1 z1.h, z5.h, z5.h
755 ; CHECK-NEXT: ptrue p0.h, vl4
756 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
757 ; CHECK-NEXT: splice z1.h, p0, z1.h, z3.h
758 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
759 ; CHECK-NEXT: splice z2.h, p0, z2.h, z0.h
760 ; CHECK-NEXT: stp q1, q2, [x0]
763 ; NEON-NOSVE-LABEL: sdiv_v16i16:
764 ; NEON-NOSVE: // %bb.0:
765 ; NEON-NOSVE-NEXT: ldp q4, q1, [x1]
766 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
767 ; NEON-NOSVE-NEXT: ldr q0, [x0, #16]
768 ; NEON-NOSVE-NEXT: sshll2 v2.4s, v1.8h, #0
769 ; NEON-NOSVE-NEXT: sshll2 v3.4s, v0.8h, #0
770 ; NEON-NOSVE-NEXT: sshll2 v5.4s, v4.8h, #0
771 ; NEON-NOSVE-NEXT: sshll v4.4s, v4.4h, #0
772 ; NEON-NOSVE-NEXT: sshll v1.4s, v1.4h, #0
773 ; NEON-NOSVE-NEXT: sshll v0.4s, v0.4h, #0
774 ; NEON-NOSVE-NEXT: sdivr z2.s, p0/m, z2.s, z3.s
775 ; NEON-NOSVE-NEXT: ldr q3, [x0]
776 ; NEON-NOSVE-NEXT: sshll2 v6.4s, v3.8h, #0
777 ; NEON-NOSVE-NEXT: sshll v3.4s, v3.4h, #0
778 ; NEON-NOSVE-NEXT: sdivr z5.s, p0/m, z5.s, z6.s
779 ; NEON-NOSVE-NEXT: sdiv z3.s, p0/m, z3.s, z4.s
780 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
781 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v3.8h, v5.8h
782 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
783 ; NEON-NOSVE-NEXT: stp q1, q0, [x0]
784 ; NEON-NOSVE-NEXT: ret
786 ; NONEON-NOSVE-LABEL: sdiv_v16i16:
787 ; NONEON-NOSVE: // %bb.0:
788 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
789 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
790 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
791 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
792 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
793 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
794 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #62]
795 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #46]
796 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
797 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #44]
798 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
799 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #60]
800 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
801 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #42]
802 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
803 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #58]
804 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
805 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #40]
806 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
807 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #56]
808 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
809 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #38]
810 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
811 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #54]
812 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
813 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #36]
814 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
815 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #52]
816 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
817 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #34]
818 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
819 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #50]
820 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
821 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #32]
822 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
823 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #48]
824 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
825 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
826 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
827 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
828 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
829 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
830 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
831 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
832 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
833 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
834 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
835 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
836 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
837 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
838 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
839 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
840 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
841 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
842 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
843 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
844 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
845 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
846 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
847 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
848 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
849 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
850 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
851 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
852 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
853 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
854 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
855 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
856 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
857 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
858 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
859 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
860 ; NONEON-NOSVE-NEXT: add sp, sp, #96
861 ; NONEON-NOSVE-NEXT: ret
862 %op1 = load <16 x i16>, ptr %a
863 %op2 = load <16 x i16>, ptr %b
864 %res = sdiv <16 x i16> %op1, %op2
865 store <16 x i16> %res, ptr %a
869 define <2 x i32> @sdiv_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
870 ; CHECK-LABEL: sdiv_v2i32:
872 ; CHECK-NEXT: ptrue p0.s, vl2
873 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
874 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
875 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
876 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
879 ; NEON-NOSVE-LABEL: sdiv_v2i32:
880 ; NEON-NOSVE: // %bb.0:
881 ; NEON-NOSVE-NEXT: ptrue p0.s, vl2
882 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $z0
883 ; NEON-NOSVE-NEXT: // kill: def $d1 killed $d1 def $z1
884 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
885 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
886 ; NEON-NOSVE-NEXT: ret
888 ; NONEON-NOSVE-LABEL: sdiv_v2i32:
889 ; NONEON-NOSVE: // %bb.0:
890 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
891 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
892 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
893 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
894 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
895 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
896 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
897 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
898 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #24]
899 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
900 ; NONEON-NOSVE-NEXT: add sp, sp, #32
901 ; NONEON-NOSVE-NEXT: ret
902 %res = sdiv <2 x i32> %op1, %op2
906 define <4 x i32> @sdiv_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
907 ; CHECK-LABEL: sdiv_v4i32:
909 ; CHECK-NEXT: ptrue p0.s, vl4
910 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
911 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
912 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
913 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
916 ; NEON-NOSVE-LABEL: sdiv_v4i32:
917 ; NEON-NOSVE: // %bb.0:
918 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
919 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 def $z0
920 ; NEON-NOSVE-NEXT: // kill: def $q1 killed $q1 def $z1
921 ; NEON-NOSVE-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
922 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 killed $z0
923 ; NEON-NOSVE-NEXT: ret
925 ; NONEON-NOSVE-LABEL: sdiv_v4i32:
926 ; NONEON-NOSVE: // %bb.0:
927 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
928 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
929 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
930 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
931 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
932 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
933 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
934 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
935 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #40]
936 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
937 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
938 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
939 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
940 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #32]
941 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
942 ; NONEON-NOSVE-NEXT: add sp, sp, #48
943 ; NONEON-NOSVE-NEXT: ret
944 %res = sdiv <4 x i32> %op1, %op2
948 define void @sdiv_v8i32(ptr %a, ptr %b) {
949 ; CHECK-LABEL: sdiv_v8i32:
951 ; CHECK-NEXT: ldp q0, q3, [x1]
952 ; CHECK-NEXT: ptrue p0.s, vl4
953 ; CHECK-NEXT: ldp q1, q2, [x0]
954 ; CHECK-NEXT: sdivr z0.s, p0/m, z0.s, z1.s
955 ; CHECK-NEXT: movprfx z1, z2
956 ; CHECK-NEXT: sdiv z1.s, p0/m, z1.s, z3.s
957 ; CHECK-NEXT: stp q0, q1, [x0]
960 ; NEON-NOSVE-LABEL: sdiv_v8i32:
961 ; NEON-NOSVE: // %bb.0:
962 ; NEON-NOSVE-NEXT: ldp q0, q3, [x1]
963 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
964 ; NEON-NOSVE-NEXT: ldp q1, q2, [x0]
965 ; NEON-NOSVE-NEXT: sdivr z0.s, p0/m, z0.s, z1.s
966 ; NEON-NOSVE-NEXT: movprfx z1, z2
967 ; NEON-NOSVE-NEXT: sdiv z1.s, p0/m, z1.s, z3.s
968 ; NEON-NOSVE-NEXT: stp q0, q1, [x0]
969 ; NEON-NOSVE-NEXT: ret
971 ; NONEON-NOSVE-LABEL: sdiv_v8i32:
972 ; NONEON-NOSVE: // %bb.0:
973 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
974 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
975 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
976 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
977 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
978 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
979 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]
980 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]
981 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
982 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]
983 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
984 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]
985 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #88]
986 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]
987 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
988 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]
989 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
990 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
991 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #80]
992 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
993 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
994 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
995 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
996 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
997 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #72]
998 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
999 ; NONEON-NOSVE-NEXT: sdiv w11, w10, w8
1000 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1001 ; NONEON-NOSVE-NEXT: sdiv w8, w9, w8
1002 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #64]
1003 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1004 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1005 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1006 ; NONEON-NOSVE-NEXT: ret
1007 %op1 = load <8 x i32>, ptr %a
1008 %op2 = load <8 x i32>, ptr %b
1009 %res = sdiv <8 x i32> %op1, %op2
1010 store <8 x i32> %res, ptr %a
1014 define <1 x i64> @sdiv_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
1015 ; CHECK-LABEL: sdiv_v1i64:
1017 ; CHECK-NEXT: ptrue p0.d, vl1
1018 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1019 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
1020 ; CHECK-NEXT: sdiv z0.d, p0/m, z0.d, z1.d
1021 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1024 ; NEON-NOSVE-LABEL: sdiv_v1i64:
1025 ; NEON-NOSVE: // %bb.0:
1026 ; NEON-NOSVE-NEXT: ptrue p0.d, vl1
1027 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $z0
1028 ; NEON-NOSVE-NEXT: // kill: def $d1 killed $d1 def $z1
1029 ; NEON-NOSVE-NEXT: sdiv z0.d, p0/m, z0.d, z1.d
1030 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
1031 ; NEON-NOSVE-NEXT: ret
1033 ; NONEON-NOSVE-LABEL: sdiv_v1i64:
1034 ; NONEON-NOSVE: // %bb.0:
1035 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
1036 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1037 ; NONEON-NOSVE-NEXT: fmov x8, d1
1038 ; NONEON-NOSVE-NEXT: fmov x9, d0
1039 ; NONEON-NOSVE-NEXT: sdiv x8, x9, x8
1040 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
1041 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1042 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1043 ; NONEON-NOSVE-NEXT: ret
1044 %res = sdiv <1 x i64> %op1, %op2
1048 define <2 x i64> @sdiv_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
1049 ; CHECK-LABEL: sdiv_v2i64:
1051 ; CHECK-NEXT: ptrue p0.d, vl2
1052 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1053 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
1054 ; CHECK-NEXT: sdiv z0.d, p0/m, z0.d, z1.d
1055 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1058 ; NEON-NOSVE-LABEL: sdiv_v2i64:
1059 ; NEON-NOSVE: // %bb.0:
1060 ; NEON-NOSVE-NEXT: ptrue p0.d, vl2
1061 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 def $z0
1062 ; NEON-NOSVE-NEXT: // kill: def $q1 killed $q1 def $z1
1063 ; NEON-NOSVE-NEXT: sdiv z0.d, p0/m, z0.d, z1.d
1064 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 killed $z0
1065 ; NEON-NOSVE-NEXT: ret
1067 ; NONEON-NOSVE-LABEL: sdiv_v2i64:
1068 ; NONEON-NOSVE: // %bb.0:
1069 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
1070 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1071 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1072 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1073 ; NONEON-NOSVE-NEXT: sdiv x11, x10, x8
1074 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1075 ; NONEON-NOSVE-NEXT: sdiv x8, x9, x8
1076 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #32]
1077 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1078 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1079 ; NONEON-NOSVE-NEXT: ret
1080 %res = sdiv <2 x i64> %op1, %op2
1084 define void @sdiv_v4i64(ptr %a, ptr %b) {
1085 ; CHECK-LABEL: sdiv_v4i64:
1087 ; CHECK-NEXT: ldp q0, q3, [x1]
1088 ; CHECK-NEXT: ptrue p0.d, vl2
1089 ; CHECK-NEXT: ldp q1, q2, [x0]
1090 ; CHECK-NEXT: sdivr z0.d, p0/m, z0.d, z1.d
1091 ; CHECK-NEXT: movprfx z1, z2
1092 ; CHECK-NEXT: sdiv z1.d, p0/m, z1.d, z3.d
1093 ; CHECK-NEXT: stp q0, q1, [x0]
1096 ; NEON-NOSVE-LABEL: sdiv_v4i64:
1097 ; NEON-NOSVE: // %bb.0:
1098 ; NEON-NOSVE-NEXT: ldp q0, q3, [x1]
1099 ; NEON-NOSVE-NEXT: ptrue p0.d, vl2
1100 ; NEON-NOSVE-NEXT: ldp q1, q2, [x0]
1101 ; NEON-NOSVE-NEXT: sdivr z0.d, p0/m, z0.d, z1.d
1102 ; NEON-NOSVE-NEXT: movprfx z1, z2
1103 ; NEON-NOSVE-NEXT: sdiv z1.d, p0/m, z1.d, z3.d
1104 ; NEON-NOSVE-NEXT: stp q0, q1, [x0]
1105 ; NEON-NOSVE-NEXT: ret
1107 ; NONEON-NOSVE-LABEL: sdiv_v4i64:
1108 ; NONEON-NOSVE: // %bb.0:
1109 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1110 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1111 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
1112 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
1113 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
1114 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
1115 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]
1116 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]
1117 ; NONEON-NOSVE-NEXT: sdiv x11, x10, x8
1118 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]
1119 ; NONEON-NOSVE-NEXT: sdiv x8, x9, x8
1120 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1121 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #80]
1122 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1123 ; NONEON-NOSVE-NEXT: sdiv x11, x10, x8
1124 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1125 ; NONEON-NOSVE-NEXT: sdiv x8, x9, x8
1126 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #64]
1127 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1128 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1129 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1130 ; NONEON-NOSVE-NEXT: ret
1131 %op1 = load <4 x i64>, ptr %a
1132 %op2 = load <4 x i64>, ptr %b
1133 %res = sdiv <4 x i64> %op1, %op2
1134 store <4 x i64> %res, ptr %a
1142 define <4 x i8> @udiv_v4i8(<4 x i8> %op1, <4 x i8> %op2) {
1143 ; CHECK-LABEL: udiv_v4i8:
1145 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
1146 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1147 ; CHECK-NEXT: ptrue p0.s, vl4
1148 ; CHECK-NEXT: and z0.h, z0.h, #0xff
1149 ; CHECK-NEXT: and z1.h, z1.h, #0xff
1150 ; CHECK-NEXT: uunpklo z1.s, z1.h
1151 ; CHECK-NEXT: uunpklo z0.s, z0.h
1152 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1153 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1154 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1157 ; NEON-NOSVE-LABEL: udiv_v4i8:
1158 ; NEON-NOSVE: // %bb.0:
1159 ; NEON-NOSVE-NEXT: bic v0.4h, #255, lsl #8
1160 ; NEON-NOSVE-NEXT: bic v1.4h, #255, lsl #8
1161 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1162 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1163 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1164 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1165 ; NEON-NOSVE-NEXT: xtn v0.4h, v0.4s
1166 ; NEON-NOSVE-NEXT: ret
1168 ; NONEON-NOSVE-LABEL: udiv_v4i8:
1169 ; NONEON-NOSVE: // %bb.0:
1170 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1171 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1172 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
1173 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1174 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
1175 ; NONEON-NOSVE-NEXT: ldrb w10, [sp, #12]
1176 ; NONEON-NOSVE-NEXT: ldrb w11, [sp, #10]
1177 ; NONEON-NOSVE-NEXT: ldrb w12, [sp, #8]
1178 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1179 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #20]
1180 ; NONEON-NOSVE-NEXT: udiv w9, w10, w9
1181 ; NONEON-NOSVE-NEXT: ldrb w10, [sp, #18]
1182 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
1183 ; NONEON-NOSVE-NEXT: udiv w10, w11, w10
1184 ; NONEON-NOSVE-NEXT: ldrb w11, [sp, #16]
1185 ; NONEON-NOSVE-NEXT: strh w9, [sp, #28]
1186 ; NONEON-NOSVE-NEXT: udiv w11, w12, w11
1187 ; NONEON-NOSVE-NEXT: strh w10, [sp, #26]
1188 ; NONEON-NOSVE-NEXT: strh w11, [sp, #24]
1189 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1190 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1191 ; NONEON-NOSVE-NEXT: ret
1192 %res = udiv <4 x i8> %op1, %op2
1196 define <8 x i8> @udiv_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
1197 ; CHECK-LABEL: udiv_v8i8:
1199 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
1200 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1201 ; CHECK-NEXT: ptrue p0.s, vl4
1202 ; CHECK-NEXT: uunpklo z1.h, z1.b
1203 ; CHECK-NEXT: uunpklo z0.h, z0.b
1204 ; CHECK-NEXT: uunpklo z2.s, z1.h
1205 ; CHECK-NEXT: uunpklo z3.s, z0.h
1206 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1207 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1208 ; CHECK-NEXT: uunpklo z1.s, z1.h
1209 ; CHECK-NEXT: uunpklo z0.s, z0.h
1210 ; CHECK-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1211 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1212 ; CHECK-NEXT: ptrue p0.h, vl4
1213 ; CHECK-NEXT: uzp1 z1.h, z2.h, z2.h
1214 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1215 ; CHECK-NEXT: splice z1.h, p0, z1.h, z0.h
1216 ; CHECK-NEXT: uzp1 z0.b, z1.b, z1.b
1217 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1220 ; NEON-NOSVE-LABEL: udiv_v8i8:
1221 ; NEON-NOSVE: // %bb.0:
1222 ; NEON-NOSVE-NEXT: ushll v1.8h, v1.8b, #0
1223 ; NEON-NOSVE-NEXT: ushll v0.8h, v0.8b, #0
1224 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1225 ; NEON-NOSVE-NEXT: ushll2 v2.4s, v1.8h, #0
1226 ; NEON-NOSVE-NEXT: ushll2 v3.4s, v0.8h, #0
1227 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1228 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1229 ; NEON-NOSVE-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1230 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1231 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
1232 ; NEON-NOSVE-NEXT: xtn v0.8b, v0.8h
1233 ; NEON-NOSVE-NEXT: ret
1235 ; NONEON-NOSVE-LABEL: udiv_v8i8:
1236 ; NONEON-NOSVE: // %bb.0:
1237 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1238 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1239 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
1240 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1241 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
1242 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1243 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
1244 ; NONEON-NOSVE-NEXT: strb w8, [sp, #31]
1245 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1246 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1247 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
1248 ; NONEON-NOSVE-NEXT: strb w8, [sp, #30]
1249 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1250 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1251 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
1252 ; NONEON-NOSVE-NEXT: strb w8, [sp, #29]
1253 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1254 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1255 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
1256 ; NONEON-NOSVE-NEXT: strb w8, [sp, #28]
1257 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1258 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1259 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
1260 ; NONEON-NOSVE-NEXT: strb w8, [sp, #27]
1261 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1262 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1263 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
1264 ; NONEON-NOSVE-NEXT: strb w8, [sp, #26]
1265 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1266 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1267 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
1268 ; NONEON-NOSVE-NEXT: strb w8, [sp, #25]
1269 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1270 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1271 ; NONEON-NOSVE-NEXT: strb w8, [sp, #24]
1272 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1273 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1274 ; NONEON-NOSVE-NEXT: ret
1275 %res = udiv <8 x i8> %op1, %op2
1279 define <16 x i8> @udiv_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
1280 ; CHECK-LABEL: udiv_v16i8:
1282 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
1283 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1284 ; CHECK-NEXT: uunpklo z2.h, z1.b
1285 ; CHECK-NEXT: uunpklo z3.h, z0.b
1286 ; CHECK-NEXT: ptrue p0.s, vl4
1287 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1288 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1289 ; CHECK-NEXT: uunpklo z4.s, z2.h
1290 ; CHECK-NEXT: uunpklo z5.s, z3.h
1291 ; CHECK-NEXT: ext z2.b, z2.b, z2.b, #8
1292 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
1293 ; CHECK-NEXT: uunpklo z1.h, z1.b
1294 ; CHECK-NEXT: uunpklo z0.h, z0.b
1295 ; CHECK-NEXT: uunpklo z2.s, z2.h
1296 ; CHECK-NEXT: uunpklo z3.s, z3.h
1297 ; CHECK-NEXT: udivr z4.s, p0/m, z4.s, z5.s
1298 ; CHECK-NEXT: uunpklo z5.s, z0.h
1299 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1300 ; CHECK-NEXT: uunpklo z0.s, z0.h
1301 ; CHECK-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1302 ; CHECK-NEXT: uunpklo z3.s, z1.h
1303 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1304 ; CHECK-NEXT: uunpklo z1.s, z1.h
1305 ; CHECK-NEXT: udivr z3.s, p0/m, z3.s, z5.s
1306 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
1307 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1308 ; CHECK-NEXT: uzp1 z1.h, z4.h, z4.h
1309 ; CHECK-NEXT: ptrue p0.h, vl4
1310 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
1311 ; CHECK-NEXT: splice z1.h, p0, z1.h, z2.h
1312 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1313 ; CHECK-NEXT: splice z3.h, p0, z3.h, z0.h
1314 ; CHECK-NEXT: uzp1 z0.b, z1.b, z1.b
1315 ; CHECK-NEXT: ptrue p0.b, vl8
1316 ; CHECK-NEXT: uzp1 z1.b, z3.b, z3.b
1317 ; CHECK-NEXT: splice z0.b, p0, z0.b, z1.b
1318 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1321 ; NEON-NOSVE-LABEL: udiv_v16i8:
1322 ; NEON-NOSVE: // %bb.0:
1323 ; NEON-NOSVE-NEXT: ushll2 v2.8h, v1.16b, #0
1324 ; NEON-NOSVE-NEXT: ushll2 v3.8h, v0.16b, #0
1325 ; NEON-NOSVE-NEXT: ushll v1.8h, v1.8b, #0
1326 ; NEON-NOSVE-NEXT: ushll v0.8h, v0.8b, #0
1327 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1328 ; NEON-NOSVE-NEXT: ushll2 v4.4s, v2.8h, #0
1329 ; NEON-NOSVE-NEXT: ushll2 v5.4s, v3.8h, #0
1330 ; NEON-NOSVE-NEXT: ushll v2.4s, v2.4h, #0
1331 ; NEON-NOSVE-NEXT: ushll v3.4s, v3.4h, #0
1332 ; NEON-NOSVE-NEXT: udivr z4.s, p0/m, z4.s, z5.s
1333 ; NEON-NOSVE-NEXT: ushll2 v5.4s, v0.8h, #0
1334 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1335 ; NEON-NOSVE-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1336 ; NEON-NOSVE-NEXT: ushll2 v3.4s, v1.8h, #0
1337 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1338 ; NEON-NOSVE-NEXT: udivr z3.s, p0/m, z3.s, z5.s
1339 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1340 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v2.8h, v4.8h
1341 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v3.8h
1342 ; NEON-NOSVE-NEXT: uzp1 v0.16b, v0.16b, v1.16b
1343 ; NEON-NOSVE-NEXT: ret
1345 ; NONEON-NOSVE-LABEL: udiv_v16i8:
1346 ; NONEON-NOSVE: // %bb.0:
1347 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
1348 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1349 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
1350 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
1351 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1352 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
1353 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
1354 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
1355 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1356 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
1357 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
1358 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
1359 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1360 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
1361 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
1362 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
1363 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1364 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
1365 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
1366 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
1367 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1368 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
1369 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
1370 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
1371 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1372 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
1373 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
1374 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
1375 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1376 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
1377 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
1378 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
1379 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1380 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
1381 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
1382 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1383 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1384 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
1385 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
1386 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1387 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1388 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
1389 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
1390 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1391 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1392 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
1393 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
1394 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1395 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1396 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
1397 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
1398 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1399 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1400 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
1401 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
1402 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1403 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1404 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
1405 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
1406 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1407 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1408 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
1409 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
1410 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1411 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1412 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
1413 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1414 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1415 ; NONEON-NOSVE-NEXT: ret
1416 %res = udiv <16 x i8> %op1, %op2
1420 define void @udiv_v32i8(ptr %a, ptr %b) {
1421 ; CHECK-LABEL: udiv_v32i8:
1423 ; CHECK-NEXT: ldp q6, q3, [x1]
1424 ; CHECK-NEXT: ptrue p0.s, vl4
1425 ; CHECK-NEXT: ldr q2, [x0, #16]
1426 ; CHECK-NEXT: uunpklo z1.h, z3.b
1427 ; CHECK-NEXT: uunpklo z4.h, z2.b
1428 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
1429 ; CHECK-NEXT: ext z2.b, z2.b, z2.b, #8
1430 ; CHECK-NEXT: uunpklo z7.h, z6.b
1431 ; CHECK-NEXT: ext z6.b, z6.b, z6.b, #8
1432 ; CHECK-NEXT: uunpklo z3.h, z3.b
1433 ; CHECK-NEXT: uunpklo z0.s, z1.h
1434 ; CHECK-NEXT: uunpklo z5.s, z4.h
1435 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1436 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
1437 ; CHECK-NEXT: uunpklo z17.s, z7.h
1438 ; CHECK-NEXT: ext z7.b, z7.b, z7.b, #8
1439 ; CHECK-NEXT: uunpklo z6.h, z6.b
1440 ; CHECK-NEXT: uunpklo z1.s, z1.h
1441 ; CHECK-NEXT: uunpklo z4.s, z4.h
1442 ; CHECK-NEXT: uunpklo z7.s, z7.h
1443 ; CHECK-NEXT: udivr z0.s, p0/m, z0.s, z5.s
1444 ; CHECK-NEXT: udivr z1.s, p0/m, z1.s, z4.s
1445 ; CHECK-NEXT: uunpklo z4.h, z2.b
1446 ; CHECK-NEXT: uunpklo z2.s, z3.h
1447 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
1448 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1449 ; CHECK-NEXT: uunpklo z5.s, z4.h
1450 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
1451 ; CHECK-NEXT: uunpklo z3.s, z3.h
1452 ; CHECK-NEXT: uunpklo z4.s, z4.h
1453 ; CHECK-NEXT: udivr z2.s, p0/m, z2.s, z5.s
1454 ; CHECK-NEXT: ldr q5, [x0]
1455 ; CHECK-NEXT: uunpklo z16.h, z5.b
1456 ; CHECK-NEXT: ext z5.b, z5.b, z5.b, #8
1457 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1458 ; CHECK-NEXT: uunpklo z5.h, z5.b
1459 ; CHECK-NEXT: uunpklo z18.s, z16.h
1460 ; CHECK-NEXT: ext z16.b, z16.b, z16.b, #8
1461 ; CHECK-NEXT: uunpklo z16.s, z16.h
1462 ; CHECK-NEXT: udivr z17.s, p0/m, z17.s, z18.s
1463 ; CHECK-NEXT: uunpklo z18.s, z5.h
1464 ; CHECK-NEXT: ext z5.b, z5.b, z5.b, #8
1465 ; CHECK-NEXT: uunpklo z5.s, z5.h
1466 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
1467 ; CHECK-NEXT: udivr z7.s, p0/m, z7.s, z16.s
1468 ; CHECK-NEXT: uunpklo z16.s, z6.h
1469 ; CHECK-NEXT: ext z6.b, z6.b, z6.b, #8
1470 ; CHECK-NEXT: uunpklo z6.s, z6.h
1471 ; CHECK-NEXT: udivr z16.s, p0/m, z16.s, z18.s
1472 ; CHECK-NEXT: udiv z5.s, p0/m, z5.s, z6.s
1473 ; CHECK-NEXT: uzp1 z6.h, z7.h, z7.h
1474 ; CHECK-NEXT: uzp1 z7.h, z16.h, z16.h
1475 ; CHECK-NEXT: udivr z3.s, p0/m, z3.s, z4.s
1476 ; CHECK-NEXT: uzp1 z4.h, z17.h, z17.h
1477 ; CHECK-NEXT: ptrue p0.h, vl4
1478 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1479 ; CHECK-NEXT: uzp1 z5.h, z5.h, z5.h
1480 ; CHECK-NEXT: splice z4.h, p0, z4.h, z6.h
1481 ; CHECK-NEXT: splice z7.h, p0, z7.h, z5.h
1482 ; CHECK-NEXT: uzp1 z0.b, z0.b, z0.b
1483 ; CHECK-NEXT: uzp1 z1.b, z4.b, z4.b
1484 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
1485 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
1486 ; CHECK-NEXT: uzp1 z3.b, z7.b, z7.b
1487 ; CHECK-NEXT: ptrue p0.b, vl8
1488 ; CHECK-NEXT: splice z1.b, p0, z1.b, z3.b
1489 ; CHECK-NEXT: uzp1 z2.b, z2.b, z2.b
1490 ; CHECK-NEXT: splice z0.b, p0, z0.b, z2.b
1491 ; CHECK-NEXT: stp q1, q0, [x0]
1494 ; NEON-NOSVE-LABEL: udiv_v32i8:
1495 ; NEON-NOSVE: // %bb.0:
1496 ; NEON-NOSVE-NEXT: ldp q6, q3, [x1]
1497 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1498 ; NEON-NOSVE-NEXT: ldr q2, [x0, #16]
1499 ; NEON-NOSVE-NEXT: ushll2 v1.8h, v3.16b, #0
1500 ; NEON-NOSVE-NEXT: ushll2 v4.8h, v2.16b, #0
1501 ; NEON-NOSVE-NEXT: ushll v3.8h, v3.8b, #0
1502 ; NEON-NOSVE-NEXT: ushll v2.8h, v2.8b, #0
1503 ; NEON-NOSVE-NEXT: ushll2 v7.8h, v6.16b, #0
1504 ; NEON-NOSVE-NEXT: ushll v6.8h, v6.8b, #0
1505 ; NEON-NOSVE-NEXT: ushll2 v0.4s, v1.8h, #0
1506 ; NEON-NOSVE-NEXT: ushll2 v5.4s, v4.8h, #0
1507 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1508 ; NEON-NOSVE-NEXT: ushll v4.4s, v4.4h, #0
1509 ; NEON-NOSVE-NEXT: ushll2 v17.4s, v7.8h, #0
1510 ; NEON-NOSVE-NEXT: ushll v7.4s, v7.4h, #0
1511 ; NEON-NOSVE-NEXT: udivr z0.s, p0/m, z0.s, z5.s
1512 ; NEON-NOSVE-NEXT: ushll2 v5.4s, v2.8h, #0
1513 ; NEON-NOSVE-NEXT: ushll v2.4s, v2.4h, #0
1514 ; NEON-NOSVE-NEXT: udivr z1.s, p0/m, z1.s, z4.s
1515 ; NEON-NOSVE-NEXT: ushll2 v4.4s, v3.8h, #0
1516 ; NEON-NOSVE-NEXT: ushll v3.4s, v3.4h, #0
1517 ; NEON-NOSVE-NEXT: udivr z4.s, p0/m, z4.s, z5.s
1518 ; NEON-NOSVE-NEXT: ldr q5, [x0]
1519 ; NEON-NOSVE-NEXT: ushll2 v16.8h, v5.16b, #0
1520 ; NEON-NOSVE-NEXT: ushll v5.8h, v5.8b, #0
1521 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v1.8h, v0.8h
1522 ; NEON-NOSVE-NEXT: ushll2 v18.4s, v16.8h, #0
1523 ; NEON-NOSVE-NEXT: ushll v16.4s, v16.4h, #0
1524 ; NEON-NOSVE-NEXT: udivr z17.s, p0/m, z17.s, z18.s
1525 ; NEON-NOSVE-NEXT: ushll2 v18.4s, v5.8h, #0
1526 ; NEON-NOSVE-NEXT: ushll v5.4s, v5.4h, #0
1527 ; NEON-NOSVE-NEXT: udivr z7.s, p0/m, z7.s, z16.s
1528 ; NEON-NOSVE-NEXT: ushll2 v16.4s, v6.8h, #0
1529 ; NEON-NOSVE-NEXT: ushll v6.4s, v6.4h, #0
1530 ; NEON-NOSVE-NEXT: udivr z16.s, p0/m, z16.s, z18.s
1531 ; NEON-NOSVE-NEXT: udiv z5.s, p0/m, z5.s, z6.s
1532 ; NEON-NOSVE-NEXT: udiv z2.s, p0/m, z2.s, z3.s
1533 ; NEON-NOSVE-NEXT: uzp1 v3.8h, v7.8h, v17.8h
1534 ; NEON-NOSVE-NEXT: uzp1 v5.8h, v5.8h, v16.8h
1535 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v2.8h, v4.8h
1536 ; NEON-NOSVE-NEXT: uzp1 v2.16b, v5.16b, v3.16b
1537 ; NEON-NOSVE-NEXT: uzp1 v0.16b, v1.16b, v0.16b
1538 ; NEON-NOSVE-NEXT: stp q2, q0, [x0]
1539 ; NEON-NOSVE-NEXT: ret
1541 ; NONEON-NOSVE-LABEL: udiv_v32i8:
1542 ; NONEON-NOSVE: // %bb.0:
1543 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1544 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1545 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
1546 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
1547 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
1548 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
1549 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]
1550 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]
1551 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1552 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]
1553 ; NONEON-NOSVE-NEXT: strb w8, [sp, #95]
1554 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]
1555 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1556 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]
1557 ; NONEON-NOSVE-NEXT: strb w8, [sp, #94]
1558 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]
1559 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1560 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]
1561 ; NONEON-NOSVE-NEXT: strb w8, [sp, #93]
1562 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]
1563 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1564 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]
1565 ; NONEON-NOSVE-NEXT: strb w8, [sp, #92]
1566 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]
1567 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1568 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]
1569 ; NONEON-NOSVE-NEXT: strb w8, [sp, #91]
1570 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]
1571 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1572 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]
1573 ; NONEON-NOSVE-NEXT: strb w8, [sp, #90]
1574 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]
1575 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1576 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]
1577 ; NONEON-NOSVE-NEXT: strb w8, [sp, #89]
1578 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]
1579 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1580 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]
1581 ; NONEON-NOSVE-NEXT: strb w8, [sp, #88]
1582 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]
1583 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1584 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]
1585 ; NONEON-NOSVE-NEXT: strb w8, [sp, #87]
1586 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]
1587 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1588 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]
1589 ; NONEON-NOSVE-NEXT: strb w8, [sp, #86]
1590 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]
1591 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1592 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]
1593 ; NONEON-NOSVE-NEXT: strb w8, [sp, #85]
1594 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]
1595 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1596 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]
1597 ; NONEON-NOSVE-NEXT: strb w8, [sp, #84]
1598 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]
1599 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1600 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]
1601 ; NONEON-NOSVE-NEXT: strb w8, [sp, #83]
1602 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]
1603 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1604 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]
1605 ; NONEON-NOSVE-NEXT: strb w8, [sp, #82]
1606 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]
1607 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1608 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]
1609 ; NONEON-NOSVE-NEXT: strb w8, [sp, #81]
1610 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]
1611 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1612 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
1613 ; NONEON-NOSVE-NEXT: strb w8, [sp, #80]
1614 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
1615 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1616 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
1617 ; NONEON-NOSVE-NEXT: strb w8, [sp, #79]
1618 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
1619 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1620 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
1621 ; NONEON-NOSVE-NEXT: strb w8, [sp, #78]
1622 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
1623 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1624 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
1625 ; NONEON-NOSVE-NEXT: strb w8, [sp, #77]
1626 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
1627 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1628 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
1629 ; NONEON-NOSVE-NEXT: strb w8, [sp, #76]
1630 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
1631 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1632 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
1633 ; NONEON-NOSVE-NEXT: strb w8, [sp, #75]
1634 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
1635 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1636 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
1637 ; NONEON-NOSVE-NEXT: strb w8, [sp, #74]
1638 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
1639 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1640 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
1641 ; NONEON-NOSVE-NEXT: strb w8, [sp, #73]
1642 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
1643 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1644 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
1645 ; NONEON-NOSVE-NEXT: strb w8, [sp, #72]
1646 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
1647 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1648 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
1649 ; NONEON-NOSVE-NEXT: strb w8, [sp, #71]
1650 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
1651 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1652 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
1653 ; NONEON-NOSVE-NEXT: strb w8, [sp, #70]
1654 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
1655 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1656 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
1657 ; NONEON-NOSVE-NEXT: strb w8, [sp, #69]
1658 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
1659 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1660 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
1661 ; NONEON-NOSVE-NEXT: strb w8, [sp, #68]
1662 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1663 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1664 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
1665 ; NONEON-NOSVE-NEXT: strb w8, [sp, #67]
1666 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1667 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1668 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
1669 ; NONEON-NOSVE-NEXT: strb w8, [sp, #66]
1670 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1671 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1672 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
1673 ; NONEON-NOSVE-NEXT: strb w8, [sp, #65]
1674 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1675 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1676 ; NONEON-NOSVE-NEXT: strb w8, [sp, #64]
1677 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1678 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1679 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1680 ; NONEON-NOSVE-NEXT: ret
1681 %op1 = load <32 x i8>, ptr %a
1682 %op2 = load <32 x i8>, ptr %b
1683 %res = udiv <32 x i8> %op1, %op2
1684 store <32 x i8> %res, ptr %a
1688 define <2 x i16> @udiv_v2i16(<2 x i16> %op1, <2 x i16> %op2) {
1689 ; CHECK-LABEL: udiv_v2i16:
1691 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
1692 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1693 ; CHECK-NEXT: ptrue p0.s, vl2
1694 ; CHECK-NEXT: and z1.s, z1.s, #0xffff
1695 ; CHECK-NEXT: and z0.s, z0.s, #0xffff
1696 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1697 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1700 ; NEON-NOSVE-LABEL: udiv_v2i16:
1701 ; NEON-NOSVE: // %bb.0:
1702 ; NEON-NOSVE-NEXT: movi d2, #0x00ffff0000ffff
1703 ; NEON-NOSVE-NEXT: ptrue p0.s, vl2
1704 ; NEON-NOSVE-NEXT: and v1.8b, v1.8b, v2.8b
1705 ; NEON-NOSVE-NEXT: and v0.8b, v0.8b, v2.8b
1706 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1707 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
1708 ; NEON-NOSVE-NEXT: ret
1710 ; NONEON-NOSVE-LABEL: udiv_v2i16:
1711 ; NONEON-NOSVE: // %bb.0:
1712 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1713 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1714 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
1715 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1716 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
1717 ; NONEON-NOSVE-NEXT: ldrh w10, [sp, #8]
1718 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1719 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #16]
1720 ; NONEON-NOSVE-NEXT: udiv w9, w10, w9
1721 ; NONEON-NOSVE-NEXT: stp w9, w8, [sp, #24]
1722 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1723 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1724 ; NONEON-NOSVE-NEXT: ret
1725 %res = udiv <2 x i16> %op1, %op2
1729 define <4 x i16> @udiv_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
1730 ; CHECK-LABEL: udiv_v4i16:
1732 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
1733 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1734 ; CHECK-NEXT: ptrue p0.s, vl4
1735 ; CHECK-NEXT: uunpklo z1.s, z1.h
1736 ; CHECK-NEXT: uunpklo z0.s, z0.h
1737 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1738 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1739 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1742 ; NEON-NOSVE-LABEL: udiv_v4i16:
1743 ; NEON-NOSVE: // %bb.0:
1744 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1745 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1746 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1747 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1748 ; NEON-NOSVE-NEXT: xtn v0.4h, v0.4s
1749 ; NEON-NOSVE-NEXT: ret
1751 ; NONEON-NOSVE-LABEL: udiv_v4i16:
1752 ; NONEON-NOSVE: // %bb.0:
1753 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1754 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1755 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
1756 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
1757 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
1758 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1759 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
1760 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
1761 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1762 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1763 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
1764 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
1765 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
1766 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1767 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
1768 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
1769 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
1770 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1771 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
1772 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1773 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1774 ; NONEON-NOSVE-NEXT: ret
1775 %res = udiv <4 x i16> %op1, %op2
1779 define <8 x i16> @udiv_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
1780 ; CHECK-LABEL: udiv_v8i16:
1782 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
1783 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1784 ; CHECK-NEXT: uunpklo z2.s, z1.h
1785 ; CHECK-NEXT: uunpklo z3.s, z0.h
1786 ; CHECK-NEXT: ptrue p0.s, vl4
1787 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1788 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1789 ; CHECK-NEXT: uunpklo z1.s, z1.h
1790 ; CHECK-NEXT: uunpklo z0.s, z0.h
1791 ; CHECK-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1792 ; CHECK-NEXT: udivr z1.s, p0/m, z1.s, z0.s
1793 ; CHECK-NEXT: ptrue p0.h, vl4
1794 ; CHECK-NEXT: uzp1 z0.h, z2.h, z2.h
1795 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1796 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1797 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1800 ; NEON-NOSVE-LABEL: udiv_v8i16:
1801 ; NEON-NOSVE: // %bb.0:
1802 ; NEON-NOSVE-NEXT: ushll2 v2.4s, v1.8h, #0
1803 ; NEON-NOSVE-NEXT: ushll2 v3.4s, v0.8h, #0
1804 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1805 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1806 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1807 ; NEON-NOSVE-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1808 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1809 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
1810 ; NEON-NOSVE-NEXT: ret
1812 ; NONEON-NOSVE-LABEL: udiv_v8i16:
1813 ; NONEON-NOSVE: // %bb.0:
1814 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
1815 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1816 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
1817 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
1818 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1819 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
1820 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1821 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
1822 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1823 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
1824 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1825 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
1826 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1827 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
1828 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1829 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
1830 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1831 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
1832 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1833 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
1834 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1835 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
1836 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1837 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1838 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1839 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
1840 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1841 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
1842 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1843 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
1844 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1845 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
1846 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1847 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1848 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1849 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1850 ; NONEON-NOSVE-NEXT: ret
1851 %res = udiv <8 x i16> %op1, %op2
1855 define void @udiv_v16i16(ptr %a, ptr %b) {
1856 ; CHECK-LABEL: udiv_v16i16:
1858 ; CHECK-NEXT: ldp q4, q1, [x1]
1859 ; CHECK-NEXT: ptrue p0.s, vl4
1860 ; CHECK-NEXT: ldr q0, [x0, #16]
1861 ; CHECK-NEXT: uunpklo z2.s, z1.h
1862 ; CHECK-NEXT: uunpklo z3.s, z0.h
1863 ; CHECK-NEXT: uunpklo z5.s, z4.h
1864 ; CHECK-NEXT: ext z4.b, z4.b, z4.b, #8
1865 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1866 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1867 ; CHECK-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1868 ; CHECK-NEXT: ldr q3, [x0]
1869 ; CHECK-NEXT: uunpklo z4.s, z4.h
1870 ; CHECK-NEXT: uunpklo z1.s, z1.h
1871 ; CHECK-NEXT: uunpklo z0.s, z0.h
1872 ; CHECK-NEXT: uunpklo z6.s, z3.h
1873 ; CHECK-NEXT: ext z3.b, z3.b, z3.b, #8
1874 ; CHECK-NEXT: uunpklo z3.s, z3.h
1875 ; CHECK-NEXT: udivr z5.s, p0/m, z5.s, z6.s
1876 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
1877 ; CHECK-NEXT: udiv z3.s, p0/m, z3.s, z4.s
1878 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1879 ; CHECK-NEXT: uzp1 z1.h, z5.h, z5.h
1880 ; CHECK-NEXT: ptrue p0.h, vl4
1881 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
1882 ; CHECK-NEXT: splice z1.h, p0, z1.h, z3.h
1883 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1884 ; CHECK-NEXT: splice z2.h, p0, z2.h, z0.h
1885 ; CHECK-NEXT: stp q1, q2, [x0]
1888 ; NEON-NOSVE-LABEL: udiv_v16i16:
1889 ; NEON-NOSVE: // %bb.0:
1890 ; NEON-NOSVE-NEXT: ldp q4, q1, [x1]
1891 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
1892 ; NEON-NOSVE-NEXT: ldr q0, [x0, #16]
1893 ; NEON-NOSVE-NEXT: ushll2 v2.4s, v1.8h, #0
1894 ; NEON-NOSVE-NEXT: ushll2 v3.4s, v0.8h, #0
1895 ; NEON-NOSVE-NEXT: ushll2 v5.4s, v4.8h, #0
1896 ; NEON-NOSVE-NEXT: ushll v4.4s, v4.4h, #0
1897 ; NEON-NOSVE-NEXT: ushll v1.4s, v1.4h, #0
1898 ; NEON-NOSVE-NEXT: ushll v0.4s, v0.4h, #0
1899 ; NEON-NOSVE-NEXT: udivr z2.s, p0/m, z2.s, z3.s
1900 ; NEON-NOSVE-NEXT: ldr q3, [x0]
1901 ; NEON-NOSVE-NEXT: ushll2 v6.4s, v3.8h, #0
1902 ; NEON-NOSVE-NEXT: ushll v3.4s, v3.4h, #0
1903 ; NEON-NOSVE-NEXT: udivr z5.s, p0/m, z5.s, z6.s
1904 ; NEON-NOSVE-NEXT: udiv z3.s, p0/m, z3.s, z4.s
1905 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
1906 ; NEON-NOSVE-NEXT: uzp1 v1.8h, v3.8h, v5.8h
1907 ; NEON-NOSVE-NEXT: uzp1 v0.8h, v0.8h, v2.8h
1908 ; NEON-NOSVE-NEXT: stp q1, q0, [x0]
1909 ; NEON-NOSVE-NEXT: ret
1911 ; NONEON-NOSVE-LABEL: udiv_v16i16:
1912 ; NONEON-NOSVE: // %bb.0:
1913 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1914 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1915 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
1916 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
1917 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
1918 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
1919 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #62]
1920 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #46]
1921 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1922 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #44]
1923 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
1924 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #60]
1925 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1926 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #42]
1927 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
1928 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #58]
1929 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1930 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #40]
1931 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
1932 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #56]
1933 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1934 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #38]
1935 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
1936 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #54]
1937 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1938 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #36]
1939 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
1940 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #52]
1941 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1942 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #34]
1943 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
1944 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #50]
1945 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1946 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #32]
1947 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
1948 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #48]
1949 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1950 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
1951 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
1952 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
1953 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1954 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
1955 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
1956 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
1957 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1958 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
1959 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
1960 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
1961 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1962 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
1963 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
1964 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
1965 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1966 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
1967 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
1968 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
1969 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1970 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
1971 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
1972 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
1973 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1974 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
1975 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
1976 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
1977 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1978 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
1979 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
1980 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
1981 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
1982 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
1983 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1984 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1985 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1986 ; NONEON-NOSVE-NEXT: ret
1987 %op1 = load <16 x i16>, ptr %a
1988 %op2 = load <16 x i16>, ptr %b
1989 %res = udiv <16 x i16> %op1, %op2
1990 store <16 x i16> %res, ptr %a
1994 define <2 x i32> @udiv_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
1995 ; CHECK-LABEL: udiv_v2i32:
1997 ; CHECK-NEXT: ptrue p0.s, vl2
1998 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1999 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
2000 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
2001 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2004 ; NEON-NOSVE-LABEL: udiv_v2i32:
2005 ; NEON-NOSVE: // %bb.0:
2006 ; NEON-NOSVE-NEXT: ptrue p0.s, vl2
2007 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $z0
2008 ; NEON-NOSVE-NEXT: // kill: def $d1 killed $d1 def $z1
2009 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
2010 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
2011 ; NEON-NOSVE-NEXT: ret
2013 ; NONEON-NOSVE-LABEL: udiv_v2i32:
2014 ; NONEON-NOSVE: // %bb.0:
2015 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
2016 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2017 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
2018 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
2019 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
2020 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2021 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
2022 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2023 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #24]
2024 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
2025 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2026 ; NONEON-NOSVE-NEXT: ret
2027 %res = udiv <2 x i32> %op1, %op2
2031 define <4 x i32> @udiv_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
2032 ; CHECK-LABEL: udiv_v4i32:
2034 ; CHECK-NEXT: ptrue p0.s, vl4
2035 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
2036 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
2037 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
2038 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2041 ; NEON-NOSVE-LABEL: udiv_v4i32:
2042 ; NEON-NOSVE: // %bb.0:
2043 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
2044 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 def $z0
2045 ; NEON-NOSVE-NEXT: // kill: def $q1 killed $q1 def $z1
2046 ; NEON-NOSVE-NEXT: udiv z0.s, p0/m, z0.s, z1.s
2047 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 killed $z0
2048 ; NEON-NOSVE-NEXT: ret
2050 ; NONEON-NOSVE-LABEL: udiv_v4i32:
2051 ; NONEON-NOSVE: // %bb.0:
2052 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
2053 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
2054 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
2055 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
2056 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2057 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
2058 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2059 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
2060 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #40]
2061 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
2062 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2063 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
2064 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2065 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #32]
2066 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
2067 ; NONEON-NOSVE-NEXT: add sp, sp, #48
2068 ; NONEON-NOSVE-NEXT: ret
2069 %res = udiv <4 x i32> %op1, %op2
2073 define void @udiv_v8i32(ptr %a, ptr %b) {
2074 ; CHECK-LABEL: udiv_v8i32:
2076 ; CHECK-NEXT: ldp q0, q3, [x1]
2077 ; CHECK-NEXT: ptrue p0.s, vl4
2078 ; CHECK-NEXT: ldp q1, q2, [x0]
2079 ; CHECK-NEXT: udivr z0.s, p0/m, z0.s, z1.s
2080 ; CHECK-NEXT: movprfx z1, z2
2081 ; CHECK-NEXT: udiv z1.s, p0/m, z1.s, z3.s
2082 ; CHECK-NEXT: stp q0, q1, [x0]
2085 ; NEON-NOSVE-LABEL: udiv_v8i32:
2086 ; NEON-NOSVE: // %bb.0:
2087 ; NEON-NOSVE-NEXT: ldp q0, q3, [x1]
2088 ; NEON-NOSVE-NEXT: ptrue p0.s, vl4
2089 ; NEON-NOSVE-NEXT: ldp q1, q2, [x0]
2090 ; NEON-NOSVE-NEXT: udivr z0.s, p0/m, z0.s, z1.s
2091 ; NEON-NOSVE-NEXT: movprfx z1, z2
2092 ; NEON-NOSVE-NEXT: udiv z1.s, p0/m, z1.s, z3.s
2093 ; NEON-NOSVE-NEXT: stp q0, q1, [x0]
2094 ; NEON-NOSVE-NEXT: ret
2096 ; NONEON-NOSVE-LABEL: udiv_v8i32:
2097 ; NONEON-NOSVE: // %bb.0:
2098 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
2099 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
2100 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
2101 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
2102 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
2103 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
2104 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]
2105 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]
2106 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2107 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]
2108 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2109 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]
2110 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #88]
2111 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]
2112 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2113 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]
2114 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2115 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
2116 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #80]
2117 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
2118 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2119 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
2120 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2121 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
2122 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #72]
2123 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
2124 ; NONEON-NOSVE-NEXT: udiv w11, w10, w8
2125 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
2126 ; NONEON-NOSVE-NEXT: udiv w8, w9, w8
2127 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #64]
2128 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
2129 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2130 ; NONEON-NOSVE-NEXT: add sp, sp, #96
2131 ; NONEON-NOSVE-NEXT: ret
2132 %op1 = load <8 x i32>, ptr %a
2133 %op2 = load <8 x i32>, ptr %b
2134 %res = udiv <8 x i32> %op1, %op2
2135 store <8 x i32> %res, ptr %a
2139 define <1 x i64> @udiv_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
2140 ; CHECK-LABEL: udiv_v1i64:
2142 ; CHECK-NEXT: ptrue p0.d, vl1
2143 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2144 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
2145 ; CHECK-NEXT: udiv z0.d, p0/m, z0.d, z1.d
2146 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2149 ; NEON-NOSVE-LABEL: udiv_v1i64:
2150 ; NEON-NOSVE: // %bb.0:
2151 ; NEON-NOSVE-NEXT: ptrue p0.d, vl1
2152 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $z0
2153 ; NEON-NOSVE-NEXT: // kill: def $d1 killed $d1 def $z1
2154 ; NEON-NOSVE-NEXT: udiv z0.d, p0/m, z0.d, z1.d
2155 ; NEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $z0
2156 ; NEON-NOSVE-NEXT: ret
2158 ; NONEON-NOSVE-LABEL: udiv_v1i64:
2159 ; NONEON-NOSVE: // %bb.0:
2160 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
2161 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2162 ; NONEON-NOSVE-NEXT: fmov x8, d1
2163 ; NONEON-NOSVE-NEXT: fmov x9, d0
2164 ; NONEON-NOSVE-NEXT: udiv x8, x9, x8
2165 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
2166 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
2167 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2168 ; NONEON-NOSVE-NEXT: ret
2169 %res = udiv <1 x i64> %op1, %op2
2173 define <2 x i64> @udiv_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
2174 ; CHECK-LABEL: udiv_v2i64:
2176 ; CHECK-NEXT: ptrue p0.d, vl2
2177 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
2178 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
2179 ; CHECK-NEXT: udiv z0.d, p0/m, z0.d, z1.d
2180 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2183 ; NEON-NOSVE-LABEL: udiv_v2i64:
2184 ; NEON-NOSVE: // %bb.0:
2185 ; NEON-NOSVE-NEXT: ptrue p0.d, vl2
2186 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 def $z0
2187 ; NEON-NOSVE-NEXT: // kill: def $q1 killed $q1 def $z1
2188 ; NEON-NOSVE-NEXT: udiv z0.d, p0/m, z0.d, z1.d
2189 ; NEON-NOSVE-NEXT: // kill: def $q0 killed $q0 killed $z0
2190 ; NEON-NOSVE-NEXT: ret
2192 ; NONEON-NOSVE-LABEL: udiv_v2i64:
2193 ; NONEON-NOSVE: // %bb.0:
2194 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
2195 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
2196 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
2197 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
2198 ; NONEON-NOSVE-NEXT: udiv x11, x10, x8
2199 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
2200 ; NONEON-NOSVE-NEXT: udiv x8, x9, x8
2201 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #32]
2202 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
2203 ; NONEON-NOSVE-NEXT: add sp, sp, #48
2204 ; NONEON-NOSVE-NEXT: ret
2205 %res = udiv <2 x i64> %op1, %op2
2209 define void @udiv_v4i64(ptr %a, ptr %b) {
2210 ; CHECK-LABEL: udiv_v4i64:
2212 ; CHECK-NEXT: ldp q0, q3, [x1]
2213 ; CHECK-NEXT: ptrue p0.d, vl2
2214 ; CHECK-NEXT: ldp q1, q2, [x0]
2215 ; CHECK-NEXT: udivr z0.d, p0/m, z0.d, z1.d
2216 ; CHECK-NEXT: movprfx z1, z2
2217 ; CHECK-NEXT: udiv z1.d, p0/m, z1.d, z3.d
2218 ; CHECK-NEXT: stp q0, q1, [x0]
2221 ; NEON-NOSVE-LABEL: udiv_v4i64:
2222 ; NEON-NOSVE: // %bb.0:
2223 ; NEON-NOSVE-NEXT: ldp q0, q3, [x1]
2224 ; NEON-NOSVE-NEXT: ptrue p0.d, vl2
2225 ; NEON-NOSVE-NEXT: ldp q1, q2, [x0]
2226 ; NEON-NOSVE-NEXT: udivr z0.d, p0/m, z0.d, z1.d
2227 ; NEON-NOSVE-NEXT: movprfx z1, z2
2228 ; NEON-NOSVE-NEXT: udiv z1.d, p0/m, z1.d, z3.d
2229 ; NEON-NOSVE-NEXT: stp q0, q1, [x0]
2230 ; NEON-NOSVE-NEXT: ret
2232 ; NONEON-NOSVE-LABEL: udiv_v4i64:
2233 ; NONEON-NOSVE: // %bb.0:
2234 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
2235 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
2236 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
2237 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
2238 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
2239 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
2240 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]
2241 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]
2242 ; NONEON-NOSVE-NEXT: udiv x11, x10, x8
2243 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]
2244 ; NONEON-NOSVE-NEXT: udiv x8, x9, x8
2245 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
2246 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #80]
2247 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
2248 ; NONEON-NOSVE-NEXT: udiv x11, x10, x8
2249 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
2250 ; NONEON-NOSVE-NEXT: udiv x8, x9, x8
2251 ; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #64]
2252 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
2253 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2254 ; NONEON-NOSVE-NEXT: add sp, sp, #96
2255 ; NONEON-NOSVE-NEXT: ret
2256 %op1 = load <4 x i64>, ptr %a
2257 %op2 = load <4 x i64>, ptr %b
2258 %res = udiv <4 x i64> %op1, %op2
2259 store <4 x i64> %res, ptr %a
2263 define void @udiv_constantsplat_v8i32(ptr %a) {
2264 ; SVE-LABEL: udiv_constantsplat_v8i32:
2266 ; SVE-NEXT: mov w8, #8969 // =0x2309
2267 ; SVE-NEXT: ldp q1, q2, [x0]
2268 ; SVE-NEXT: movk w8, #22765, lsl #16
2269 ; SVE-NEXT: ptrue p0.s, vl4
2270 ; SVE-NEXT: mov z0.s, w8
2271 ; SVE-NEXT: movprfx z3, z1
2272 ; SVE-NEXT: umulh z3.s, p0/m, z3.s, z0.s
2273 ; SVE-NEXT: umulh z0.s, p0/m, z0.s, z2.s
2274 ; SVE-NEXT: sub z1.s, z1.s, z3.s
2275 ; SVE-NEXT: sub z2.s, z2.s, z0.s
2276 ; SVE-NEXT: lsr z1.s, z1.s, #1
2277 ; SVE-NEXT: lsr z2.s, z2.s, #1
2278 ; SVE-NEXT: add z1.s, z1.s, z3.s
2279 ; SVE-NEXT: add z0.s, z2.s, z0.s
2280 ; SVE-NEXT: lsr z1.s, z1.s, #6
2281 ; SVE-NEXT: lsr z0.s, z0.s, #6
2282 ; SVE-NEXT: stp q1, q0, [x0]
2285 ; SVE2-LABEL: udiv_constantsplat_v8i32:
2287 ; SVE2-NEXT: mov w8, #8969 // =0x2309
2288 ; SVE2-NEXT: ldp q1, q2, [x0]
2289 ; SVE2-NEXT: movk w8, #22765, lsl #16
2290 ; SVE2-NEXT: mov z0.s, w8
2291 ; SVE2-NEXT: umulh z3.s, z1.s, z0.s
2292 ; SVE2-NEXT: umulh z0.s, z2.s, z0.s
2293 ; SVE2-NEXT: sub z1.s, z1.s, z3.s
2294 ; SVE2-NEXT: sub z2.s, z2.s, z0.s
2295 ; SVE2-NEXT: usra z3.s, z1.s, #1
2296 ; SVE2-NEXT: usra z0.s, z2.s, #1
2297 ; SVE2-NEXT: lsr z1.s, z3.s, #6
2298 ; SVE2-NEXT: lsr z0.s, z0.s, #6
2299 ; SVE2-NEXT: stp q1, q0, [x0]
2302 ; NEON-NOSVE-LABEL: udiv_constantsplat_v8i32:
2303 ; NEON-NOSVE: // %bb.0:
2304 ; NEON-NOSVE-NEXT: mov w8, #8969 // =0x2309
2305 ; NEON-NOSVE-NEXT: ldp q1, q2, [x0]
2306 ; NEON-NOSVE-NEXT: movk w8, #22765, lsl #16
2307 ; NEON-NOSVE-NEXT: dup v0.4s, w8
2308 ; NEON-NOSVE-NEXT: umull2 v3.2d, v1.4s, v0.4s
2309 ; NEON-NOSVE-NEXT: umull v4.2d, v1.2s, v0.2s
2310 ; NEON-NOSVE-NEXT: umull2 v5.2d, v2.4s, v0.4s
2311 ; NEON-NOSVE-NEXT: umull v0.2d, v2.2s, v0.2s
2312 ; NEON-NOSVE-NEXT: uzp2 v3.4s, v4.4s, v3.4s
2313 ; NEON-NOSVE-NEXT: uzp2 v0.4s, v0.4s, v5.4s
2314 ; NEON-NOSVE-NEXT: sub v1.4s, v1.4s, v3.4s
2315 ; NEON-NOSVE-NEXT: sub v2.4s, v2.4s, v0.4s
2316 ; NEON-NOSVE-NEXT: usra v3.4s, v1.4s, #1
2317 ; NEON-NOSVE-NEXT: usra v0.4s, v2.4s, #1
2318 ; NEON-NOSVE-NEXT: ushr v1.4s, v3.4s, #6
2319 ; NEON-NOSVE-NEXT: ushr v0.4s, v0.4s, #6
2320 ; NEON-NOSVE-NEXT: stp q1, q0, [x0]
2321 ; NEON-NOSVE-NEXT: ret
2323 ; NONEON-NOSVE-LABEL: udiv_constantsplat_v8i32:
2324 ; NONEON-NOSVE: // %bb.0:
2325 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2326 ; NONEON-NOSVE-NEXT: mov w8, #8969 // =0x2309
2327 ; NONEON-NOSVE-NEXT: movk w8, #22765, lsl #16
2328 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2329 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2330 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #28]
2331 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2332 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2333 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2334 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2335 ; NONEON-NOSVE-NEXT: lsr w11, w9, #6
2336 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #24]
2337 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2338 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2339 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2340 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2341 ; NONEON-NOSVE-NEXT: lsr w9, w9, #6
2342 ; NONEON-NOSVE-NEXT: stp w9, w11, [sp, #56]
2343 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #20]
2344 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2345 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2346 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2347 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2348 ; NONEON-NOSVE-NEXT: lsr w11, w9, #6
2349 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #16]
2350 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2351 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2352 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2353 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2354 ; NONEON-NOSVE-NEXT: lsr w9, w9, #6
2355 ; NONEON-NOSVE-NEXT: stp w9, w11, [sp, #48]
2356 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #12]
2357 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2358 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2359 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2360 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2361 ; NONEON-NOSVE-NEXT: lsr w11, w9, #6
2362 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #8]
2363 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2364 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2365 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2366 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2367 ; NONEON-NOSVE-NEXT: lsr w9, w9, #6
2368 ; NONEON-NOSVE-NEXT: stp w9, w11, [sp, #40]
2369 ; NONEON-NOSVE-NEXT: ldr w9, [sp, #4]
2370 ; NONEON-NOSVE-NEXT: umull x10, w9, w8
2371 ; NONEON-NOSVE-NEXT: lsr x10, x10, #32
2372 ; NONEON-NOSVE-NEXT: sub w9, w9, w10
2373 ; NONEON-NOSVE-NEXT: add w9, w10, w9, lsr #1
2374 ; NONEON-NOSVE-NEXT: lsr w11, w9, #6
2375 ; NONEON-NOSVE-NEXT: ldr w9, [sp]
2376 ; NONEON-NOSVE-NEXT: umull x8, w9, w8
2377 ; NONEON-NOSVE-NEXT: lsr x8, x8, #32
2378 ; NONEON-NOSVE-NEXT: sub w9, w9, w8
2379 ; NONEON-NOSVE-NEXT: add w8, w8, w9, lsr #1
2380 ; NONEON-NOSVE-NEXT: lsr w8, w8, #6
2381 ; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #32]
2382 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2383 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
2384 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2385 ; NONEON-NOSVE-NEXT: ret
2386 %op1 = load <8 x i32>, ptr %a
2387 %res = udiv <8 x i32> %op1, <i32 95, i32 95, i32 95, i32 95, i32 95, i32 95, i32 95, i32 95>
2388 store <8 x i32> %res, ptr %a