1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s --check-prefixes=ALL,LE,LE-64BIT
3 ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s --check-prefixes=ALL,BE
4 ; RUN: llc < %s -mtriple=ppc32-- | FileCheck %s --check-prefixes=ALL,LE,LE-32BIT
6 define void @lshr_4bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
7 ; ALL-LABEL: lshr_4bytes:
9 ; ALL-NEXT: lwz 3, 0(3)
10 ; ALL-NEXT: lwz 4, 0(4)
11 ; ALL-NEXT: srw 3, 3, 4
12 ; ALL-NEXT: stw 3, 0(5)
14 %src = load i32, ptr %src.ptr, align 1
15 %bitOff = load i32, ptr %bitOff.ptr, align 1
16 %res = lshr i32 %src, %bitOff
17 store i32 %res, ptr %dst, align 1
20 define void @shl_4bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
21 ; ALL-LABEL: shl_4bytes:
23 ; ALL-NEXT: lwz 3, 0(3)
24 ; ALL-NEXT: lwz 4, 0(4)
25 ; ALL-NEXT: slw 3, 3, 4
26 ; ALL-NEXT: stw 3, 0(5)
28 %src = load i32, ptr %src.ptr, align 1
29 %bitOff = load i32, ptr %bitOff.ptr, align 1
30 %res = shl i32 %src, %bitOff
31 store i32 %res, ptr %dst, align 1
34 define void @ashr_4bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
35 ; ALL-LABEL: ashr_4bytes:
37 ; ALL-NEXT: lwz 3, 0(3)
38 ; ALL-NEXT: lwz 4, 0(4)
39 ; ALL-NEXT: sraw 3, 3, 4
40 ; ALL-NEXT: stw 3, 0(5)
42 %src = load i32, ptr %src.ptr, align 1
43 %bitOff = load i32, ptr %bitOff.ptr, align 1
44 %res = ashr i32 %src, %bitOff
45 store i32 %res, ptr %dst, align 1
49 define void @lshr_8bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
50 ; LE-64BIT-LABEL: lshr_8bytes:
52 ; LE-64BIT-NEXT: ld 3, 0(3)
53 ; LE-64BIT-NEXT: lwz 4, 0(4)
54 ; LE-64BIT-NEXT: srd 3, 3, 4
55 ; LE-64BIT-NEXT: std 3, 0(5)
58 ; BE-LABEL: lshr_8bytes:
61 ; BE-NEXT: lwz 4, 4(4)
62 ; BE-NEXT: srd 3, 3, 4
63 ; BE-NEXT: std 3, 0(5)
66 ; LE-32BIT-LABEL: lshr_8bytes:
68 ; LE-32BIT-NEXT: lwz 4, 4(4)
69 ; LE-32BIT-NEXT: lwz 6, 4(3)
70 ; LE-32BIT-NEXT: lwz 3, 0(3)
71 ; LE-32BIT-NEXT: subfic 7, 4, 32
72 ; LE-32BIT-NEXT: srw 6, 6, 4
73 ; LE-32BIT-NEXT: addi 8, 4, -32
74 ; LE-32BIT-NEXT: slw 7, 3, 7
75 ; LE-32BIT-NEXT: srw 4, 3, 4
76 ; LE-32BIT-NEXT: srw 3, 3, 8
77 ; LE-32BIT-NEXT: or 6, 6, 7
78 ; LE-32BIT-NEXT: or 3, 6, 3
79 ; LE-32BIT-NEXT: stw 4, 0(5)
80 ; LE-32BIT-NEXT: stw 3, 4(5)
82 %src = load i64, ptr %src.ptr, align 1
83 %bitOff = load i64, ptr %bitOff.ptr, align 1
84 %res = lshr i64 %src, %bitOff
85 store i64 %res, ptr %dst, align 1
88 define void @shl_8bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
89 ; LE-64BIT-LABEL: shl_8bytes:
91 ; LE-64BIT-NEXT: ld 3, 0(3)
92 ; LE-64BIT-NEXT: lwz 4, 0(4)
93 ; LE-64BIT-NEXT: sld 3, 3, 4
94 ; LE-64BIT-NEXT: std 3, 0(5)
97 ; BE-LABEL: shl_8bytes:
100 ; BE-NEXT: lwz 4, 4(4)
101 ; BE-NEXT: sld 3, 3, 4
102 ; BE-NEXT: std 3, 0(5)
105 ; LE-32BIT-LABEL: shl_8bytes:
107 ; LE-32BIT-NEXT: lwz 4, 4(4)
108 ; LE-32BIT-NEXT: lwz 6, 0(3)
109 ; LE-32BIT-NEXT: lwz 3, 4(3)
110 ; LE-32BIT-NEXT: subfic 7, 4, 32
111 ; LE-32BIT-NEXT: slw 6, 6, 4
112 ; LE-32BIT-NEXT: addi 8, 4, -32
113 ; LE-32BIT-NEXT: srw 7, 3, 7
114 ; LE-32BIT-NEXT: slw 4, 3, 4
115 ; LE-32BIT-NEXT: slw 3, 3, 8
116 ; LE-32BIT-NEXT: or 6, 6, 7
117 ; LE-32BIT-NEXT: or 3, 6, 3
118 ; LE-32BIT-NEXT: stw 4, 4(5)
119 ; LE-32BIT-NEXT: stw 3, 0(5)
121 %src = load i64, ptr %src.ptr, align 1
122 %bitOff = load i64, ptr %bitOff.ptr, align 1
123 %res = shl i64 %src, %bitOff
124 store i64 %res, ptr %dst, align 1
127 define void @ashr_8bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
128 ; LE-64BIT-LABEL: ashr_8bytes:
130 ; LE-64BIT-NEXT: ld 3, 0(3)
131 ; LE-64BIT-NEXT: lwz 4, 0(4)
132 ; LE-64BIT-NEXT: srad 3, 3, 4
133 ; LE-64BIT-NEXT: std 3, 0(5)
136 ; BE-LABEL: ashr_8bytes:
138 ; BE-NEXT: ld 3, 0(3)
139 ; BE-NEXT: lwz 4, 4(4)
140 ; BE-NEXT: srad 3, 3, 4
141 ; BE-NEXT: std 3, 0(5)
144 ; LE-32BIT-LABEL: ashr_8bytes:
146 ; LE-32BIT-NEXT: lwz 4, 4(4)
147 ; LE-32BIT-NEXT: lwz 6, 4(3)
148 ; LE-32BIT-NEXT: lwz 3, 0(3)
149 ; LE-32BIT-NEXT: subfic 7, 4, 32
150 ; LE-32BIT-NEXT: srw 6, 6, 4
151 ; LE-32BIT-NEXT: addi 8, 4, -32
152 ; LE-32BIT-NEXT: slw 7, 3, 7
153 ; LE-32BIT-NEXT: sraw 4, 3, 4
154 ; LE-32BIT-NEXT: sraw 3, 3, 8
155 ; LE-32BIT-NEXT: cmpwi 8, 1
156 ; LE-32BIT-NEXT: or 6, 6, 7
157 ; LE-32BIT-NEXT: bc 12, 0, .LBB5_1
158 ; LE-32BIT-NEXT: b .LBB5_2
159 ; LE-32BIT-NEXT: .LBB5_1:
160 ; LE-32BIT-NEXT: addi 3, 6, 0
161 ; LE-32BIT-NEXT: .LBB5_2:
162 ; LE-32BIT-NEXT: stw 4, 0(5)
163 ; LE-32BIT-NEXT: stw 3, 4(5)
165 %src = load i64, ptr %src.ptr, align 1
166 %bitOff = load i64, ptr %bitOff.ptr, align 1
167 %res = ashr i64 %src, %bitOff
168 store i64 %res, ptr %dst, align 1
172 define void @lshr_16bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
173 ; LE-64BIT-LABEL: lshr_16bytes:
175 ; LE-64BIT-NEXT: lwz 4, 0(4)
176 ; LE-64BIT-NEXT: ld 6, 8(3)
177 ; LE-64BIT-NEXT: subfic 7, 4, 64
178 ; LE-64BIT-NEXT: ld 3, 0(3)
179 ; LE-64BIT-NEXT: srd 3, 3, 4
180 ; LE-64BIT-NEXT: sld 7, 6, 7
181 ; LE-64BIT-NEXT: or 3, 3, 7
182 ; LE-64BIT-NEXT: addi 7, 4, -64
183 ; LE-64BIT-NEXT: srd 4, 6, 4
184 ; LE-64BIT-NEXT: srd 7, 6, 7
185 ; LE-64BIT-NEXT: std 4, 8(5)
186 ; LE-64BIT-NEXT: or 3, 3, 7
187 ; LE-64BIT-NEXT: std 3, 0(5)
190 ; BE-LABEL: lshr_16bytes:
192 ; BE-NEXT: lwz 4, 12(4)
193 ; BE-NEXT: ld 6, 0(3)
194 ; BE-NEXT: ld 3, 8(3)
195 ; BE-NEXT: subfic 7, 4, 64
196 ; BE-NEXT: srd 3, 3, 4
197 ; BE-NEXT: sld 7, 6, 7
198 ; BE-NEXT: addi 8, 4, -64
199 ; BE-NEXT: or 3, 3, 7
200 ; BE-NEXT: srd 7, 6, 8
201 ; BE-NEXT: srd 4, 6, 4
202 ; BE-NEXT: or 3, 3, 7
203 ; BE-NEXT: std 4, 0(5)
204 ; BE-NEXT: std 3, 8(5)
207 ; LE-32BIT-LABEL: lshr_16bytes:
209 ; LE-32BIT-NEXT: stwu 1, -48(1)
210 ; LE-32BIT-NEXT: lwz 7, 0(3)
211 ; LE-32BIT-NEXT: li 6, 0
212 ; LE-32BIT-NEXT: lwz 4, 12(4)
213 ; LE-32BIT-NEXT: lwz 8, 4(3)
214 ; LE-32BIT-NEXT: lwz 9, 8(3)
215 ; LE-32BIT-NEXT: lwz 3, 12(3)
216 ; LE-32BIT-NEXT: stw 6, 28(1)
217 ; LE-32BIT-NEXT: stw 6, 24(1)
218 ; LE-32BIT-NEXT: stw 6, 20(1)
219 ; LE-32BIT-NEXT: stw 6, 16(1)
220 ; LE-32BIT-NEXT: addi 6, 1, 32
221 ; LE-32BIT-NEXT: stw 7, 32(1)
222 ; LE-32BIT-NEXT: rlwinm 7, 4, 29, 28, 31
223 ; LE-32BIT-NEXT: stw 3, 44(1)
224 ; LE-32BIT-NEXT: sub 6, 6, 7
225 ; LE-32BIT-NEXT: stw 9, 40(1)
226 ; LE-32BIT-NEXT: li 3, 7
227 ; LE-32BIT-NEXT: stw 8, 36(1)
228 ; LE-32BIT-NEXT: nand 3, 4, 3
229 ; LE-32BIT-NEXT: lwz 7, 4(6)
230 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
231 ; LE-32BIT-NEXT: lwz 8, 8(6)
232 ; LE-32BIT-NEXT: subfic 10, 4, 32
233 ; LE-32BIT-NEXT: lwz 9, 0(6)
234 ; LE-32BIT-NEXT: clrlwi 3, 3, 27
235 ; LE-32BIT-NEXT: lwz 6, 12(6)
236 ; LE-32BIT-NEXT: srw 11, 8, 4
237 ; LE-32BIT-NEXT: slw 8, 8, 10
238 ; LE-32BIT-NEXT: slw 10, 9, 10
239 ; LE-32BIT-NEXT: srw 6, 6, 4
240 ; LE-32BIT-NEXT: srw 9, 9, 4
241 ; LE-32BIT-NEXT: srw 4, 7, 4
242 ; LE-32BIT-NEXT: slwi 7, 7, 1
243 ; LE-32BIT-NEXT: slw 3, 7, 3
244 ; LE-32BIT-NEXT: or 6, 8, 6
245 ; LE-32BIT-NEXT: or 4, 10, 4
246 ; LE-32BIT-NEXT: or 3, 11, 3
247 ; LE-32BIT-NEXT: stw 9, 0(5)
248 ; LE-32BIT-NEXT: stw 6, 12(5)
249 ; LE-32BIT-NEXT: stw 4, 4(5)
250 ; LE-32BIT-NEXT: stw 3, 8(5)
251 ; LE-32BIT-NEXT: addi 1, 1, 48
253 %src = load i128, ptr %src.ptr, align 1
254 %bitOff = load i128, ptr %bitOff.ptr, align 1
255 %res = lshr i128 %src, %bitOff
256 store i128 %res, ptr %dst, align 1
259 define void @shl_16bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
260 ; LE-64BIT-LABEL: shl_16bytes:
262 ; LE-64BIT-NEXT: lwz 4, 0(4)
263 ; LE-64BIT-NEXT: ld 6, 0(3)
264 ; LE-64BIT-NEXT: subfic 7, 4, 64
265 ; LE-64BIT-NEXT: ld 3, 8(3)
266 ; LE-64BIT-NEXT: sld 3, 3, 4
267 ; LE-64BIT-NEXT: srd 7, 6, 7
268 ; LE-64BIT-NEXT: or 3, 3, 7
269 ; LE-64BIT-NEXT: addi 7, 4, -64
270 ; LE-64BIT-NEXT: sld 4, 6, 4
271 ; LE-64BIT-NEXT: sld 7, 6, 7
272 ; LE-64BIT-NEXT: std 4, 0(5)
273 ; LE-64BIT-NEXT: or 3, 3, 7
274 ; LE-64BIT-NEXT: std 3, 8(5)
277 ; BE-LABEL: shl_16bytes:
279 ; BE-NEXT: lwz 4, 12(4)
280 ; BE-NEXT: ld 6, 8(3)
281 ; BE-NEXT: ld 3, 0(3)
282 ; BE-NEXT: subfic 7, 4, 64
283 ; BE-NEXT: sld 3, 3, 4
284 ; BE-NEXT: srd 7, 6, 7
285 ; BE-NEXT: addi 8, 4, -64
286 ; BE-NEXT: or 3, 3, 7
287 ; BE-NEXT: sld 7, 6, 8
288 ; BE-NEXT: sld 4, 6, 4
289 ; BE-NEXT: or 3, 3, 7
290 ; BE-NEXT: std 4, 8(5)
291 ; BE-NEXT: std 3, 0(5)
294 ; LE-32BIT-LABEL: shl_16bytes:
296 ; LE-32BIT-NEXT: stwu 1, -48(1)
297 ; LE-32BIT-NEXT: lwz 7, 0(3)
298 ; LE-32BIT-NEXT: li 6, 0
299 ; LE-32BIT-NEXT: lwz 8, 4(3)
300 ; LE-32BIT-NEXT: lwz 9, 8(3)
301 ; LE-32BIT-NEXT: lwz 3, 12(3)
302 ; LE-32BIT-NEXT: lwz 4, 12(4)
303 ; LE-32BIT-NEXT: stw 6, 44(1)
304 ; LE-32BIT-NEXT: stw 6, 40(1)
305 ; LE-32BIT-NEXT: stw 6, 36(1)
306 ; LE-32BIT-NEXT: stw 6, 32(1)
307 ; LE-32BIT-NEXT: rlwinm 6, 4, 29, 28, 31
308 ; LE-32BIT-NEXT: stw 3, 28(1)
309 ; LE-32BIT-NEXT: addi 3, 1, 16
310 ; LE-32BIT-NEXT: stw 9, 24(1)
311 ; LE-32BIT-NEXT: stw 8, 20(1)
312 ; LE-32BIT-NEXT: stw 7, 16(1)
313 ; LE-32BIT-NEXT: li 7, 7
314 ; LE-32BIT-NEXT: lwzux 3, 6, 3
315 ; LE-32BIT-NEXT: nand 7, 4, 7
316 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
317 ; LE-32BIT-NEXT: subfic 10, 4, 32
318 ; LE-32BIT-NEXT: lwz 8, 8(6)
319 ; LE-32BIT-NEXT: clrlwi 7, 7, 27
320 ; LE-32BIT-NEXT: lwz 9, 4(6)
321 ; LE-32BIT-NEXT: slw 3, 3, 4
322 ; LE-32BIT-NEXT: lwz 6, 12(6)
323 ; LE-32BIT-NEXT: slw 11, 9, 4
324 ; LE-32BIT-NEXT: srw 9, 9, 10
325 ; LE-32BIT-NEXT: srw 10, 6, 10
326 ; LE-32BIT-NEXT: slw 6, 6, 4
327 ; LE-32BIT-NEXT: slw 4, 8, 4
328 ; LE-32BIT-NEXT: srwi 8, 8, 1
329 ; LE-32BIT-NEXT: srw 7, 8, 7
330 ; LE-32BIT-NEXT: or 3, 3, 9
331 ; LE-32BIT-NEXT: or 4, 4, 10
332 ; LE-32BIT-NEXT: stw 3, 0(5)
333 ; LE-32BIT-NEXT: or 3, 11, 7
334 ; LE-32BIT-NEXT: stw 6, 12(5)
335 ; LE-32BIT-NEXT: stw 4, 8(5)
336 ; LE-32BIT-NEXT: stw 3, 4(5)
337 ; LE-32BIT-NEXT: addi 1, 1, 48
339 %src = load i128, ptr %src.ptr, align 1
340 %bitOff = load i128, ptr %bitOff.ptr, align 1
341 %res = shl i128 %src, %bitOff
342 store i128 %res, ptr %dst, align 1
345 define void @ashr_16bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
346 ; LE-64BIT-LABEL: ashr_16bytes:
348 ; LE-64BIT-NEXT: lwz 4, 0(4)
349 ; LE-64BIT-NEXT: ld 6, 8(3)
350 ; LE-64BIT-NEXT: subfic 7, 4, 64
351 ; LE-64BIT-NEXT: ld 3, 0(3)
352 ; LE-64BIT-NEXT: srd 3, 3, 4
353 ; LE-64BIT-NEXT: sld 7, 6, 7
354 ; LE-64BIT-NEXT: or 3, 3, 7
355 ; LE-64BIT-NEXT: addi 7, 4, -64
356 ; LE-64BIT-NEXT: srad 4, 6, 4
357 ; LE-64BIT-NEXT: cmpwi 7, 1
358 ; LE-64BIT-NEXT: srad 8, 6, 7
359 ; LE-64BIT-NEXT: std 4, 8(5)
360 ; LE-64BIT-NEXT: isellt 3, 3, 8
361 ; LE-64BIT-NEXT: std 3, 0(5)
364 ; BE-LABEL: ashr_16bytes:
366 ; BE-NEXT: lwz 4, 12(4)
367 ; BE-NEXT: ld 6, 8(3)
368 ; BE-NEXT: ld 3, 0(3)
369 ; BE-NEXT: subfic 7, 4, 64
370 ; BE-NEXT: srd 6, 6, 4
371 ; BE-NEXT: addi 8, 4, -64
372 ; BE-NEXT: sld 7, 3, 7
373 ; BE-NEXT: cmpwi 8, 1
374 ; BE-NEXT: or 6, 6, 7
375 ; BE-NEXT: srad 7, 3, 8
376 ; BE-NEXT: srad 3, 3, 4
377 ; BE-NEXT: bc 12, 0, .LBB8_2
379 ; BE-NEXT: ori 6, 7, 0
382 ; BE-NEXT: std 3, 0(5)
383 ; BE-NEXT: std 6, 8(5)
386 ; LE-32BIT-LABEL: ashr_16bytes:
388 ; LE-32BIT-NEXT: stwu 1, -48(1)
389 ; LE-32BIT-NEXT: lwz 7, 0(3)
390 ; LE-32BIT-NEXT: li 6, 7
391 ; LE-32BIT-NEXT: lwz 8, 4(3)
392 ; LE-32BIT-NEXT: lwz 9, 8(3)
393 ; LE-32BIT-NEXT: lwz 3, 12(3)
394 ; LE-32BIT-NEXT: lwz 4, 12(4)
395 ; LE-32BIT-NEXT: stw 3, 44(1)
396 ; LE-32BIT-NEXT: srawi 3, 7, 31
397 ; LE-32BIT-NEXT: stw 8, 36(1)
398 ; LE-32BIT-NEXT: rlwinm 8, 4, 29, 28, 31
399 ; LE-32BIT-NEXT: stw 7, 32(1)
400 ; LE-32BIT-NEXT: addi 7, 1, 32
401 ; LE-32BIT-NEXT: stw 9, 40(1)
402 ; LE-32BIT-NEXT: nand 6, 4, 6
403 ; LE-32BIT-NEXT: stw 3, 28(1)
404 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
405 ; LE-32BIT-NEXT: stw 3, 24(1)
406 ; LE-32BIT-NEXT: subfic 10, 4, 32
407 ; LE-32BIT-NEXT: stw 3, 20(1)
408 ; LE-32BIT-NEXT: clrlwi 6, 6, 27
409 ; LE-32BIT-NEXT: stw 3, 16(1)
410 ; LE-32BIT-NEXT: sub 3, 7, 8
411 ; LE-32BIT-NEXT: lwz 7, 4(3)
412 ; LE-32BIT-NEXT: lwz 8, 8(3)
413 ; LE-32BIT-NEXT: lwz 9, 0(3)
414 ; LE-32BIT-NEXT: lwz 3, 12(3)
415 ; LE-32BIT-NEXT: srw 11, 8, 4
416 ; LE-32BIT-NEXT: slw 8, 8, 10
417 ; LE-32BIT-NEXT: slw 10, 9, 10
418 ; LE-32BIT-NEXT: srw 3, 3, 4
419 ; LE-32BIT-NEXT: sraw 9, 9, 4
420 ; LE-32BIT-NEXT: srw 4, 7, 4
421 ; LE-32BIT-NEXT: slwi 7, 7, 1
422 ; LE-32BIT-NEXT: or 3, 8, 3
423 ; LE-32BIT-NEXT: slw 6, 7, 6
424 ; LE-32BIT-NEXT: stw 3, 12(5)
425 ; LE-32BIT-NEXT: or 3, 10, 4
426 ; LE-32BIT-NEXT: stw 3, 4(5)
427 ; LE-32BIT-NEXT: or 3, 11, 6
428 ; LE-32BIT-NEXT: stw 9, 0(5)
429 ; LE-32BIT-NEXT: stw 3, 8(5)
430 ; LE-32BIT-NEXT: addi 1, 1, 48
432 %src = load i128, ptr %src.ptr, align 1
433 %bitOff = load i128, ptr %bitOff.ptr, align 1
434 %res = ashr i128 %src, %bitOff
435 store i128 %res, ptr %dst, align 1
439 define void @lshr_32bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
440 ; LE-64BIT-LABEL: lshr_32bytes:
442 ; LE-64BIT-NEXT: li 6, 16
443 ; LE-64BIT-NEXT: lxvd2x 1, 0, 3
444 ; LE-64BIT-NEXT: xxlxor 2, 2, 2
445 ; LE-64BIT-NEXT: addi 7, 1, -64
446 ; LE-64BIT-NEXT: li 8, 32
447 ; LE-64BIT-NEXT: lxvd2x 0, 3, 6
448 ; LE-64BIT-NEXT: lwz 3, 0(4)
449 ; LE-64BIT-NEXT: li 4, 48
450 ; LE-64BIT-NEXT: stxvd2x 2, 7, 4
451 ; LE-64BIT-NEXT: stxvd2x 2, 7, 8
452 ; LE-64BIT-NEXT: rlwinm 4, 3, 29, 27, 31
453 ; LE-64BIT-NEXT: stxvd2x 0, 7, 6
454 ; LE-64BIT-NEXT: stxvd2x 1, 0, 7
455 ; LE-64BIT-NEXT: li 6, 7
456 ; LE-64BIT-NEXT: ldux 7, 4, 7
457 ; LE-64BIT-NEXT: ld 8, 16(4)
458 ; LE-64BIT-NEXT: nand 6, 3, 6
459 ; LE-64BIT-NEXT: ld 9, 8(4)
460 ; LE-64BIT-NEXT: clrlwi 3, 3, 29
461 ; LE-64BIT-NEXT: ld 4, 24(4)
462 ; LE-64BIT-NEXT: clrlwi 6, 6, 26
463 ; LE-64BIT-NEXT: srd 7, 7, 3
464 ; LE-64BIT-NEXT: sldi 10, 8, 1
465 ; LE-64BIT-NEXT: srd 11, 9, 3
466 ; LE-64BIT-NEXT: srd 8, 8, 3
467 ; LE-64BIT-NEXT: sld 6, 10, 6
468 ; LE-64BIT-NEXT: subfic 10, 3, 64
469 ; LE-64BIT-NEXT: srd 3, 4, 3
470 ; LE-64BIT-NEXT: or 6, 11, 6
471 ; LE-64BIT-NEXT: sld 11, 4, 10
472 ; LE-64BIT-NEXT: sld 9, 9, 10
473 ; LE-64BIT-NEXT: std 3, 24(5)
474 ; LE-64BIT-NEXT: or 7, 9, 7
475 ; LE-64BIT-NEXT: or 3, 11, 8
476 ; LE-64BIT-NEXT: std 6, 8(5)
477 ; LE-64BIT-NEXT: std 7, 0(5)
478 ; LE-64BIT-NEXT: std 3, 16(5)
481 ; BE-LABEL: lshr_32bytes:
483 ; BE-NEXT: ld 6, 0(3)
484 ; BE-NEXT: ld 7, 8(3)
485 ; BE-NEXT: ld 8, 16(3)
486 ; BE-NEXT: ld 3, 24(3)
487 ; BE-NEXT: lwz 4, 28(4)
488 ; BE-NEXT: addi 9, 1, -64
490 ; BE-NEXT: addi 11, 1, -32
491 ; BE-NEXT: std 3, 56(9)
492 ; BE-NEXT: rlwinm 3, 4, 29, 27, 31
494 ; BE-NEXT: std 10, 24(9)
495 ; BE-NEXT: std 10, 16(9)
496 ; BE-NEXT: std 10, 8(9)
497 ; BE-NEXT: std 10, -64(1)
498 ; BE-NEXT: std 8, 48(9)
499 ; BE-NEXT: std 7, 40(9)
500 ; BE-NEXT: std 6, 32(9)
501 ; BE-NEXT: extsw 3, 3
502 ; BE-NEXT: ldux 3, 11, 3
504 ; BE-NEXT: nand 6, 4, 6
505 ; BE-NEXT: clrlwi 4, 4, 29
506 ; BE-NEXT: clrlwi 6, 6, 26
507 ; BE-NEXT: ld 7, 8(11)
508 ; BE-NEXT: ld 8, 16(11)
509 ; BE-NEXT: ld 9, 24(11)
510 ; BE-NEXT: subfic 10, 4, 64
511 ; BE-NEXT: sldi 11, 7, 1
512 ; BE-NEXT: srd 7, 7, 4
513 ; BE-NEXT: srd 9, 9, 4
514 ; BE-NEXT: sld 6, 11, 6
515 ; BE-NEXT: sld 11, 3, 10
516 ; BE-NEXT: sld 10, 8, 10
517 ; BE-NEXT: srd 8, 8, 4
518 ; BE-NEXT: srd 3, 3, 4
519 ; BE-NEXT: or 7, 11, 7
520 ; BE-NEXT: or 6, 8, 6
521 ; BE-NEXT: or 8, 10, 9
522 ; BE-NEXT: std 3, 0(5)
523 ; BE-NEXT: std 8, 24(5)
524 ; BE-NEXT: std 7, 8(5)
525 ; BE-NEXT: std 6, 16(5)
528 ; LE-32BIT-LABEL: lshr_32bytes:
530 ; LE-32BIT-NEXT: stwu 1, -112(1)
531 ; LE-32BIT-NEXT: lwz 7, 0(3)
532 ; LE-32BIT-NEXT: li 6, 0
533 ; LE-32BIT-NEXT: lwz 8, 4(3)
534 ; LE-32BIT-NEXT: lwz 9, 8(3)
535 ; LE-32BIT-NEXT: lwz 10, 12(3)
536 ; LE-32BIT-NEXT: lwz 11, 16(3)
537 ; LE-32BIT-NEXT: lwz 12, 20(3)
538 ; LE-32BIT-NEXT: lwz 0, 24(3)
539 ; LE-32BIT-NEXT: lwz 3, 28(3)
540 ; LE-32BIT-NEXT: lwz 4, 28(4)
541 ; LE-32BIT-NEXT: stw 6, 48(1)
542 ; LE-32BIT-NEXT: stw 6, 44(1)
543 ; LE-32BIT-NEXT: stw 6, 40(1)
544 ; LE-32BIT-NEXT: stw 6, 36(1)
545 ; LE-32BIT-NEXT: stw 6, 32(1)
546 ; LE-32BIT-NEXT: stw 6, 28(1)
547 ; LE-32BIT-NEXT: stw 6, 24(1)
548 ; LE-32BIT-NEXT: stw 6, 20(1)
549 ; LE-32BIT-NEXT: rlwinm 6, 4, 29, 27, 31
550 ; LE-32BIT-NEXT: stw 3, 80(1)
551 ; LE-32BIT-NEXT: addi 3, 1, 52
552 ; LE-32BIT-NEXT: stw 25, 84(1) # 4-byte Folded Spill
553 ; LE-32BIT-NEXT: sub 3, 3, 6
554 ; LE-32BIT-NEXT: stw 26, 88(1) # 4-byte Folded Spill
555 ; LE-32BIT-NEXT: stw 27, 92(1) # 4-byte Folded Spill
556 ; LE-32BIT-NEXT: stw 28, 96(1) # 4-byte Folded Spill
557 ; LE-32BIT-NEXT: stw 29, 100(1) # 4-byte Folded Spill
558 ; LE-32BIT-NEXT: stw 30, 104(1) # 4-byte Folded Spill
559 ; LE-32BIT-NEXT: stw 0, 76(1)
560 ; LE-32BIT-NEXT: stw 12, 72(1)
561 ; LE-32BIT-NEXT: stw 11, 68(1)
562 ; LE-32BIT-NEXT: stw 10, 64(1)
563 ; LE-32BIT-NEXT: stw 9, 60(1)
564 ; LE-32BIT-NEXT: li 9, 7
565 ; LE-32BIT-NEXT: stw 8, 56(1)
566 ; LE-32BIT-NEXT: nand 9, 4, 9
567 ; LE-32BIT-NEXT: stw 7, 52(1)
568 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
569 ; LE-32BIT-NEXT: lwz 6, 4(3)
570 ; LE-32BIT-NEXT: subfic 30, 4, 32
571 ; LE-32BIT-NEXT: lwz 7, 8(3)
572 ; LE-32BIT-NEXT: clrlwi 9, 9, 27
573 ; LE-32BIT-NEXT: lwz 8, 12(3)
574 ; LE-32BIT-NEXT: slwi 29, 6, 1
575 ; LE-32BIT-NEXT: lwz 10, 16(3)
576 ; LE-32BIT-NEXT: srw 28, 7, 4
577 ; LE-32BIT-NEXT: lwz 11, 20(3)
578 ; LE-32BIT-NEXT: slwi 27, 8, 1
579 ; LE-32BIT-NEXT: lwz 12, 24(3)
580 ; LE-32BIT-NEXT: srw 26, 10, 4
581 ; LE-32BIT-NEXT: lwz 0, 0(3)
582 ; LE-32BIT-NEXT: srw 6, 6, 4
583 ; LE-32BIT-NEXT: lwz 3, 28(3)
584 ; LE-32BIT-NEXT: srw 25, 12, 4
585 ; LE-32BIT-NEXT: slw 12, 12, 30
586 ; LE-32BIT-NEXT: slw 7, 7, 30
587 ; LE-32BIT-NEXT: srw 3, 3, 4
588 ; LE-32BIT-NEXT: slw 10, 10, 30
589 ; LE-32BIT-NEXT: slw 30, 0, 30
590 ; LE-32BIT-NEXT: srw 8, 8, 4
591 ; LE-32BIT-NEXT: srw 0, 0, 4
592 ; LE-32BIT-NEXT: srw 4, 11, 4
593 ; LE-32BIT-NEXT: or 3, 12, 3
594 ; LE-32BIT-NEXT: stw 3, 28(5)
595 ; LE-32BIT-NEXT: or 3, 10, 4
596 ; LE-32BIT-NEXT: slwi 11, 11, 1
597 ; LE-32BIT-NEXT: stw 3, 20(5)
598 ; LE-32BIT-NEXT: or 3, 7, 8
599 ; LE-32BIT-NEXT: slw 29, 29, 9
600 ; LE-32BIT-NEXT: slw 27, 27, 9
601 ; LE-32BIT-NEXT: slw 9, 11, 9
602 ; LE-32BIT-NEXT: stw 3, 12(5)
603 ; LE-32BIT-NEXT: or 3, 30, 6
604 ; LE-32BIT-NEXT: stw 3, 4(5)
605 ; LE-32BIT-NEXT: or 3, 25, 9
606 ; LE-32BIT-NEXT: stw 3, 24(5)
607 ; LE-32BIT-NEXT: or 3, 26, 27
608 ; LE-32BIT-NEXT: stw 3, 16(5)
609 ; LE-32BIT-NEXT: or 3, 28, 29
610 ; LE-32BIT-NEXT: stw 0, 0(5)
611 ; LE-32BIT-NEXT: stw 3, 8(5)
612 ; LE-32BIT-NEXT: lwz 30, 104(1) # 4-byte Folded Reload
613 ; LE-32BIT-NEXT: lwz 29, 100(1) # 4-byte Folded Reload
614 ; LE-32BIT-NEXT: lwz 28, 96(1) # 4-byte Folded Reload
615 ; LE-32BIT-NEXT: lwz 27, 92(1) # 4-byte Folded Reload
616 ; LE-32BIT-NEXT: lwz 26, 88(1) # 4-byte Folded Reload
617 ; LE-32BIT-NEXT: lwz 25, 84(1) # 4-byte Folded Reload
618 ; LE-32BIT-NEXT: addi 1, 1, 112
620 %src = load i256, ptr %src.ptr, align 1
621 %bitOff = load i256, ptr %bitOff.ptr, align 1
622 %res = lshr i256 %src, %bitOff
623 store i256 %res, ptr %dst, align 1
626 define void @shl_32bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
627 ; LE-64BIT-LABEL: shl_32bytes:
629 ; LE-64BIT-NEXT: li 6, 16
630 ; LE-64BIT-NEXT: lwz 4, 0(4)
631 ; LE-64BIT-NEXT: xxlxor 2, 2, 2
632 ; LE-64BIT-NEXT: addi 7, 1, -64
633 ; LE-64BIT-NEXT: lxvd2x 1, 0, 3
634 ; LE-64BIT-NEXT: addi 8, 1, -32
635 ; LE-64BIT-NEXT: lxvd2x 0, 3, 6
636 ; LE-64BIT-NEXT: stxvd2x 2, 7, 6
637 ; LE-64BIT-NEXT: li 6, 48
638 ; LE-64BIT-NEXT: rlwinm 3, 4, 29, 27, 31
639 ; LE-64BIT-NEXT: neg 3, 3
640 ; LE-64BIT-NEXT: stxvd2x 0, 7, 6
641 ; LE-64BIT-NEXT: li 6, 32
642 ; LE-64BIT-NEXT: extsw 3, 3
643 ; LE-64BIT-NEXT: stxvd2x 1, 7, 6
644 ; LE-64BIT-NEXT: stxvd2x 2, 0, 7
645 ; LE-64BIT-NEXT: li 6, 7
646 ; LE-64BIT-NEXT: ldux 3, 8, 3
647 ; LE-64BIT-NEXT: ld 7, 8(8)
648 ; LE-64BIT-NEXT: nand 6, 4, 6
649 ; LE-64BIT-NEXT: ld 9, 16(8)
650 ; LE-64BIT-NEXT: clrlwi 4, 4, 29
651 ; LE-64BIT-NEXT: ld 8, 24(8)
652 ; LE-64BIT-NEXT: clrlwi 6, 6, 26
653 ; LE-64BIT-NEXT: rldicl 10, 7, 63, 1
654 ; LE-64BIT-NEXT: sld 8, 8, 4
655 ; LE-64BIT-NEXT: sld 7, 7, 4
656 ; LE-64BIT-NEXT: srd 6, 10, 6
657 ; LE-64BIT-NEXT: sld 10, 9, 4
658 ; LE-64BIT-NEXT: or 6, 10, 6
659 ; LE-64BIT-NEXT: subfic 10, 4, 64
660 ; LE-64BIT-NEXT: srd 9, 9, 10
661 ; LE-64BIT-NEXT: srd 10, 3, 10
662 ; LE-64BIT-NEXT: sld 3, 3, 4
663 ; LE-64BIT-NEXT: std 6, 16(5)
664 ; LE-64BIT-NEXT: or 7, 7, 10
665 ; LE-64BIT-NEXT: std 3, 0(5)
666 ; LE-64BIT-NEXT: or 3, 8, 9
667 ; LE-64BIT-NEXT: std 7, 8(5)
668 ; LE-64BIT-NEXT: std 3, 24(5)
671 ; BE-LABEL: shl_32bytes:
673 ; BE-NEXT: ld 6, 0(3)
674 ; BE-NEXT: ld 7, 8(3)
675 ; BE-NEXT: ld 8, 16(3)
676 ; BE-NEXT: ld 3, 24(3)
677 ; BE-NEXT: lwz 4, 28(4)
678 ; BE-NEXT: addi 9, 1, -64
680 ; BE-NEXT: std 10, 56(9)
681 ; BE-NEXT: std 10, 48(9)
682 ; BE-NEXT: std 10, 40(9)
683 ; BE-NEXT: std 10, 32(9)
684 ; BE-NEXT: std 3, 24(9)
685 ; BE-NEXT: std 8, 16(9)
686 ; BE-NEXT: std 7, 8(9)
687 ; BE-NEXT: std 6, -64(1)
688 ; BE-NEXT: rlwinm 3, 4, 29, 27, 31
689 ; BE-NEXT: ldux 6, 3, 9
691 ; BE-NEXT: nand 7, 4, 7
692 ; BE-NEXT: clrlwi 4, 4, 29
693 ; BE-NEXT: clrlwi 7, 7, 26
694 ; BE-NEXT: ld 8, 16(3)
695 ; BE-NEXT: ld 9, 8(3)
696 ; BE-NEXT: ld 3, 24(3)
697 ; BE-NEXT: subfic 10, 4, 64
698 ; BE-NEXT: sld 6, 6, 4
699 ; BE-NEXT: rldicl 11, 8, 63, 1
700 ; BE-NEXT: sld 8, 8, 4
701 ; BE-NEXT: srd 7, 11, 7
702 ; BE-NEXT: srd 11, 9, 10
703 ; BE-NEXT: sld 9, 9, 4
704 ; BE-NEXT: srd 10, 3, 10
705 ; BE-NEXT: sld 3, 3, 4
706 ; BE-NEXT: or 6, 6, 11
707 ; BE-NEXT: or 7, 9, 7
708 ; BE-NEXT: or 8, 8, 10
709 ; BE-NEXT: std 3, 24(5)
710 ; BE-NEXT: std 8, 16(5)
711 ; BE-NEXT: std 6, 0(5)
712 ; BE-NEXT: std 7, 8(5)
715 ; LE-32BIT-LABEL: shl_32bytes:
717 ; LE-32BIT-NEXT: stwu 1, -112(1)
718 ; LE-32BIT-NEXT: lwz 7, 0(3)
719 ; LE-32BIT-NEXT: li 6, 0
720 ; LE-32BIT-NEXT: lwz 8, 4(3)
721 ; LE-32BIT-NEXT: lwz 9, 8(3)
722 ; LE-32BIT-NEXT: lwz 10, 12(3)
723 ; LE-32BIT-NEXT: lwz 11, 16(3)
724 ; LE-32BIT-NEXT: lwz 12, 20(3)
725 ; LE-32BIT-NEXT: lwz 0, 24(3)
726 ; LE-32BIT-NEXT: lwz 3, 28(3)
727 ; LE-32BIT-NEXT: lwz 4, 28(4)
728 ; LE-32BIT-NEXT: stw 25, 84(1) # 4-byte Folded Spill
729 ; LE-32BIT-NEXT: stw 26, 88(1) # 4-byte Folded Spill
730 ; LE-32BIT-NEXT: stw 27, 92(1) # 4-byte Folded Spill
731 ; LE-32BIT-NEXT: stw 28, 96(1) # 4-byte Folded Spill
732 ; LE-32BIT-NEXT: stw 29, 100(1) # 4-byte Folded Spill
733 ; LE-32BIT-NEXT: stw 30, 104(1) # 4-byte Folded Spill
734 ; LE-32BIT-NEXT: stw 6, 80(1)
735 ; LE-32BIT-NEXT: stw 6, 76(1)
736 ; LE-32BIT-NEXT: stw 6, 72(1)
737 ; LE-32BIT-NEXT: stw 6, 68(1)
738 ; LE-32BIT-NEXT: stw 6, 64(1)
739 ; LE-32BIT-NEXT: stw 6, 60(1)
740 ; LE-32BIT-NEXT: stw 6, 56(1)
741 ; LE-32BIT-NEXT: stw 6, 52(1)
742 ; LE-32BIT-NEXT: rlwinm 6, 4, 29, 27, 31
743 ; LE-32BIT-NEXT: stw 3, 48(1)
744 ; LE-32BIT-NEXT: addi 3, 1, 20
745 ; LE-32BIT-NEXT: stw 0, 44(1)
746 ; LE-32BIT-NEXT: stw 12, 40(1)
747 ; LE-32BIT-NEXT: stw 11, 36(1)
748 ; LE-32BIT-NEXT: stw 10, 32(1)
749 ; LE-32BIT-NEXT: stw 9, 28(1)
750 ; LE-32BIT-NEXT: stw 8, 24(1)
751 ; LE-32BIT-NEXT: li 8, 7
752 ; LE-32BIT-NEXT: stw 7, 20(1)
753 ; LE-32BIT-NEXT: nand 8, 4, 8
754 ; LE-32BIT-NEXT: lwzux 3, 6, 3
755 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
756 ; LE-32BIT-NEXT: subfic 0, 4, 32
757 ; LE-32BIT-NEXT: clrlwi 8, 8, 27
758 ; LE-32BIT-NEXT: lwz 7, 8(6)
759 ; LE-32BIT-NEXT: slw 3, 3, 4
760 ; LE-32BIT-NEXT: lwz 9, 4(6)
761 ; LE-32BIT-NEXT: lwz 10, 16(6)
762 ; LE-32BIT-NEXT: srwi 29, 7, 1
763 ; LE-32BIT-NEXT: lwz 11, 12(6)
764 ; LE-32BIT-NEXT: slw 28, 9, 4
765 ; LE-32BIT-NEXT: lwz 12, 24(6)
766 ; LE-32BIT-NEXT: srwi 27, 10, 1
767 ; LE-32BIT-NEXT: lwz 30, 20(6)
768 ; LE-32BIT-NEXT: slw 26, 11, 4
769 ; LE-32BIT-NEXT: lwz 6, 28(6)
770 ; LE-32BIT-NEXT: srw 9, 9, 0
771 ; LE-32BIT-NEXT: slw 25, 30, 4
772 ; LE-32BIT-NEXT: srw 11, 11, 0
773 ; LE-32BIT-NEXT: slw 7, 7, 4
774 ; LE-32BIT-NEXT: srw 30, 30, 0
775 ; LE-32BIT-NEXT: slw 10, 10, 4
776 ; LE-32BIT-NEXT: srw 0, 6, 0
777 ; LE-32BIT-NEXT: slw 6, 6, 4
778 ; LE-32BIT-NEXT: slw 4, 12, 4
779 ; LE-32BIT-NEXT: srwi 12, 12, 1
780 ; LE-32BIT-NEXT: srw 29, 29, 8
781 ; LE-32BIT-NEXT: srw 27, 27, 8
782 ; LE-32BIT-NEXT: srw 8, 12, 8
783 ; LE-32BIT-NEXT: or 3, 3, 9
784 ; LE-32BIT-NEXT: or 4, 4, 0
785 ; LE-32BIT-NEXT: stw 3, 0(5)
786 ; LE-32BIT-NEXT: or 3, 25, 8
787 ; LE-32BIT-NEXT: stw 4, 24(5)
788 ; LE-32BIT-NEXT: or 4, 10, 30
789 ; LE-32BIT-NEXT: stw 3, 20(5)
790 ; LE-32BIT-NEXT: or 3, 26, 27
791 ; LE-32BIT-NEXT: stw 4, 16(5)
792 ; LE-32BIT-NEXT: or 4, 7, 11
793 ; LE-32BIT-NEXT: stw 3, 12(5)
794 ; LE-32BIT-NEXT: or 3, 28, 29
795 ; LE-32BIT-NEXT: stw 6, 28(5)
796 ; LE-32BIT-NEXT: stw 4, 8(5)
797 ; LE-32BIT-NEXT: stw 3, 4(5)
798 ; LE-32BIT-NEXT: lwz 30, 104(1) # 4-byte Folded Reload
799 ; LE-32BIT-NEXT: lwz 29, 100(1) # 4-byte Folded Reload
800 ; LE-32BIT-NEXT: lwz 28, 96(1) # 4-byte Folded Reload
801 ; LE-32BIT-NEXT: lwz 27, 92(1) # 4-byte Folded Reload
802 ; LE-32BIT-NEXT: lwz 26, 88(1) # 4-byte Folded Reload
803 ; LE-32BIT-NEXT: lwz 25, 84(1) # 4-byte Folded Reload
804 ; LE-32BIT-NEXT: addi 1, 1, 112
806 %src = load i256, ptr %src.ptr, align 1
807 %bitOff = load i256, ptr %bitOff.ptr, align 1
808 %res = shl i256 %src, %bitOff
809 store i256 %res, ptr %dst, align 1
812 define void @ashr_32bytes(ptr %src.ptr, ptr %bitOff.ptr, ptr %dst) nounwind {
813 ; LE-64BIT-LABEL: ashr_32bytes:
815 ; LE-64BIT-NEXT: lxvd2x 0, 0, 3
816 ; LE-64BIT-NEXT: ld 6, 24(3)
817 ; LE-64BIT-NEXT: lwz 4, 0(4)
818 ; LE-64BIT-NEXT: addi 7, 1, -64
819 ; LE-64BIT-NEXT: ld 3, 16(3)
820 ; LE-64BIT-NEXT: sradi 8, 6, 63
821 ; LE-64BIT-NEXT: rlwinm 9, 4, 29, 27, 31
822 ; LE-64BIT-NEXT: std 6, 24(7)
823 ; LE-64BIT-NEXT: std 3, 16(7)
824 ; LE-64BIT-NEXT: li 3, 7
825 ; LE-64BIT-NEXT: std 8, 56(7)
826 ; LE-64BIT-NEXT: std 8, 48(7)
827 ; LE-64BIT-NEXT: std 8, 40(7)
828 ; LE-64BIT-NEXT: std 8, 32(7)
829 ; LE-64BIT-NEXT: stxvd2x 0, 0, 7
830 ; LE-64BIT-NEXT: nand 3, 4, 3
831 ; LE-64BIT-NEXT: clrlwi 4, 4, 29
832 ; LE-64BIT-NEXT: ldux 6, 9, 7
833 ; LE-64BIT-NEXT: ld 7, 16(9)
834 ; LE-64BIT-NEXT: ld 8, 8(9)
835 ; LE-64BIT-NEXT: clrlwi 3, 3, 26
836 ; LE-64BIT-NEXT: ld 9, 24(9)
837 ; LE-64BIT-NEXT: srd 6, 6, 4
838 ; LE-64BIT-NEXT: sldi 10, 7, 1
839 ; LE-64BIT-NEXT: srd 11, 8, 4
840 ; LE-64BIT-NEXT: srd 7, 7, 4
841 ; LE-64BIT-NEXT: sld 3, 10, 3
842 ; LE-64BIT-NEXT: subfic 10, 4, 64
843 ; LE-64BIT-NEXT: srad 4, 9, 4
844 ; LE-64BIT-NEXT: or 3, 11, 3
845 ; LE-64BIT-NEXT: sld 11, 9, 10
846 ; LE-64BIT-NEXT: sld 8, 8, 10
847 ; LE-64BIT-NEXT: std 4, 24(5)
848 ; LE-64BIT-NEXT: or 6, 8, 6
849 ; LE-64BIT-NEXT: or 4, 11, 7
850 ; LE-64BIT-NEXT: std 3, 8(5)
851 ; LE-64BIT-NEXT: std 6, 0(5)
852 ; LE-64BIT-NEXT: std 4, 16(5)
855 ; BE-LABEL: ashr_32bytes:
857 ; BE-NEXT: ld 6, 0(3)
858 ; BE-NEXT: ld 7, 8(3)
859 ; BE-NEXT: ld 8, 16(3)
860 ; BE-NEXT: ld 3, 24(3)
861 ; BE-NEXT: lwz 4, 28(4)
862 ; BE-NEXT: addi 9, 1, -64
863 ; BE-NEXT: addi 10, 1, -32
864 ; BE-NEXT: std 3, 56(9)
865 ; BE-NEXT: std 6, 32(9)
866 ; BE-NEXT: sradi 3, 6, 63
867 ; BE-NEXT: rlwinm 6, 4, 29, 27, 31
868 ; BE-NEXT: std 3, 24(9)
869 ; BE-NEXT: std 3, 16(9)
870 ; BE-NEXT: std 3, 8(9)
871 ; BE-NEXT: std 3, -64(1)
873 ; BE-NEXT: std 8, 48(9)
874 ; BE-NEXT: std 7, 40(9)
875 ; BE-NEXT: extsw 3, 3
876 ; BE-NEXT: ldux 3, 10, 3
878 ; BE-NEXT: nand 6, 4, 6
879 ; BE-NEXT: clrlwi 4, 4, 29
880 ; BE-NEXT: clrlwi 6, 6, 26
881 ; BE-NEXT: ld 7, 8(10)
882 ; BE-NEXT: ld 8, 16(10)
883 ; BE-NEXT: ld 9, 24(10)
884 ; BE-NEXT: subfic 10, 4, 64
885 ; BE-NEXT: sldi 11, 7, 1
886 ; BE-NEXT: srd 7, 7, 4
887 ; BE-NEXT: srd 9, 9, 4
888 ; BE-NEXT: sld 6, 11, 6
889 ; BE-NEXT: sld 11, 3, 10
890 ; BE-NEXT: sld 10, 8, 10
891 ; BE-NEXT: srd 8, 8, 4
892 ; BE-NEXT: srad 3, 3, 4
893 ; BE-NEXT: or 7, 11, 7
894 ; BE-NEXT: or 6, 8, 6
895 ; BE-NEXT: or 8, 10, 9
896 ; BE-NEXT: std 3, 0(5)
897 ; BE-NEXT: std 8, 24(5)
898 ; BE-NEXT: std 7, 8(5)
899 ; BE-NEXT: std 6, 16(5)
902 ; LE-32BIT-LABEL: ashr_32bytes:
904 ; LE-32BIT-NEXT: stwu 1, -112(1)
905 ; LE-32BIT-NEXT: lwz 7, 0(3)
906 ; LE-32BIT-NEXT: addi 6, 1, 52
907 ; LE-32BIT-NEXT: lwz 8, 4(3)
908 ; LE-32BIT-NEXT: lwz 9, 8(3)
909 ; LE-32BIT-NEXT: lwz 10, 12(3)
910 ; LE-32BIT-NEXT: lwz 11, 16(3)
911 ; LE-32BIT-NEXT: lwz 12, 20(3)
912 ; LE-32BIT-NEXT: lwz 0, 24(3)
913 ; LE-32BIT-NEXT: lwz 3, 28(3)
914 ; LE-32BIT-NEXT: lwz 4, 28(4)
915 ; LE-32BIT-NEXT: stw 3, 80(1)
916 ; LE-32BIT-NEXT: srawi 3, 7, 31
917 ; LE-32BIT-NEXT: stw 7, 52(1)
918 ; LE-32BIT-NEXT: rlwinm 7, 4, 29, 27, 31
919 ; LE-32BIT-NEXT: stw 25, 84(1) # 4-byte Folded Spill
920 ; LE-32BIT-NEXT: stw 26, 88(1) # 4-byte Folded Spill
921 ; LE-32BIT-NEXT: stw 27, 92(1) # 4-byte Folded Spill
922 ; LE-32BIT-NEXT: stw 28, 96(1) # 4-byte Folded Spill
923 ; LE-32BIT-NEXT: stw 29, 100(1) # 4-byte Folded Spill
924 ; LE-32BIT-NEXT: stw 30, 104(1) # 4-byte Folded Spill
925 ; LE-32BIT-NEXT: stw 0, 76(1)
926 ; LE-32BIT-NEXT: stw 12, 72(1)
927 ; LE-32BIT-NEXT: stw 11, 68(1)
928 ; LE-32BIT-NEXT: stw 10, 64(1)
929 ; LE-32BIT-NEXT: stw 9, 60(1)
930 ; LE-32BIT-NEXT: li 9, 7
931 ; LE-32BIT-NEXT: stw 8, 56(1)
932 ; LE-32BIT-NEXT: nand 9, 4, 9
933 ; LE-32BIT-NEXT: stw 3, 48(1)
934 ; LE-32BIT-NEXT: clrlwi 4, 4, 29
935 ; LE-32BIT-NEXT: stw 3, 44(1)
936 ; LE-32BIT-NEXT: subfic 30, 4, 32
937 ; LE-32BIT-NEXT: stw 3, 40(1)
938 ; LE-32BIT-NEXT: clrlwi 9, 9, 27
939 ; LE-32BIT-NEXT: stw 3, 36(1)
940 ; LE-32BIT-NEXT: stw 3, 32(1)
941 ; LE-32BIT-NEXT: stw 3, 28(1)
942 ; LE-32BIT-NEXT: stw 3, 24(1)
943 ; LE-32BIT-NEXT: stw 3, 20(1)
944 ; LE-32BIT-NEXT: sub 3, 6, 7
945 ; LE-32BIT-NEXT: lwz 6, 4(3)
946 ; LE-32BIT-NEXT: lwz 7, 8(3)
947 ; LE-32BIT-NEXT: lwz 8, 12(3)
948 ; LE-32BIT-NEXT: slwi 29, 6, 1
949 ; LE-32BIT-NEXT: lwz 10, 16(3)
950 ; LE-32BIT-NEXT: srw 28, 7, 4
951 ; LE-32BIT-NEXT: lwz 11, 20(3)
952 ; LE-32BIT-NEXT: slwi 27, 8, 1
953 ; LE-32BIT-NEXT: lwz 12, 24(3)
954 ; LE-32BIT-NEXT: srw 26, 10, 4
955 ; LE-32BIT-NEXT: lwz 0, 0(3)
956 ; LE-32BIT-NEXT: srw 6, 6, 4
957 ; LE-32BIT-NEXT: lwz 3, 28(3)
958 ; LE-32BIT-NEXT: srw 25, 12, 4
959 ; LE-32BIT-NEXT: slw 12, 12, 30
960 ; LE-32BIT-NEXT: slw 7, 7, 30
961 ; LE-32BIT-NEXT: srw 3, 3, 4
962 ; LE-32BIT-NEXT: slw 10, 10, 30
963 ; LE-32BIT-NEXT: slw 30, 0, 30
964 ; LE-32BIT-NEXT: srw 8, 8, 4
965 ; LE-32BIT-NEXT: sraw 0, 0, 4
966 ; LE-32BIT-NEXT: srw 4, 11, 4
967 ; LE-32BIT-NEXT: or 3, 12, 3
968 ; LE-32BIT-NEXT: stw 3, 28(5)
969 ; LE-32BIT-NEXT: or 3, 10, 4
970 ; LE-32BIT-NEXT: slwi 11, 11, 1
971 ; LE-32BIT-NEXT: stw 3, 20(5)
972 ; LE-32BIT-NEXT: or 3, 7, 8
973 ; LE-32BIT-NEXT: slw 29, 29, 9
974 ; LE-32BIT-NEXT: slw 27, 27, 9
975 ; LE-32BIT-NEXT: slw 9, 11, 9
976 ; LE-32BIT-NEXT: stw 3, 12(5)
977 ; LE-32BIT-NEXT: or 3, 30, 6
978 ; LE-32BIT-NEXT: stw 3, 4(5)
979 ; LE-32BIT-NEXT: or 3, 25, 9
980 ; LE-32BIT-NEXT: stw 3, 24(5)
981 ; LE-32BIT-NEXT: or 3, 26, 27
982 ; LE-32BIT-NEXT: stw 3, 16(5)
983 ; LE-32BIT-NEXT: or 3, 28, 29
984 ; LE-32BIT-NEXT: stw 0, 0(5)
985 ; LE-32BIT-NEXT: stw 3, 8(5)
986 ; LE-32BIT-NEXT: lwz 30, 104(1) # 4-byte Folded Reload
987 ; LE-32BIT-NEXT: lwz 29, 100(1) # 4-byte Folded Reload
988 ; LE-32BIT-NEXT: lwz 28, 96(1) # 4-byte Folded Reload
989 ; LE-32BIT-NEXT: lwz 27, 92(1) # 4-byte Folded Reload
990 ; LE-32BIT-NEXT: lwz 26, 88(1) # 4-byte Folded Reload
991 ; LE-32BIT-NEXT: lwz 25, 84(1) # 4-byte Folded Reload
992 ; LE-32BIT-NEXT: addi 1, 1, 112
994 %src = load i256, ptr %src.ptr, align 1
995 %bitOff = load i256, ptr %bitOff.ptr, align 1
996 %res = ashr i256 %src, %bitOff
997 store i256 %res, ptr %dst, align 1
1000 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: