1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefixes=ALL,i686
3 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=ALL,x86_64
9 define void @test_lshr_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {
10 ; i686-LABEL: test_lshr_i128:
11 ; i686: # %bb.0: # %entry
12 ; i686-NEXT: pushl %ebp
13 ; i686-NEXT: pushl %ebx
14 ; i686-NEXT: pushl %edi
15 ; i686-NEXT: pushl %esi
16 ; i686-NEXT: subl $32, %esp
17 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
18 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
19 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
20 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
21 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
22 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
23 ; i686-NEXT: movl %edi, {{[0-9]+}}(%esp)
24 ; i686-NEXT: movl %esi, {{[0-9]+}}(%esp)
25 ; i686-NEXT: movl %eax, (%esp)
26 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
27 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
28 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
29 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
30 ; i686-NEXT: movl %ecx, %eax
31 ; i686-NEXT: andb $7, %al
32 ; i686-NEXT: shrb $3, %cl
33 ; i686-NEXT: andb $15, %cl
34 ; i686-NEXT: movzbl %cl, %ebp
35 ; i686-NEXT: movl 4(%esp,%ebp), %edx
36 ; i686-NEXT: movl %edx, %esi
37 ; i686-NEXT: movl %eax, %ecx
38 ; i686-NEXT: shrl %cl, %esi
40 ; i686-NEXT: movl 8(%esp,%ebp), %ebx
41 ; i686-NEXT: leal (%ebx,%ebx), %edi
42 ; i686-NEXT: shll %cl, %edi
43 ; i686-NEXT: orl %esi, %edi
44 ; i686-NEXT: movl (%esp,%ebp), %esi
45 ; i686-NEXT: movl 12(%esp,%ebp), %ebp
46 ; i686-NEXT: movl %eax, %ecx
47 ; i686-NEXT: shrdl %cl, %ebp, %ebx
48 ; i686-NEXT: shrdl %cl, %edx, %esi
49 ; i686-NEXT: shrl %cl, %ebp
50 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
51 ; i686-NEXT: movl %ebp, 12(%eax)
52 ; i686-NEXT: movl %ebx, 8(%eax)
53 ; i686-NEXT: movl %esi, (%eax)
54 ; i686-NEXT: movl %edi, 4(%eax)
55 ; i686-NEXT: addl $32, %esp
56 ; i686-NEXT: popl %esi
57 ; i686-NEXT: popl %edi
58 ; i686-NEXT: popl %ebx
59 ; i686-NEXT: popl %ebp
62 ; x86_64-LABEL: test_lshr_i128:
63 ; x86_64: # %bb.0: # %entry
64 ; x86_64-NEXT: movq %rdx, %rcx
65 ; x86_64-NEXT: shrdq %cl, %rsi, %rdi
66 ; x86_64-NEXT: shrq %cl, %rsi
67 ; x86_64-NEXT: xorl %eax, %eax
68 ; x86_64-NEXT: testb $64, %cl
69 ; x86_64-NEXT: cmovneq %rsi, %rdi
70 ; x86_64-NEXT: cmoveq %rsi, %rax
71 ; x86_64-NEXT: movq %rax, 8(%r8)
72 ; x86_64-NEXT: movq %rdi, (%r8)
76 store i128 %0, ptr %r, align 16
80 define void @test_ashr_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {
81 ; i686-LABEL: test_ashr_i128:
82 ; i686: # %bb.0: # %entry
83 ; i686-NEXT: pushl %ebp
84 ; i686-NEXT: pushl %ebx
85 ; i686-NEXT: pushl %edi
86 ; i686-NEXT: pushl %esi
87 ; i686-NEXT: subl $32, %esp
88 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
89 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
90 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
91 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
92 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
93 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
94 ; i686-NEXT: movl %edi, {{[0-9]+}}(%esp)
95 ; i686-NEXT: movl %esi, {{[0-9]+}}(%esp)
96 ; i686-NEXT: movl %eax, (%esp)
97 ; i686-NEXT: sarl $31, %ebx
98 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
99 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
100 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
101 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
102 ; i686-NEXT: movl %ecx, %eax
103 ; i686-NEXT: andb $7, %al
104 ; i686-NEXT: shrb $3, %cl
105 ; i686-NEXT: andb $15, %cl
106 ; i686-NEXT: movzbl %cl, %ebp
107 ; i686-NEXT: movl 4(%esp,%ebp), %edx
108 ; i686-NEXT: movl %edx, %esi
109 ; i686-NEXT: movl %eax, %ecx
110 ; i686-NEXT: shrl %cl, %esi
111 ; i686-NEXT: notb %cl
112 ; i686-NEXT: movl 8(%esp,%ebp), %ebx
113 ; i686-NEXT: leal (%ebx,%ebx), %edi
114 ; i686-NEXT: shll %cl, %edi
115 ; i686-NEXT: orl %esi, %edi
116 ; i686-NEXT: movl (%esp,%ebp), %esi
117 ; i686-NEXT: movl 12(%esp,%ebp), %ebp
118 ; i686-NEXT: movl %eax, %ecx
119 ; i686-NEXT: shrdl %cl, %ebp, %ebx
120 ; i686-NEXT: shrdl %cl, %edx, %esi
121 ; i686-NEXT: sarl %cl, %ebp
122 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
123 ; i686-NEXT: movl %ebp, 12(%eax)
124 ; i686-NEXT: movl %ebx, 8(%eax)
125 ; i686-NEXT: movl %esi, (%eax)
126 ; i686-NEXT: movl %edi, 4(%eax)
127 ; i686-NEXT: addl $32, %esp
128 ; i686-NEXT: popl %esi
129 ; i686-NEXT: popl %edi
130 ; i686-NEXT: popl %ebx
131 ; i686-NEXT: popl %ebp
134 ; x86_64-LABEL: test_ashr_i128:
135 ; x86_64: # %bb.0: # %entry
136 ; x86_64-NEXT: movq %rdx, %rcx
137 ; x86_64-NEXT: shrdq %cl, %rsi, %rdi
138 ; x86_64-NEXT: movq %rsi, %rax
139 ; x86_64-NEXT: sarq %cl, %rax
140 ; x86_64-NEXT: sarq $63, %rsi
141 ; x86_64-NEXT: testb $64, %cl
142 ; x86_64-NEXT: cmovneq %rax, %rdi
143 ; x86_64-NEXT: cmoveq %rax, %rsi
144 ; x86_64-NEXT: movq %rsi, 8(%r8)
145 ; x86_64-NEXT: movq %rdi, (%r8)
148 %0 = ashr i128 %x, %a
149 store i128 %0, ptr %r, align 16
153 define void @test_shl_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {
154 ; i686-LABEL: test_shl_i128:
155 ; i686: # %bb.0: # %entry
156 ; i686-NEXT: pushl %ebp
157 ; i686-NEXT: pushl %ebx
158 ; i686-NEXT: pushl %edi
159 ; i686-NEXT: pushl %esi
160 ; i686-NEXT: subl $32, %esp
161 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
162 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
163 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edx
164 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
165 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
166 ; i686-NEXT: movl %edi, {{[0-9]+}}(%esp)
167 ; i686-NEXT: movl %esi, {{[0-9]+}}(%esp)
168 ; i686-NEXT: movl %edx, {{[0-9]+}}(%esp)
169 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
170 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
171 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
172 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
173 ; i686-NEXT: movl $0, (%esp)
174 ; i686-NEXT: movl %ecx, %eax
175 ; i686-NEXT: andb $7, %al
176 ; i686-NEXT: shrb $3, %cl
177 ; i686-NEXT: andb $15, %cl
178 ; i686-NEXT: negb %cl
179 ; i686-NEXT: movsbl %cl, %ebp
180 ; i686-NEXT: movl 24(%esp,%ebp), %ebx
181 ; i686-NEXT: movl %ebx, %edx
182 ; i686-NEXT: movl %eax, %ecx
183 ; i686-NEXT: shll %cl, %edx
184 ; i686-NEXT: notb %cl
185 ; i686-NEXT: movl 20(%esp,%ebp), %edi
186 ; i686-NEXT: movl %edi, %esi
187 ; i686-NEXT: shrl %esi
188 ; i686-NEXT: shrl %cl, %esi
189 ; i686-NEXT: orl %edx, %esi
190 ; i686-NEXT: movl 16(%esp,%ebp), %edx
191 ; i686-NEXT: movl 28(%esp,%ebp), %ebp
192 ; i686-NEXT: movl %eax, %ecx
193 ; i686-NEXT: shldl %cl, %ebx, %ebp
194 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
195 ; i686-NEXT: movl %ebp, 12(%ecx)
196 ; i686-NEXT: movl %edx, %ebx
197 ; i686-NEXT: movl %eax, %ecx
198 ; i686-NEXT: shll %cl, %ebx
199 ; i686-NEXT: shldl %cl, %edx, %edi
200 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
201 ; i686-NEXT: movl %edi, 4(%eax)
202 ; i686-NEXT: movl %ebx, (%eax)
203 ; i686-NEXT: movl %esi, 8(%eax)
204 ; i686-NEXT: addl $32, %esp
205 ; i686-NEXT: popl %esi
206 ; i686-NEXT: popl %edi
207 ; i686-NEXT: popl %ebx
208 ; i686-NEXT: popl %ebp
211 ; x86_64-LABEL: test_shl_i128:
212 ; x86_64: # %bb.0: # %entry
213 ; x86_64-NEXT: movq %rdx, %rcx
214 ; x86_64-NEXT: shldq %cl, %rdi, %rsi
215 ; x86_64-NEXT: shlq %cl, %rdi
216 ; x86_64-NEXT: xorl %eax, %eax
217 ; x86_64-NEXT: testb $64, %cl
218 ; x86_64-NEXT: cmovneq %rdi, %rsi
219 ; x86_64-NEXT: cmoveq %rdi, %rax
220 ; x86_64-NEXT: movq %rsi, 8(%r8)
221 ; x86_64-NEXT: movq %rax, (%r8)
225 store i128 %0, ptr %r, align 16
229 define void @test_lshr_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {
230 ; ALL-LABEL: test_lshr_i128_outofrange:
231 ; ALL: # %bb.0: # %entry
232 ; ALL-NEXT: ret{{[l|q]}}
234 %0 = lshr i128 %x, -1
235 store i128 %0, ptr %r, align 16
239 define void @test_ashr_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {
240 ; ALL-LABEL: test_ashr_i128_outofrange:
241 ; ALL: # %bb.0: # %entry
242 ; ALL-NEXT: ret{{[l|q]}}
244 %0 = ashr i128 %x, -1
245 store i128 %0, ptr %r, align 16
249 define void @test_shl_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {
250 ; ALL-LABEL: test_shl_i128_outofrange:
251 ; ALL: # %bb.0: # %entry
252 ; ALL-NEXT: ret{{[l|q]}}
255 store i128 %0, ptr %r, align 16
263 define void @test_lshr_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {
264 ; i686-LABEL: test_lshr_v2i128:
265 ; i686: # %bb.0: # %entry
266 ; i686-NEXT: pushl %ebp
267 ; i686-NEXT: pushl %ebx
268 ; i686-NEXT: pushl %edi
269 ; i686-NEXT: pushl %esi
270 ; i686-NEXT: subl $100, %esp
271 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
272 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
273 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
274 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
275 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edx
276 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
277 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
278 ; i686-NEXT: movl %ebp, {{[0-9]+}}(%esp)
279 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
280 ; i686-NEXT: movl %ebp, {{[0-9]+}}(%esp)
281 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
282 ; i686-NEXT: movl %ebp, {{[0-9]+}}(%esp)
283 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
284 ; i686-NEXT: movl %ebp, {{[0-9]+}}(%esp)
285 ; i686-NEXT: movl %edi, {{[0-9]+}}(%esp)
286 ; i686-NEXT: movl %edx, {{[0-9]+}}(%esp)
287 ; i686-NEXT: movl %ecx, {{[0-9]+}}(%esp)
288 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
289 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
290 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
291 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
292 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
293 ; i686-NEXT: movl %esi, %ecx
294 ; i686-NEXT: andl $7, %ecx
295 ; i686-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
296 ; i686-NEXT: shrl $3, %esi
297 ; i686-NEXT: andl $15, %esi
298 ; i686-NEXT: movl 40(%esp,%esi), %eax
299 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
300 ; i686-NEXT: shrl %cl, %eax
301 ; i686-NEXT: notl %ecx
302 ; i686-NEXT: movl 44(%esp,%esi), %edx
303 ; i686-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
304 ; i686-NEXT: addl %edx, %edx
305 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
306 ; i686-NEXT: shll %cl, %edx
307 ; i686-NEXT: orl %eax, %edx
308 ; i686-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
309 ; i686-NEXT: movl 36(%esp,%esi), %eax
310 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
311 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
312 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
313 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
314 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
315 ; i686-NEXT: movl %ebx, %edx
316 ; i686-NEXT: andl $7, %edx
317 ; i686-NEXT: shrl $3, %ebx
318 ; i686-NEXT: andl $15, %ebx
319 ; i686-NEXT: movl 72(%esp,%ebx), %ebp
320 ; i686-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
321 ; i686-NEXT: movl %edx, %ecx
322 ; i686-NEXT: shrl %cl, %ebp
323 ; i686-NEXT: movl %edx, %ecx
324 ; i686-NEXT: notl %ecx
325 ; i686-NEXT: movl 76(%esp,%ebx), %eax
326 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
327 ; i686-NEXT: leal (%eax,%eax), %edi
328 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
329 ; i686-NEXT: shll %cl, %edi
330 ; i686-NEXT: orl %ebp, %edi
331 ; i686-NEXT: movl 48(%esp,%esi), %esi
332 ; i686-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
333 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
334 ; i686-NEXT: movl %eax, %ecx
335 ; i686-NEXT: shrdl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
336 ; i686-NEXT: movl 68(%esp,%ebx), %ecx
337 ; i686-NEXT: movl %ecx, (%esp) # 4-byte Spill
338 ; i686-NEXT: movl 80(%esp,%ebx), %esi
339 ; i686-NEXT: movl %edx, %ecx
340 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
341 ; i686-NEXT: shrdl %cl, %esi, %ebx
342 ; i686-NEXT: movl %eax, %ecx
343 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
344 ; i686-NEXT: shrdl %cl, %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
345 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
346 ; i686-NEXT: shrl %cl, %ebp
347 ; i686-NEXT: movl %edx, %ecx
348 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
349 ; i686-NEXT: shrdl %cl, %eax, (%esp) # 4-byte Folded Spill
350 ; i686-NEXT: movl %edx, %ecx
351 ; i686-NEXT: shrl %cl, %esi
352 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
353 ; i686-NEXT: movl %esi, 28(%ecx)
354 ; i686-NEXT: movl %ebx, 24(%ecx)
355 ; i686-NEXT: movl (%esp), %eax # 4-byte Reload
356 ; i686-NEXT: movl %eax, 16(%ecx)
357 ; i686-NEXT: movl %ebp, 12(%ecx)
358 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
359 ; i686-NEXT: movl %edx, 8(%ecx)
360 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
361 ; i686-NEXT: movl %edx, (%ecx)
362 ; i686-NEXT: movl %edi, 20(%ecx)
363 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
364 ; i686-NEXT: movl %eax, 4(%ecx)
365 ; i686-NEXT: addl $100, %esp
366 ; i686-NEXT: popl %esi
367 ; i686-NEXT: popl %edi
368 ; i686-NEXT: popl %ebx
369 ; i686-NEXT: popl %ebp
372 ; x86_64-LABEL: test_lshr_v2i128:
373 ; x86_64: # %bb.0: # %entry
374 ; x86_64-NEXT: movq %rcx, %rax
375 ; x86_64-NEXT: movq {{[0-9]+}}(%rsp), %r10
376 ; x86_64-NEXT: movzbl {{[0-9]+}}(%rsp), %r9d
377 ; x86_64-NEXT: movl %r9d, %ecx
378 ; x86_64-NEXT: shrdq %cl, %rax, %rdx
379 ; x86_64-NEXT: movl %r8d, %ecx
380 ; x86_64-NEXT: shrdq %cl, %rsi, %rdi
381 ; x86_64-NEXT: shrq %cl, %rsi
382 ; x86_64-NEXT: xorl %r11d, %r11d
383 ; x86_64-NEXT: testb $64, %r8b
384 ; x86_64-NEXT: cmovneq %rsi, %rdi
385 ; x86_64-NEXT: cmovneq %r11, %rsi
386 ; x86_64-NEXT: movl %r9d, %ecx
387 ; x86_64-NEXT: shrq %cl, %rax
388 ; x86_64-NEXT: testb $64, %r9b
389 ; x86_64-NEXT: cmovneq %rax, %rdx
390 ; x86_64-NEXT: cmovneq %r11, %rax
391 ; x86_64-NEXT: movq %rax, 24(%r10)
392 ; x86_64-NEXT: movq %rdx, 16(%r10)
393 ; x86_64-NEXT: movq %rsi, 8(%r10)
394 ; x86_64-NEXT: movq %rdi, (%r10)
397 %0 = lshr <2 x i128> %x, %a
398 store <2 x i128> %0, ptr %r, align 16
402 define void @test_ashr_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {
403 ; i686-LABEL: test_ashr_v2i128:
404 ; i686: # %bb.0: # %entry
405 ; i686-NEXT: pushl %ebp
406 ; i686-NEXT: pushl %ebx
407 ; i686-NEXT: pushl %edi
408 ; i686-NEXT: pushl %esi
409 ; i686-NEXT: subl $92, %esp
410 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
411 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
412 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
413 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edx
414 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
415 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
416 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
417 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
418 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
419 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
420 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
421 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
422 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
423 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
424 ; i686-NEXT: sarl $31, %ebx
425 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
426 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
427 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
428 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
429 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
430 ; i686-NEXT: movl %esi, {{[0-9]+}}(%esp)
431 ; i686-NEXT: movl %edx, {{[0-9]+}}(%esp)
432 ; i686-NEXT: movl %ecx, {{[0-9]+}}(%esp)
433 ; i686-NEXT: sarl $31, %eax
434 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
435 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
436 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
437 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
438 ; i686-NEXT: movl %edi, %ebx
439 ; i686-NEXT: andl $7, %ebx
440 ; i686-NEXT: shrl $3, %edi
441 ; i686-NEXT: andl $15, %edi
442 ; i686-NEXT: movl 32(%esp,%edi), %eax
443 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
444 ; i686-NEXT: movl %ebx, %ecx
445 ; i686-NEXT: shrl %cl, %eax
446 ; i686-NEXT: movl %ebx, %ecx
447 ; i686-NEXT: notl %ecx
448 ; i686-NEXT: movl 36(%esp,%edi), %edx
449 ; i686-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
450 ; i686-NEXT: addl %edx, %edx
451 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
452 ; i686-NEXT: shll %cl, %edx
453 ; i686-NEXT: orl %eax, %edx
454 ; i686-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
455 ; i686-NEXT: movl %ebp, %eax
456 ; i686-NEXT: movl %ebp, %edx
457 ; i686-NEXT: andl $7, %edx
458 ; i686-NEXT: shrl $3, %eax
459 ; i686-NEXT: andl $15, %eax
460 ; i686-NEXT: movl 64(%esp,%eax), %ebp
461 ; i686-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
462 ; i686-NEXT: movl %eax, (%esp) # 4-byte Spill
463 ; i686-NEXT: movl %edx, %ecx
464 ; i686-NEXT: shrl %cl, %ebp
465 ; i686-NEXT: movl %edx, %ecx
466 ; i686-NEXT: notl %ecx
467 ; i686-NEXT: movl 68(%esp,%eax), %esi
468 ; i686-NEXT: leal (%esi,%esi), %eax
469 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
470 ; i686-NEXT: shll %cl, %eax
471 ; i686-NEXT: orl %ebp, %eax
472 ; i686-NEXT: movl 28(%esp,%edi), %ecx
473 ; i686-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
474 ; i686-NEXT: movl 40(%esp,%edi), %edi
475 ; i686-NEXT: movl %ebx, %ecx
476 ; i686-NEXT: shrdl %cl, %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
477 ; i686-NEXT: movl (%esp), %ecx # 4-byte Reload
478 ; i686-NEXT: movl 60(%esp,%ecx), %ebp
479 ; i686-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
480 ; i686-NEXT: movl 72(%esp,%ecx), %ebp
481 ; i686-NEXT: movl %edx, %ecx
482 ; i686-NEXT: shrdl %cl, %ebp, %esi
483 ; i686-NEXT: movl %esi, (%esp) # 4-byte Spill
484 ; i686-NEXT: movl %ebx, %ecx
485 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
486 ; i686-NEXT: shrdl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
487 ; i686-NEXT: sarl %cl, %edi
488 ; i686-NEXT: movl %edx, %ecx
489 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
490 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
491 ; i686-NEXT: shrdl %cl, %esi, %ebx
492 ; i686-NEXT: movl %edx, %ecx
493 ; i686-NEXT: sarl %cl, %ebp
494 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
495 ; i686-NEXT: movl %ebp, 28(%ecx)
496 ; i686-NEXT: movl (%esp), %edx # 4-byte Reload
497 ; i686-NEXT: movl %edx, 24(%ecx)
498 ; i686-NEXT: movl %ebx, 16(%ecx)
499 ; i686-NEXT: movl %edi, 12(%ecx)
500 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
501 ; i686-NEXT: movl %edx, 8(%ecx)
502 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
503 ; i686-NEXT: movl %edx, (%ecx)
504 ; i686-NEXT: movl %eax, 20(%ecx)
505 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
506 ; i686-NEXT: movl %eax, 4(%ecx)
507 ; i686-NEXT: addl $92, %esp
508 ; i686-NEXT: popl %esi
509 ; i686-NEXT: popl %edi
510 ; i686-NEXT: popl %ebx
511 ; i686-NEXT: popl %ebp
514 ; x86_64-LABEL: test_ashr_v2i128:
515 ; x86_64: # %bb.0: # %entry
516 ; x86_64-NEXT: movq %rcx, %rax
517 ; x86_64-NEXT: movq {{[0-9]+}}(%rsp), %r10
518 ; x86_64-NEXT: movzbl {{[0-9]+}}(%rsp), %r9d
519 ; x86_64-NEXT: movl %r9d, %ecx
520 ; x86_64-NEXT: shrdq %cl, %rax, %rdx
521 ; x86_64-NEXT: movl %r8d, %ecx
522 ; x86_64-NEXT: shrdq %cl, %rsi, %rdi
523 ; x86_64-NEXT: movq %rsi, %r11
524 ; x86_64-NEXT: sarq %cl, %r11
525 ; x86_64-NEXT: sarq $63, %rsi
526 ; x86_64-NEXT: testb $64, %r8b
527 ; x86_64-NEXT: cmovneq %r11, %rdi
528 ; x86_64-NEXT: cmoveq %r11, %rsi
529 ; x86_64-NEXT: movq %rax, %r8
530 ; x86_64-NEXT: movl %r9d, %ecx
531 ; x86_64-NEXT: sarq %cl, %r8
532 ; x86_64-NEXT: sarq $63, %rax
533 ; x86_64-NEXT: testb $64, %r9b
534 ; x86_64-NEXT: cmovneq %r8, %rdx
535 ; x86_64-NEXT: cmoveq %r8, %rax
536 ; x86_64-NEXT: movq %rax, 24(%r10)
537 ; x86_64-NEXT: movq %rdx, 16(%r10)
538 ; x86_64-NEXT: movq %rsi, 8(%r10)
539 ; x86_64-NEXT: movq %rdi, (%r10)
542 %0 = ashr <2 x i128> %x, %a
543 store <2 x i128> %0, ptr %r, align 16
547 define void @test_shl_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {
548 ; i686-LABEL: test_shl_v2i128:
549 ; i686: # %bb.0: # %entry
550 ; i686-NEXT: pushl %ebp
551 ; i686-NEXT: pushl %ebx
552 ; i686-NEXT: pushl %edi
553 ; i686-NEXT: pushl %esi
554 ; i686-NEXT: subl $100, %esp
555 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebp
556 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
557 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
558 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edx
559 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
560 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edi
561 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
562 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
563 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
564 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
565 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
566 ; i686-NEXT: movl %ebx, {{[0-9]+}}(%esp)
567 ; i686-NEXT: movl %edi, {{[0-9]+}}(%esp)
568 ; i686-NEXT: movl %esi, {{[0-9]+}}(%esp)
569 ; i686-NEXT: movl %edx, {{[0-9]+}}(%esp)
570 ; i686-NEXT: movl %ecx, {{[0-9]+}}(%esp)
571 ; i686-NEXT: movl %eax, {{[0-9]+}}(%esp)
572 ; i686-NEXT: movl %ebp, %ecx
573 ; i686-NEXT: shrl $3, %ebp
574 ; i686-NEXT: andl $15, %ebp
575 ; i686-NEXT: leal {{[0-9]+}}(%esp), %eax
576 ; i686-NEXT: subl %ebp, %eax
577 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
578 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
579 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
580 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
581 ; i686-NEXT: movl 8(%eax), %edx
582 ; i686-NEXT: movl %edx, (%esp) # 4-byte Spill
583 ; i686-NEXT: andl $7, %ecx
584 ; i686-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
585 ; i686-NEXT: shll %cl, %edx
586 ; i686-NEXT: movl 4(%eax), %esi
587 ; i686-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
588 ; i686-NEXT: shrl %esi
589 ; i686-NEXT: notl %ecx
590 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
591 ; i686-NEXT: shrl %cl, %esi
592 ; i686-NEXT: orl %edx, %esi
593 ; i686-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
594 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ebx
595 ; i686-NEXT: movl (%eax), %eax
596 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
597 ; i686-NEXT: movl %ebx, %edx
598 ; i686-NEXT: shrl $3, %edx
599 ; i686-NEXT: andl $15, %edx
600 ; i686-NEXT: leal {{[0-9]+}}(%esp), %esi
601 ; i686-NEXT: subl %edx, %esi
602 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
603 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
604 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
605 ; i686-NEXT: movl $0, {{[0-9]+}}(%esp)
606 ; i686-NEXT: andl $7, %ebx
607 ; i686-NEXT: movl 8(%esi), %edi
608 ; i686-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
609 ; i686-NEXT: movl %ebx, %ecx
610 ; i686-NEXT: shll %cl, %edi
611 ; i686-NEXT: movl 4(%esi), %eax
612 ; i686-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
613 ; i686-NEXT: shrl %eax
614 ; i686-NEXT: movl %ebx, %ecx
615 ; i686-NEXT: notl %ecx
616 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
617 ; i686-NEXT: shrl %cl, %eax
618 ; i686-NEXT: orl %edi, %eax
619 ; i686-NEXT: movl (%esi), %ecx
620 ; i686-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
621 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
622 ; i686-NEXT: movl %esi, %edi
623 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
624 ; i686-NEXT: shll %cl, %edi
625 ; i686-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
626 ; i686-NEXT: movl %ecx, %edi
627 ; i686-NEXT: shldl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
628 ; i686-NEXT: negl %ebp
629 ; i686-NEXT: movl 64(%esp,%ebp), %esi
630 ; i686-NEXT: movl %edi, %ecx
631 ; i686-NEXT: # kill: def $cl killed $cl killed $ecx
632 ; i686-NEXT: movl (%esp), %edi # 4-byte Reload
633 ; i686-NEXT: shldl %cl, %edi, %esi
634 ; i686-NEXT: movl %esi, (%esp) # 4-byte Spill
635 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
636 ; i686-NEXT: movl %esi, %edi
637 ; i686-NEXT: movl %ebx, %ecx
638 ; i686-NEXT: shll %cl, %edi
639 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
640 ; i686-NEXT: shldl %cl, %esi, %ebp
641 ; i686-NEXT: negl %edx
642 ; i686-NEXT: movl 96(%esp,%edx), %edx
643 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
644 ; i686-NEXT: shldl %cl, %ebx, %edx
645 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
646 ; i686-NEXT: movl %edx, 28(%ecx)
647 ; i686-NEXT: movl %ebp, 20(%ecx)
648 ; i686-NEXT: movl %edi, 16(%ecx)
649 ; i686-NEXT: movl (%esp), %edx # 4-byte Reload
650 ; i686-NEXT: movl %edx, 12(%ecx)
651 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
652 ; i686-NEXT: movl %edx, 4(%ecx)
653 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
654 ; i686-NEXT: movl %edx, (%ecx)
655 ; i686-NEXT: movl %eax, 24(%ecx)
656 ; i686-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
657 ; i686-NEXT: movl %eax, 8(%ecx)
658 ; i686-NEXT: addl $100, %esp
659 ; i686-NEXT: popl %esi
660 ; i686-NEXT: popl %edi
661 ; i686-NEXT: popl %ebx
662 ; i686-NEXT: popl %ebp
665 ; x86_64-LABEL: test_shl_v2i128:
666 ; x86_64: # %bb.0: # %entry
667 ; x86_64-NEXT: movq %rcx, %rax
668 ; x86_64-NEXT: movq {{[0-9]+}}(%rsp), %r10
669 ; x86_64-NEXT: movzbl {{[0-9]+}}(%rsp), %r9d
670 ; x86_64-NEXT: movl %r9d, %ecx
671 ; x86_64-NEXT: shldq %cl, %rdx, %rax
672 ; x86_64-NEXT: movl %r8d, %ecx
673 ; x86_64-NEXT: shldq %cl, %rdi, %rsi
674 ; x86_64-NEXT: shlq %cl, %rdi
675 ; x86_64-NEXT: xorl %r11d, %r11d
676 ; x86_64-NEXT: testb $64, %r8b
677 ; x86_64-NEXT: cmovneq %rdi, %rsi
678 ; x86_64-NEXT: cmovneq %r11, %rdi
679 ; x86_64-NEXT: movl %r9d, %ecx
680 ; x86_64-NEXT: shlq %cl, %rdx
681 ; x86_64-NEXT: testb $64, %r9b
682 ; x86_64-NEXT: cmovneq %rdx, %rax
683 ; x86_64-NEXT: cmovneq %r11, %rdx
684 ; x86_64-NEXT: movq %rax, 24(%r10)
685 ; x86_64-NEXT: movq %rdx, 16(%r10)
686 ; x86_64-NEXT: movq %rsi, 8(%r10)
687 ; x86_64-NEXT: movq %rdi, (%r10)
690 %0 = shl <2 x i128> %x, %a
691 store <2 x i128> %0, ptr %r, align 16
695 define void @test_lshr_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {
696 ; ALL-LABEL: test_lshr_v2i128_outofrange:
697 ; ALL: # %bb.0: # %entry
698 ; ALL-NEXT: ret{{[l|q]}}
700 %0 = lshr <2 x i128> %x, <i128 -1, i128 -1>
701 store <2 x i128> %0, ptr %r, align 16
705 define void @test_ashr_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {
706 ; ALL-LABEL: test_ashr_v2i128_outofrange:
707 ; ALL: # %bb.0: # %entry
708 ; ALL-NEXT: ret{{[l|q]}}
710 %0 = ashr <2 x i128> %x, <i128 -1, i128 -1>
711 store <2 x i128> %0, ptr %r, align 16
715 define void @test_shl_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {
716 ; ALL-LABEL: test_shl_v2i128_outofrange:
717 ; ALL: # %bb.0: # %entry
718 ; ALL-NEXT: ret{{[l|q]}}
720 %0 = shl <2 x i128> %x, <i128 -1, i128 -1>
721 store <2 x i128> %0, ptr %r, align 16
725 define void @test_lshr_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {
726 ; i686-LABEL: test_lshr_v2i128_outofrange_sum:
727 ; i686: # %bb.0: # %entry
728 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
729 ; i686-NEXT: movl $0, 28(%eax)
730 ; i686-NEXT: movl $0, 24(%eax)
731 ; i686-NEXT: movl $0, 20(%eax)
732 ; i686-NEXT: movl $0, 16(%eax)
733 ; i686-NEXT: movl $0, 12(%eax)
734 ; i686-NEXT: movl $0, 8(%eax)
735 ; i686-NEXT: movl $0, 4(%eax)
736 ; i686-NEXT: movl $0, (%eax)
739 ; x86_64-LABEL: test_lshr_v2i128_outofrange_sum:
740 ; x86_64: # %bb.0: # %entry
741 ; x86_64-NEXT: xorps %xmm0, %xmm0
742 ; x86_64-NEXT: movaps %xmm0, 16(%r8)
743 ; x86_64-NEXT: movaps %xmm0, (%r8)
746 %0 = lshr <2 x i128> %x, <i128 -1, i128 -1>
747 %1 = lshr <2 x i128> %0, <i128 1, i128 1>
748 store <2 x i128> %1, ptr %r, align 16
752 define void @test_ashr_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {
753 ; i686-LABEL: test_ashr_v2i128_outofrange_sum:
754 ; i686: # %bb.0: # %entry
755 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
756 ; i686-NEXT: movl $0, 28(%eax)
757 ; i686-NEXT: movl $0, 24(%eax)
758 ; i686-NEXT: movl $0, 20(%eax)
759 ; i686-NEXT: movl $0, 16(%eax)
760 ; i686-NEXT: movl $0, 12(%eax)
761 ; i686-NEXT: movl $0, 8(%eax)
762 ; i686-NEXT: movl $0, 4(%eax)
763 ; i686-NEXT: movl $0, (%eax)
766 ; x86_64-LABEL: test_ashr_v2i128_outofrange_sum:
767 ; x86_64: # %bb.0: # %entry
768 ; x86_64-NEXT: xorps %xmm0, %xmm0
769 ; x86_64-NEXT: movaps %xmm0, 16(%r8)
770 ; x86_64-NEXT: movaps %xmm0, (%r8)
773 %0 = ashr <2 x i128> %x, <i128 -1, i128 -1>
774 %1 = ashr <2 x i128> %0, <i128 1, i128 1>
775 store <2 x i128> %1, ptr %r, align 16
779 define void @test_shl_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {
780 ; i686-LABEL: test_shl_v2i128_outofrange_sum:
781 ; i686: # %bb.0: # %entry
782 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
783 ; i686-NEXT: movl $0, 28(%eax)
784 ; i686-NEXT: movl $0, 24(%eax)
785 ; i686-NEXT: movl $0, 20(%eax)
786 ; i686-NEXT: movl $0, 16(%eax)
787 ; i686-NEXT: movl $0, 12(%eax)
788 ; i686-NEXT: movl $0, 8(%eax)
789 ; i686-NEXT: movl $0, 4(%eax)
790 ; i686-NEXT: movl $0, (%eax)
793 ; x86_64-LABEL: test_shl_v2i128_outofrange_sum:
794 ; x86_64: # %bb.0: # %entry
795 ; x86_64-NEXT: xorps %xmm0, %xmm0
796 ; x86_64-NEXT: movaps %xmm0, 16(%r8)
797 ; x86_64-NEXT: movaps %xmm0, (%r8)
800 %0 = shl <2 x i128> %x, <i128 -1, i128 -1>
801 %1 = shl <2 x i128> %0, <i128 1, i128 1>
802 store <2 x i128> %1, ptr %r, align 16
810 define <2 x i256> @shl_sext_shl_outofrange(<2 x i128> %a0) {
811 ; i686-LABEL: shl_sext_shl_outofrange:
813 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
814 ; i686-NEXT: movl $0, 60(%eax)
815 ; i686-NEXT: movl $0, 56(%eax)
816 ; i686-NEXT: movl $0, 52(%eax)
817 ; i686-NEXT: movl $0, 48(%eax)
818 ; i686-NEXT: movl $0, 44(%eax)
819 ; i686-NEXT: movl $0, 40(%eax)
820 ; i686-NEXT: movl $0, 36(%eax)
821 ; i686-NEXT: movl $0, 32(%eax)
822 ; i686-NEXT: movl $0, 28(%eax)
823 ; i686-NEXT: movl $0, 24(%eax)
824 ; i686-NEXT: movl $0, 20(%eax)
825 ; i686-NEXT: movl $0, 16(%eax)
826 ; i686-NEXT: movl $0, 12(%eax)
827 ; i686-NEXT: movl $0, 8(%eax)
828 ; i686-NEXT: movl $0, 4(%eax)
829 ; i686-NEXT: movl $0, (%eax)
832 ; x86_64-LABEL: shl_sext_shl_outofrange:
834 ; x86_64-NEXT: movq %rdi, %rax
835 ; x86_64-NEXT: xorps %xmm0, %xmm0
836 ; x86_64-NEXT: movaps %xmm0, 48(%rdi)
837 ; x86_64-NEXT: movaps %xmm0, 32(%rdi)
838 ; x86_64-NEXT: movaps %xmm0, 16(%rdi)
839 ; x86_64-NEXT: movaps %xmm0, (%rdi)
841 %1 = shl <2 x i128> %a0, <i128 -1, i128 -1>
842 %2 = sext <2 x i128> %1 to <2 x i256>
843 %3 = shl <2 x i256> %2, <i256 128, i256 128>
847 define <2 x i256> @shl_zext_shl_outofrange(<2 x i128> %a0) {
848 ; i686-LABEL: shl_zext_shl_outofrange:
850 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
851 ; i686-NEXT: movl $0, 60(%eax)
852 ; i686-NEXT: movl $0, 56(%eax)
853 ; i686-NEXT: movl $0, 52(%eax)
854 ; i686-NEXT: movl $0, 48(%eax)
855 ; i686-NEXT: movl $0, 44(%eax)
856 ; i686-NEXT: movl $0, 40(%eax)
857 ; i686-NEXT: movl $0, 36(%eax)
858 ; i686-NEXT: movl $0, 32(%eax)
859 ; i686-NEXT: movl $0, 28(%eax)
860 ; i686-NEXT: movl $0, 24(%eax)
861 ; i686-NEXT: movl $0, 20(%eax)
862 ; i686-NEXT: movl $0, 16(%eax)
863 ; i686-NEXT: movl $0, 12(%eax)
864 ; i686-NEXT: movl $0, 8(%eax)
865 ; i686-NEXT: movl $0, 4(%eax)
866 ; i686-NEXT: movl $0, (%eax)
869 ; x86_64-LABEL: shl_zext_shl_outofrange:
871 ; x86_64-NEXT: movq %rdi, %rax
872 ; x86_64-NEXT: xorps %xmm0, %xmm0
873 ; x86_64-NEXT: movaps %xmm0, 48(%rdi)
874 ; x86_64-NEXT: movaps %xmm0, 32(%rdi)
875 ; x86_64-NEXT: movaps %xmm0, 16(%rdi)
876 ; x86_64-NEXT: movaps %xmm0, (%rdi)
878 %1 = shl <2 x i128> %a0, <i128 -1, i128 -1>
879 %2 = zext <2 x i128> %1 to <2 x i256>
880 %3 = shl <2 x i256> %2, <i256 128, i256 128>
884 define <2 x i256> @shl_zext_lshr_outofrange(<2 x i128> %a0) {
885 ; i686-LABEL: shl_zext_lshr_outofrange:
887 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
888 ; i686-NEXT: movl $0, 60(%eax)
889 ; i686-NEXT: movl $0, 56(%eax)
890 ; i686-NEXT: movl $0, 52(%eax)
891 ; i686-NEXT: movl $0, 48(%eax)
892 ; i686-NEXT: movl $0, 44(%eax)
893 ; i686-NEXT: movl $0, 40(%eax)
894 ; i686-NEXT: movl $0, 36(%eax)
895 ; i686-NEXT: movl $0, 32(%eax)
896 ; i686-NEXT: movl $0, 28(%eax)
897 ; i686-NEXT: movl $0, 24(%eax)
898 ; i686-NEXT: movl $0, 20(%eax)
899 ; i686-NEXT: movl $0, 16(%eax)
900 ; i686-NEXT: movl $0, 12(%eax)
901 ; i686-NEXT: movl $0, 8(%eax)
902 ; i686-NEXT: movl $0, 4(%eax)
903 ; i686-NEXT: movl $0, (%eax)
906 ; x86_64-LABEL: shl_zext_lshr_outofrange:
908 ; x86_64-NEXT: movq %rdi, %rax
909 ; x86_64-NEXT: xorps %xmm0, %xmm0
910 ; x86_64-NEXT: movaps %xmm0, 48(%rdi)
911 ; x86_64-NEXT: movaps %xmm0, 32(%rdi)
912 ; x86_64-NEXT: movaps %xmm0, 16(%rdi)
913 ; x86_64-NEXT: movaps %xmm0, (%rdi)
915 %1 = lshr <2 x i128> %a0, <i128 -1, i128 -1>
916 %2 = zext <2 x i128> %1 to <2 x i256>
917 %3 = shl <2 x i256> %2, <i256 128, i256 128>
921 define i128 @lshr_shl_mask(i128 %a0) {
922 ; i686-LABEL: lshr_shl_mask:
924 ; i686-NEXT: pushl %edi
925 ; i686-NEXT: .cfi_def_cfa_offset 8
926 ; i686-NEXT: pushl %esi
927 ; i686-NEXT: .cfi_def_cfa_offset 12
928 ; i686-NEXT: .cfi_offset %esi, -12
929 ; i686-NEXT: .cfi_offset %edi, -8
930 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
931 ; i686-NEXT: movl {{[0-9]+}}(%esp), %ecx
932 ; i686-NEXT: movl {{[0-9]+}}(%esp), %edx
933 ; i686-NEXT: movl {{[0-9]+}}(%esp), %esi
934 ; i686-NEXT: movl $2147483647, %edi # imm = 0x7FFFFFFF
935 ; i686-NEXT: andl {{[0-9]+}}(%esp), %edi
936 ; i686-NEXT: movl %edi, 12(%eax)
937 ; i686-NEXT: movl %esi, 8(%eax)
938 ; i686-NEXT: movl %edx, 4(%eax)
939 ; i686-NEXT: movl %ecx, (%eax)
940 ; i686-NEXT: popl %esi
941 ; i686-NEXT: .cfi_def_cfa_offset 8
942 ; i686-NEXT: popl %edi
943 ; i686-NEXT: .cfi_def_cfa_offset 4
946 ; x86_64-LABEL: lshr_shl_mask:
948 ; x86_64-NEXT: movq %rdi, %rax
949 ; x86_64-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF
950 ; x86_64-NEXT: andq %rsi, %rdx