1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s
3 ; RUN: llc < %s -mtriple=x86_64-- -O0 | FileCheck %s -check-prefixes=CHECK-X64,CHECK-X64-O0
4 ; RUN: llc < %s -mtriple=x86_64-- -O2 | FileCheck %s -check-prefixes=CHECK-X64,CHECK-X64-O2
7 define void @shift1(i256 %x, i256 %a, ptr nocapture %r) nounwind readnone {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: pushl %ebp
11 ; CHECK-NEXT: pushl %ebx
12 ; CHECK-NEXT: pushl %edi
13 ; CHECK-NEXT: pushl %esi
14 ; CHECK-NEXT: subl $92, %esp
15 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
16 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
17 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edx
18 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edi
19 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ebx
20 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ebp
21 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
22 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
23 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
24 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
25 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
26 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
27 ; CHECK-NEXT: movl %ebp, {{[0-9]+}}(%esp)
28 ; CHECK-NEXT: movl %ebx, {{[0-9]+}}(%esp)
29 ; CHECK-NEXT: movl %edi, {{[0-9]+}}(%esp)
30 ; CHECK-NEXT: movl %edx, {{[0-9]+}}(%esp)
31 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
32 ; CHECK-NEXT: sarl $31, %esi
33 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
34 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
35 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
36 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
37 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
38 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
39 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
40 ; CHECK-NEXT: movl %esi, {{[0-9]+}}(%esp)
41 ; CHECK-NEXT: movl %ecx, %eax
42 ; CHECK-NEXT: andb $7, %al
43 ; CHECK-NEXT: shrb $3, %cl
44 ; CHECK-NEXT: movzbl %cl, %ebp
45 ; CHECK-NEXT: movl 32(%esp,%ebp), %esi
46 ; CHECK-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
47 ; CHECK-NEXT: movl %eax, %ecx
48 ; CHECK-NEXT: shrl %cl, %esi
49 ; CHECK-NEXT: movl %eax, %edx
50 ; CHECK-NEXT: notb %dl
51 ; CHECK-NEXT: movl 36(%esp,%ebp), %ecx
52 ; CHECK-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
53 ; CHECK-NEXT: leal (%ecx,%ecx), %edi
54 ; CHECK-NEXT: movl %edx, %ecx
55 ; CHECK-NEXT: shll %cl, %edi
56 ; CHECK-NEXT: orl %esi, %edi
57 ; CHECK-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
58 ; CHECK-NEXT: movl 40(%esp,%ebp), %esi
59 ; CHECK-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
60 ; CHECK-NEXT: movl %eax, %ecx
61 ; CHECK-NEXT: shrl %cl, %esi
62 ; CHECK-NEXT: movl 44(%esp,%ebp), %ecx
63 ; CHECK-NEXT: movl %ecx, (%esp) # 4-byte Spill
64 ; CHECK-NEXT: leal (%ecx,%ecx), %edi
65 ; CHECK-NEXT: movl %edx, %ecx
66 ; CHECK-NEXT: shll %cl, %edi
67 ; CHECK-NEXT: orl %esi, %edi
68 ; CHECK-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
69 ; CHECK-NEXT: movl 48(%esp,%ebp), %ebx
70 ; CHECK-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
71 ; CHECK-NEXT: movl %eax, %ecx
72 ; CHECK-NEXT: shrl %cl, %ebx
73 ; CHECK-NEXT: movl 52(%esp,%ebp), %edi
74 ; CHECK-NEXT: leal (%edi,%edi), %esi
75 ; CHECK-NEXT: movl %edx, %ecx
76 ; CHECK-NEXT: shll %cl, %esi
77 ; CHECK-NEXT: orl %ebx, %esi
78 ; CHECK-NEXT: movl %eax, %ecx
79 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
80 ; CHECK-NEXT: shrdl %cl, %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
81 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
82 ; CHECK-NEXT: shrdl %cl, %edx, (%esp) # 4-byte Folded Spill
83 ; CHECK-NEXT: movl 28(%esp,%ebp), %edx
84 ; CHECK-NEXT: movl 56(%esp,%ebp), %ebx
85 ; CHECK-NEXT: shrdl %cl, %ebx, %edi
86 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
87 ; CHECK-NEXT: shrdl %cl, %ebp, %edx
88 ; CHECK-NEXT: sarl %cl, %ebx
89 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
90 ; CHECK-NEXT: movl %ebx, 28(%eax)
91 ; CHECK-NEXT: movl %edi, 24(%eax)
92 ; CHECK-NEXT: movl (%esp), %ecx # 4-byte Reload
93 ; CHECK-NEXT: movl %ecx, 16(%eax)
94 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
95 ; CHECK-NEXT: movl %ecx, 8(%eax)
96 ; CHECK-NEXT: movl %edx, (%eax)
97 ; CHECK-NEXT: movl %esi, 20(%eax)
98 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
99 ; CHECK-NEXT: movl %ecx, 12(%eax)
100 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
101 ; CHECK-NEXT: movl %ecx, 4(%eax)
102 ; CHECK-NEXT: addl $92, %esp
103 ; CHECK-NEXT: popl %esi
104 ; CHECK-NEXT: popl %edi
105 ; CHECK-NEXT: popl %ebx
106 ; CHECK-NEXT: popl %ebp
109 ; CHECK-X64-O0-LABEL: shift1:
110 ; CHECK-X64-O0: # %bb.0: # %entry
111 ; CHECK-X64-O0-NEXT: movq {{[0-9]+}}(%rsp), %rax
112 ; CHECK-X64-O0-NEXT: movq {{[0-9]+}}(%rsp), %rax
113 ; CHECK-X64-O0-NEXT: movq {{[0-9]+}}(%rsp), %rax
114 ; CHECK-X64-O0-NEXT: movq %rdi, -{{[0-9]+}}(%rsp)
115 ; CHECK-X64-O0-NEXT: movq %rsi, -{{[0-9]+}}(%rsp)
116 ; CHECK-X64-O0-NEXT: movq %rdx, -{{[0-9]+}}(%rsp)
117 ; CHECK-X64-O0-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
118 ; CHECK-X64-O0-NEXT: sarq $63, %rcx
119 ; CHECK-X64-O0-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
120 ; CHECK-X64-O0-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
121 ; CHECK-X64-O0-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
122 ; CHECK-X64-O0-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
123 ; CHECK-X64-O0-NEXT: movb %r8b, %dl
124 ; CHECK-X64-O0-NEXT: movb %dl, %cl
125 ; CHECK-X64-O0-NEXT: andb $7, %cl
126 ; CHECK-X64-O0-NEXT: movb %cl, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill
127 ; CHECK-X64-O0-NEXT: shrb $3, %dl
128 ; CHECK-X64-O0-NEXT: movzbl %dl, %edx
129 ; CHECK-X64-O0-NEXT: movl %edx, %edi
130 ; CHECK-X64-O0-NEXT: movq -64(%rsp,%rdi), %rdx
131 ; CHECK-X64-O0-NEXT: movq -56(%rsp,%rdi), %r8
132 ; CHECK-X64-O0-NEXT: movq %r8, %r9
133 ; CHECK-X64-O0-NEXT: shrq %cl, %r9
134 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
135 ; CHECK-X64-O0-NEXT: notb %cl
136 ; CHECK-X64-O0-NEXT: movq -48(%rsp,%rdi), %rsi
137 ; CHECK-X64-O0-NEXT: movq %rsi, %r10
138 ; CHECK-X64-O0-NEXT: addq %r10, %r10
139 ; CHECK-X64-O0-NEXT: shlq %cl, %r10
140 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
141 ; CHECK-X64-O0-NEXT: orq %r10, %r9
142 ; CHECK-X64-O0-NEXT: movq %r9, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
143 ; CHECK-X64-O0-NEXT: movq -40(%rsp,%rdi), %rdi
144 ; CHECK-X64-O0-NEXT: shrdq %cl, %rdi, %rsi
145 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
146 ; CHECK-X64-O0-NEXT: shrdq %cl, %r8, %rdx
147 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
148 ; CHECK-X64-O0-NEXT: sarq %cl, %rdi
149 ; CHECK-X64-O0-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload
150 ; CHECK-X64-O0-NEXT: movq %rdi, 24(%rax)
151 ; CHECK-X64-O0-NEXT: movq %rsi, 16(%rax)
152 ; CHECK-X64-O0-NEXT: movq %rdx, (%rax)
153 ; CHECK-X64-O0-NEXT: movq %rcx, 8(%rax)
154 ; CHECK-X64-O0-NEXT: retq
156 ; CHECK-X64-O2-LABEL: shift1:
157 ; CHECK-X64-O2: # %bb.0: # %entry
158 ; CHECK-X64-O2-NEXT: movq {{[0-9]+}}(%rsp), %r9
159 ; CHECK-X64-O2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
160 ; CHECK-X64-O2-NEXT: movq %rdx, -{{[0-9]+}}(%rsp)
161 ; CHECK-X64-O2-NEXT: movq %rsi, -{{[0-9]+}}(%rsp)
162 ; CHECK-X64-O2-NEXT: movq %rdi, -{{[0-9]+}}(%rsp)
163 ; CHECK-X64-O2-NEXT: sarq $63, %rcx
164 ; CHECK-X64-O2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
165 ; CHECK-X64-O2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
166 ; CHECK-X64-O2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
167 ; CHECK-X64-O2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
168 ; CHECK-X64-O2-NEXT: movl %r8d, %eax
169 ; CHECK-X64-O2-NEXT: andb $7, %al
170 ; CHECK-X64-O2-NEXT: shrb $3, %r8b
171 ; CHECK-X64-O2-NEXT: movzbl %r8b, %edx
172 ; CHECK-X64-O2-NEXT: movq -64(%rsp,%rdx), %rsi
173 ; CHECK-X64-O2-NEXT: movq -56(%rsp,%rdx), %rdi
174 ; CHECK-X64-O2-NEXT: movq %rdi, %r8
175 ; CHECK-X64-O2-NEXT: movl %eax, %ecx
176 ; CHECK-X64-O2-NEXT: shrq %cl, %r8
177 ; CHECK-X64-O2-NEXT: notb %cl
178 ; CHECK-X64-O2-NEXT: movq -48(%rsp,%rdx), %r10
179 ; CHECK-X64-O2-NEXT: leaq (%r10,%r10), %r11
180 ; CHECK-X64-O2-NEXT: shlq %cl, %r11
181 ; CHECK-X64-O2-NEXT: orq %r8, %r11
182 ; CHECK-X64-O2-NEXT: movq -40(%rsp,%rdx), %rdx
183 ; CHECK-X64-O2-NEXT: movl %eax, %ecx
184 ; CHECK-X64-O2-NEXT: shrdq %cl, %rdx, %r10
185 ; CHECK-X64-O2-NEXT: shrdq %cl, %rdi, %rsi
186 ; CHECK-X64-O2-NEXT: sarq %cl, %rdx
187 ; CHECK-X64-O2-NEXT: movq %rdx, 24(%r9)
188 ; CHECK-X64-O2-NEXT: movq %r10, 16(%r9)
189 ; CHECK-X64-O2-NEXT: movq %rsi, (%r9)
190 ; CHECK-X64-O2-NEXT: movq %r11, 8(%r9)
191 ; CHECK-X64-O2-NEXT: retq
193 %0 = ashr i256 %x, %a
194 store i256 %0, ptr %r
198 define i256 @shift2(i256 %c) nounwind
199 ; CHECK-LABEL: shift2:
201 ; CHECK-NEXT: pushl %ebp
202 ; CHECK-NEXT: pushl %ebx
203 ; CHECK-NEXT: pushl %edi
204 ; CHECK-NEXT: pushl %esi
205 ; CHECK-NEXT: subl $92, %esp
206 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
207 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
208 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
209 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
210 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
211 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
212 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
213 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
214 ; CHECK-NEXT: movl $1, {{[0-9]+}}(%esp)
215 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
216 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
217 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
218 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
219 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
220 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
221 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
222 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
223 ; CHECK-NEXT: movb %al, %ch
224 ; CHECK-NEXT: andb $7, %ch
225 ; CHECK-NEXT: shrb $3, %al
226 ; CHECK-NEXT: negb %al
227 ; CHECK-NEXT: movsbl %al, %eax
228 ; CHECK-NEXT: movl 68(%esp,%eax), %edx
229 ; CHECK-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
230 ; CHECK-NEXT: movb %ch, %cl
231 ; CHECK-NEXT: shll %cl, %edx
232 ; CHECK-NEXT: notb %cl
233 ; CHECK-NEXT: movb %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
234 ; CHECK-NEXT: movl 64(%esp,%eax), %ebp
235 ; CHECK-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
236 ; CHECK-NEXT: shrl %ebp
237 ; CHECK-NEXT: shrl %cl, %ebp
238 ; CHECK-NEXT: orl %edx, %ebp
239 ; CHECK-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
240 ; CHECK-NEXT: movl 76(%esp,%eax), %edx
241 ; CHECK-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
242 ; CHECK-NEXT: movb %ch, %cl
243 ; CHECK-NEXT: shll %cl, %edx
244 ; CHECK-NEXT: movl 72(%esp,%eax), %ebx
245 ; CHECK-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
246 ; CHECK-NEXT: shrl %ebx
247 ; CHECK-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload
248 ; CHECK-NEXT: shrl %cl, %ebx
249 ; CHECK-NEXT: orl %edx, %ebx
250 ; CHECK-NEXT: movl 84(%esp,%eax), %esi
251 ; CHECK-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
252 ; CHECK-NEXT: movb %ch, %cl
253 ; CHECK-NEXT: shll %cl, %esi
254 ; CHECK-NEXT: movl 80(%esp,%eax), %edi
255 ; CHECK-NEXT: movl %edi, %edx
256 ; CHECK-NEXT: shrl %edx
257 ; CHECK-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload
258 ; CHECK-NEXT: shrl %cl, %edx
259 ; CHECK-NEXT: orl %esi, %edx
260 ; CHECK-NEXT: movb %ch, %cl
261 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
262 ; CHECK-NEXT: shldl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
263 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
264 ; CHECK-NEXT: shldl %cl, %esi, %edi
265 ; CHECK-NEXT: movl 60(%esp,%eax), %ebp
266 ; CHECK-NEXT: movl 88(%esp,%eax), %esi
267 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
268 ; CHECK-NEXT: shldl %cl, %eax, %esi
269 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
270 ; CHECK-NEXT: movl %esi, 28(%eax)
271 ; CHECK-NEXT: movl %edi, 20(%eax)
272 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
273 ; CHECK-NEXT: movl %esi, 12(%eax)
274 ; CHECK-NEXT: movl %ebp, %esi
275 ; CHECK-NEXT: shll %cl, %esi
276 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
277 ; CHECK-NEXT: shldl %cl, %ebp, %edi
278 ; CHECK-NEXT: movl %edi, 4(%eax)
279 ; CHECK-NEXT: movl %esi, (%eax)
280 ; CHECK-NEXT: movl %edx, 24(%eax)
281 ; CHECK-NEXT: movl %ebx, 16(%eax)
282 ; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
283 ; CHECK-NEXT: movl %ecx, 8(%eax)
284 ; CHECK-NEXT: addl $92, %esp
285 ; CHECK-NEXT: popl %esi
286 ; CHECK-NEXT: popl %edi
287 ; CHECK-NEXT: popl %ebx
288 ; CHECK-NEXT: popl %ebp
289 ; CHECK-NEXT: retl $4
291 ; CHECK-X64-O0-LABEL: shift2:
292 ; CHECK-X64-O0: # %bb.0:
293 ; CHECK-X64-O0-NEXT: movq %rdi, %rax
294 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
295 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
296 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
297 ; CHECK-X64-O0-NEXT: movq $1, -{{[0-9]+}}(%rsp)
298 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
299 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
300 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
301 ; CHECK-X64-O0-NEXT: movq $0, -{{[0-9]+}}(%rsp)
302 ; CHECK-X64-O0-NEXT: movb %sil, %dl
303 ; CHECK-X64-O0-NEXT: movb %dl, %cl
304 ; CHECK-X64-O0-NEXT: andb $7, %cl
305 ; CHECK-X64-O0-NEXT: movb %cl, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill
306 ; CHECK-X64-O0-NEXT: shrb $3, %dl
307 ; CHECK-X64-O0-NEXT: negb %dl
308 ; CHECK-X64-O0-NEXT: movsbq %dl, %rdx
309 ; CHECK-X64-O0-NEXT: movq -16(%rsp,%rdx), %rsi
310 ; CHECK-X64-O0-NEXT: movq %rsi, %r10
311 ; CHECK-X64-O0-NEXT: shlq %cl, %r10
312 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
313 ; CHECK-X64-O0-NEXT: notb %cl
314 ; CHECK-X64-O0-NEXT: movq -32(%rsp,%rdx), %r9
315 ; CHECK-X64-O0-NEXT: movq -24(%rsp,%rdx), %r8
316 ; CHECK-X64-O0-NEXT: movq %r8, %r11
317 ; CHECK-X64-O0-NEXT: shrq %r11
318 ; CHECK-X64-O0-NEXT: shrq %cl, %r11
319 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
320 ; CHECK-X64-O0-NEXT: orq %r11, %r10
321 ; CHECK-X64-O0-NEXT: movq %r10, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
322 ; CHECK-X64-O0-NEXT: movq -8(%rsp,%rdx), %rdx
323 ; CHECK-X64-O0-NEXT: shldq %cl, %rsi, %rdx
324 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
325 ; CHECK-X64-O0-NEXT: movq %r9, %rsi
326 ; CHECK-X64-O0-NEXT: shlq %cl, %rsi
327 ; CHECK-X64-O0-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %cl # 1-byte Reload
328 ; CHECK-X64-O0-NEXT: shldq %cl, %r9, %r8
329 ; CHECK-X64-O0-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload
330 ; CHECK-X64-O0-NEXT: movq %r8, 8(%rdi)
331 ; CHECK-X64-O0-NEXT: movq %rsi, (%rdi)
332 ; CHECK-X64-O0-NEXT: movq %rdx, 24(%rdi)
333 ; CHECK-X64-O0-NEXT: movq %rcx, 16(%rdi)
334 ; CHECK-X64-O0-NEXT: retq
336 ; CHECK-X64-O2-LABEL: shift2:
337 ; CHECK-X64-O2: # %bb.0:
338 ; CHECK-X64-O2-NEXT: movq %rdi, %rax
339 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
340 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
341 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
342 ; CHECK-X64-O2-NEXT: movq $1, -{{[0-9]+}}(%rsp)
343 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
344 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
345 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
346 ; CHECK-X64-O2-NEXT: movq $0, -{{[0-9]+}}(%rsp)
347 ; CHECK-X64-O2-NEXT: movl %esi, %edx
348 ; CHECK-X64-O2-NEXT: andb $7, %dl
349 ; CHECK-X64-O2-NEXT: shrb $3, %sil
350 ; CHECK-X64-O2-NEXT: negb %sil
351 ; CHECK-X64-O2-NEXT: movsbq %sil, %rsi
352 ; CHECK-X64-O2-NEXT: movq -16(%rsp,%rsi), %rdi
353 ; CHECK-X64-O2-NEXT: movq %rdi, %r8
354 ; CHECK-X64-O2-NEXT: movl %edx, %ecx
355 ; CHECK-X64-O2-NEXT: shlq %cl, %r8
356 ; CHECK-X64-O2-NEXT: notb %cl
357 ; CHECK-X64-O2-NEXT: movq -32(%rsp,%rsi), %r9
358 ; CHECK-X64-O2-NEXT: movq -24(%rsp,%rsi), %r10
359 ; CHECK-X64-O2-NEXT: movq %r10, %r11
360 ; CHECK-X64-O2-NEXT: shrq %r11
361 ; CHECK-X64-O2-NEXT: shrq %cl, %r11
362 ; CHECK-X64-O2-NEXT: orq %r8, %r11
363 ; CHECK-X64-O2-NEXT: movq -8(%rsp,%rsi), %rsi
364 ; CHECK-X64-O2-NEXT: movl %edx, %ecx
365 ; CHECK-X64-O2-NEXT: shldq %cl, %rdi, %rsi
366 ; CHECK-X64-O2-NEXT: movq %r9, %rdi
367 ; CHECK-X64-O2-NEXT: shlq %cl, %rdi
368 ; CHECK-X64-O2-NEXT: shldq %cl, %r9, %r10
369 ; CHECK-X64-O2-NEXT: movq %rsi, 24(%rax)
370 ; CHECK-X64-O2-NEXT: movq %r10, 8(%rax)
371 ; CHECK-X64-O2-NEXT: movq %rdi, (%rax)
372 ; CHECK-X64-O2-NEXT: movq %r11, 16(%rax)
373 ; CHECK-X64-O2-NEXT: retq
375 %b = shl i256 1, %c ; %c must not be a constant
376 ; Special case when %c is 0:
379 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: