1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK,X64
5 @ok = internal constant [4 x i8] c"%d\0A\00"
6 @no = internal constant [4 x i8] c"no\0A\00"
8 define i1 @test1(i32 %v1, i32 %v2) nounwind {
10 ; X86: # %bb.0: # %entry
11 ; X86-NEXT: subl $12, %esp
12 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
13 ; X86-NEXT: imull {{[0-9]+}}(%esp), %eax
14 ; X86-NEXT: jno .LBB0_1
15 ; X86-NEXT: # %bb.2: # %overflow
16 ; X86-NEXT: movl $no, (%esp)
17 ; X86-NEXT: calll printf@PLT
18 ; X86-NEXT: xorl %eax, %eax
19 ; X86-NEXT: addl $12, %esp
21 ; X86-NEXT: .LBB0_1: # %normal
22 ; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
23 ; X86-NEXT: movl $ok, (%esp)
24 ; X86-NEXT: calll printf@PLT
25 ; X86-NEXT: movb $1, %al
26 ; X86-NEXT: addl $12, %esp
30 ; X64: # %bb.0: # %entry
31 ; X64-NEXT: pushq %rax
32 ; X64-NEXT: movl %edi, %eax
33 ; X64-NEXT: imull %esi, %eax
34 ; X64-NEXT: jno .LBB0_1
35 ; X64-NEXT: # %bb.2: # %overflow
36 ; X64-NEXT: movl $no, %edi
37 ; X64-NEXT: xorl %eax, %eax
38 ; X64-NEXT: callq printf@PLT
39 ; X64-NEXT: xorl %eax, %eax
42 ; X64-NEXT: .LBB0_1: # %normal
43 ; X64-NEXT: movl $ok, %edi
44 ; X64-NEXT: movl %eax, %esi
45 ; X64-NEXT: xorl %eax, %eax
46 ; X64-NEXT: callq printf@PLT
47 ; X64-NEXT: movb $1, %al
51 %t = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %v1, i32 %v2)
52 %sum = extractvalue {i32, i1} %t, 0
53 %obit = extractvalue {i32, i1} %t, 1
54 br i1 %obit, label %overflow, label %normal
57 %t1 = tail call i32 (ptr, ...) @printf( ptr @ok, i32 %sum ) nounwind
61 %t2 = tail call i32 (ptr, ...) @printf( ptr @no ) nounwind
65 define i1 @test2(i32 %v1, i32 %v2) nounwind {
67 ; X86: # %bb.0: # %entry
68 ; X86-NEXT: subl $12, %esp
69 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
70 ; X86-NEXT: imull {{[0-9]+}}(%esp), %eax
71 ; X86-NEXT: jno .LBB1_2
72 ; X86-NEXT: # %bb.1: # %overflow
73 ; X86-NEXT: movl $no, (%esp)
74 ; X86-NEXT: calll printf@PLT
75 ; X86-NEXT: xorl %eax, %eax
76 ; X86-NEXT: addl $12, %esp
78 ; X86-NEXT: .LBB1_2: # %normal
79 ; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
80 ; X86-NEXT: movl $ok, (%esp)
81 ; X86-NEXT: calll printf@PLT
82 ; X86-NEXT: movb $1, %al
83 ; X86-NEXT: addl $12, %esp
87 ; X64: # %bb.0: # %entry
88 ; X64-NEXT: pushq %rax
89 ; X64-NEXT: movl %edi, %eax
90 ; X64-NEXT: imull %esi, %eax
91 ; X64-NEXT: jno .LBB1_2
92 ; X64-NEXT: # %bb.1: # %overflow
93 ; X64-NEXT: movl $no, %edi
94 ; X64-NEXT: xorl %eax, %eax
95 ; X64-NEXT: callq printf@PLT
96 ; X64-NEXT: xorl %eax, %eax
99 ; X64-NEXT: .LBB1_2: # %normal
100 ; X64-NEXT: movl $ok, %edi
101 ; X64-NEXT: movl %eax, %esi
102 ; X64-NEXT: xorl %eax, %eax
103 ; X64-NEXT: callq printf@PLT
104 ; X64-NEXT: movb $1, %al
105 ; X64-NEXT: popq %rcx
108 %t = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %v1, i32 %v2)
109 %sum = extractvalue {i32, i1} %t, 0
110 %obit = extractvalue {i32, i1} %t, 1
111 br i1 %obit, label %overflow, label %normal
114 %t2 = tail call i32 (ptr, ...) @printf( ptr @no ) nounwind
118 %t1 = tail call i32 (ptr, ...) @printf( ptr @ok, i32 %sum ) nounwind
122 declare i32 @printf(ptr, ...) nounwind
123 declare {i32, i1} @llvm.smul.with.overflow.i32(i32, i32)
125 define i32 @test3(i32 %a, i32 %b) nounwind readnone {
127 ; X86: # %bb.0: # %entry
128 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
129 ; X86-NEXT: addl {{[0-9]+}}(%esp), %eax
130 ; X86-NEXT: addl %eax, %eax
134 ; X64: # %bb.0: # %entry
135 ; X64-NEXT: # kill: def $esi killed $esi def $rsi
136 ; X64-NEXT: # kill: def $edi killed $edi def $rdi
137 ; X64-NEXT: leal (%rdi,%rsi), %eax
138 ; X64-NEXT: addl %eax, %eax
141 %tmp0 = add i32 %b, %a
142 %tmp1 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %tmp0, i32 2)
143 %tmp2 = extractvalue { i32, i1 } %tmp1, 0
147 define i32 @test4(i32 %a, i32 %b) nounwind readnone {
149 ; X86: # %bb.0: # %entry
150 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
151 ; X86-NEXT: addl {{[0-9]+}}(%esp), %eax
152 ; X86-NEXT: imull $4, %eax, %eax
156 ; X64: # %bb.0: # %entry
157 ; X64-NEXT: addl %esi, %edi
158 ; X64-NEXT: imull $4, %edi, %eax
161 %tmp0 = add i32 %b, %a
162 %tmp1 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %tmp0, i32 4)
163 %tmp2 = extractvalue { i32, i1 } %tmp1, 0
167 declare { i63, i1 } @llvm.smul.with.overflow.i63(i63, i63) nounwind readnone
169 ; Was returning false, should return true (not constant folded yet though).
171 define i1 @test5() nounwind {
172 ; CHECK-LABEL: test5:
173 ; CHECK: # %bb.0: # %entry
174 ; CHECK-NEXT: movb $1, %al
175 ; CHECK-NEXT: ret{{[l|q]}}
177 %res = call { i63, i1 } @llvm.smul.with.overflow.i63(i63 4, i63 4611686018427387903)
178 %sum = extractvalue { i63, i1 } %res, 0
179 %overflow = extractvalue { i63, i1 } %res, 1
185 declare { i129, i1 } @llvm.smul.with.overflow.i129(i129, i129)
187 define { i129, i1 } @smul_ovf(i129 %x, i129 %y) nounwind {
188 ; X86-LABEL: smul_ovf:
190 ; X86-NEXT: pushl %ebp
191 ; X86-NEXT: pushl %ebx
192 ; X86-NEXT: pushl %edi
193 ; X86-NEXT: pushl %esi
194 ; X86-NEXT: subl $188, %esp
195 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
196 ; X86-NEXT: andl $1, %eax
197 ; X86-NEXT: negl %eax
198 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
199 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
200 ; X86-NEXT: andl $1, %ebp
201 ; X86-NEXT: negl %ebp
202 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
203 ; X86-NEXT: mull %ebp
204 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
205 ; X86-NEXT: movl %eax, %ecx
206 ; X86-NEXT: movl %edx, %edi
207 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
208 ; X86-NEXT: addl %edx, %ecx
209 ; X86-NEXT: adcl $0, %edi
210 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
211 ; X86-NEXT: mull %ebp
212 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
213 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
214 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
215 ; X86-NEXT: addl %eax, %ecx
216 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
217 ; X86-NEXT: adcl %edx, %edi
219 ; X86-NEXT: addl %eax, %edi
220 ; X86-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
221 ; X86-NEXT: movzbl %bl, %esi
222 ; X86-NEXT: adcl %edx, %esi
223 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
224 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
225 ; X86-NEXT: addl %edi, %eax
226 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
227 ; X86-NEXT: adcl %esi, %ecx
228 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
229 ; X86-NEXT: adcl $0, %edi
230 ; X86-NEXT: movl %edi, (%esp) # 4-byte Spill
231 ; X86-NEXT: adcl $0, %esi
232 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
233 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
234 ; X86-NEXT: mull %ebp
235 ; X86-NEXT: movl %eax, %ebx
236 ; X86-NEXT: movl %eax, %esi
237 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
238 ; X86-NEXT: addl %edx, %ebx
239 ; X86-NEXT: movl %edx, %edi
240 ; X86-NEXT: adcl $0, %edi
241 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
242 ; X86-NEXT: mull %ebp
243 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
244 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
245 ; X86-NEXT: addl %eax, %ebx
246 ; X86-NEXT: adcl %edx, %edi
248 ; X86-NEXT: addl %eax, %edi
249 ; X86-NEXT: movzbl %cl, %eax
250 ; X86-NEXT: adcl %edx, %eax
251 ; X86-NEXT: movl %esi, %ecx
252 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
253 ; X86-NEXT: addl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
254 ; X86-NEXT: adcl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
255 ; X86-NEXT: movl %ebx, %esi
256 ; X86-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
257 ; X86-NEXT: movl %edi, %ebp
258 ; X86-NEXT: adcl $0, %ebp
259 ; X86-NEXT: movl %eax, %edx
260 ; X86-NEXT: movl %eax, %ebx
261 ; X86-NEXT: adcl $0, %edx
262 ; X86-NEXT: addl (%esp), %ebp # 4-byte Folded Reload
263 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
265 ; X86-NEXT: addl %ecx, %ebp
266 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
267 ; X86-NEXT: adcl %esi, %edx
268 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
269 ; X86-NEXT: movzbl %al, %eax
270 ; X86-NEXT: adcl %edi, %eax
271 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
272 ; X86-NEXT: adcl $0, %ebx
273 ; X86-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
274 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
275 ; X86-NEXT: movl %edi, %eax
276 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
277 ; X86-NEXT: mull %ecx
278 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
279 ; X86-NEXT: movl %edx, %esi
280 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
281 ; X86-NEXT: mull %ecx
282 ; X86-NEXT: movl %edx, %ecx
283 ; X86-NEXT: movl %eax, %ebx
284 ; X86-NEXT: addl %esi, %ebx
285 ; X86-NEXT: adcl $0, %ecx
286 ; X86-NEXT: movl %edi, %eax
287 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
288 ; X86-NEXT: mull %ebp
289 ; X86-NEXT: movl %edx, %edi
290 ; X86-NEXT: movl %eax, %esi
291 ; X86-NEXT: addl %ebx, %esi
292 ; X86-NEXT: adcl %ecx, %edi
294 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
295 ; X86-NEXT: mull %ebp
296 ; X86-NEXT: addl %edi, %eax
297 ; X86-NEXT: movl %eax, (%esp) # 4-byte Spill
298 ; X86-NEXT: movzbl %cl, %eax
299 ; X86-NEXT: adcl %eax, %edx
300 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
301 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
302 ; X86-NEXT: movl %ebp, %eax
303 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
304 ; X86-NEXT: mull %ecx
305 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
306 ; X86-NEXT: movl %edx, %ebx
307 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
308 ; X86-NEXT: mull %ecx
309 ; X86-NEXT: movl %edx, %ecx
310 ; X86-NEXT: movl %eax, %edi
311 ; X86-NEXT: addl %ebx, %edi
312 ; X86-NEXT: adcl $0, %ecx
313 ; X86-NEXT: movl %ebp, %eax
314 ; X86-NEXT: mull {{[0-9]+}}(%esp)
315 ; X86-NEXT: movl %edx, %ebp
316 ; X86-NEXT: addl %edi, %eax
317 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
318 ; X86-NEXT: adcl %ecx, %ebp
320 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
321 ; X86-NEXT: mull {{[0-9]+}}(%esp)
322 ; X86-NEXT: movl %edx, %edi
323 ; X86-NEXT: movl %eax, %ecx
324 ; X86-NEXT: addl %ebp, %ecx
325 ; X86-NEXT: movzbl %bl, %eax
326 ; X86-NEXT: adcl %eax, %edi
327 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
328 ; X86-NEXT: adcl %esi, %edi
329 ; X86-NEXT: adcl $0, (%esp) # 4-byte Folded Spill
330 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
331 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
332 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
333 ; X86-NEXT: mull %esi
334 ; X86-NEXT: movl %edx, %ebx
335 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
336 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
337 ; X86-NEXT: mull %esi
338 ; X86-NEXT: movl %edx, %esi
339 ; X86-NEXT: movl %eax, %ebp
340 ; X86-NEXT: addl %ebx, %ebp
341 ; X86-NEXT: adcl $0, %esi
342 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
343 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
344 ; X86-NEXT: mull %edx
345 ; X86-NEXT: movl %edx, %ebx
346 ; X86-NEXT: addl %ebp, %eax
347 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
348 ; X86-NEXT: adcl %esi, %ebx
349 ; X86-NEXT: setb {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Folded Spill
350 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
351 ; X86-NEXT: mull {{[0-9]+}}(%esp)
352 ; X86-NEXT: movl %edx, %esi
353 ; X86-NEXT: movl %eax, %ebp
354 ; X86-NEXT: addl %ebx, %ebp
355 ; X86-NEXT: movzbl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 1-byte Folded Reload
356 ; X86-NEXT: adcl %eax, %esi
357 ; X86-NEXT: addl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
358 ; X86-NEXT: adcl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
359 ; X86-NEXT: adcl $0, %ebp
360 ; X86-NEXT: adcl $0, %esi
361 ; X86-NEXT: addl (%esp), %ebp # 4-byte Folded Reload
362 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
363 ; X86-NEXT: setb (%esp) # 1-byte Folded Spill
364 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
365 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
366 ; X86-NEXT: mull %ecx
367 ; X86-NEXT: movl %edx, %ebx
368 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
369 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
370 ; X86-NEXT: mull %ecx
371 ; X86-NEXT: movl %edx, %ecx
372 ; X86-NEXT: movl %eax, %edi
373 ; X86-NEXT: addl %ebx, %edi
374 ; X86-NEXT: adcl $0, %ecx
375 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
376 ; X86-NEXT: mull {{[0-9]+}}(%esp)
377 ; X86-NEXT: movl %edx, %ebx
378 ; X86-NEXT: addl %edi, %eax
379 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
380 ; X86-NEXT: adcl %ecx, %ebx
382 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
383 ; X86-NEXT: mull {{[0-9]+}}(%esp)
384 ; X86-NEXT: movl %eax, %edi
385 ; X86-NEXT: addl %ebx, %edi
386 ; X86-NEXT: movzbl %cl, %eax
387 ; X86-NEXT: movl %edx, %ebx
388 ; X86-NEXT: adcl %eax, %ebx
389 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
390 ; X86-NEXT: addl %ebp, %ecx
391 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
392 ; X86-NEXT: adcl %esi, %edx
393 ; X86-NEXT: movzbl (%esp), %eax # 1-byte Folded Reload
394 ; X86-NEXT: adcl %eax, %edi
395 ; X86-NEXT: adcl $0, %ebx
396 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
397 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
398 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
399 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
400 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
401 ; X86-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
402 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
403 ; X86-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
404 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
405 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
406 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
407 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
408 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
409 ; X86-NEXT: movl %ecx, %eax
410 ; X86-NEXT: mull {{[0-9]+}}(%esp)
411 ; X86-NEXT: movl %edx, %esi
412 ; X86-NEXT: movl %eax, %ebx
413 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
414 ; X86-NEXT: movl %ecx, %eax
415 ; X86-NEXT: mull {{[0-9]+}}(%esp)
416 ; X86-NEXT: movl %eax, %ecx
417 ; X86-NEXT: movl %eax, %ebp
418 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
419 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
420 ; X86-NEXT: addl %esi, %ecx
421 ; X86-NEXT: movl %edx, %edi
422 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
423 ; X86-NEXT: adcl $0, %edi
424 ; X86-NEXT: addl %ebx, %ecx
425 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
426 ; X86-NEXT: adcl %esi, %edi
428 ; X86-NEXT: addl %ebp, %edi
429 ; X86-NEXT: movzbl %al, %eax
430 ; X86-NEXT: adcl %edx, %eax
431 ; X86-NEXT: movl %eax, (%esp) # 4-byte Spill
432 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
433 ; X86-NEXT: movl %ecx, %eax
434 ; X86-NEXT: mull {{[0-9]+}}(%esp)
435 ; X86-NEXT: movl %edx, %esi
436 ; X86-NEXT: movl %eax, %ebp
437 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
438 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
439 ; X86-NEXT: mull %ecx
440 ; X86-NEXT: movl %eax, %ebx
441 ; X86-NEXT: movl %eax, %ecx
442 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
443 ; X86-NEXT: movl %esi, %eax
444 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
445 ; X86-NEXT: addl %esi, %ecx
446 ; X86-NEXT: movl %edx, %esi
447 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
448 ; X86-NEXT: adcl $0, %esi
449 ; X86-NEXT: addl %ebp, %ecx
450 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
451 ; X86-NEXT: adcl %eax, %esi
453 ; X86-NEXT: addl %ebx, %esi
454 ; X86-NEXT: movzbl %al, %eax
455 ; X86-NEXT: adcl %edx, %eax
456 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
457 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
458 ; X86-NEXT: addl %esi, %edx
459 ; X86-NEXT: movl %esi, %ecx
460 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
461 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
462 ; X86-NEXT: adcl %eax, %esi
463 ; X86-NEXT: movl %edi, %ebx
464 ; X86-NEXT: adcl $0, %ebx
465 ; X86-NEXT: movl (%esp), %ebp # 4-byte Reload
466 ; X86-NEXT: adcl $0, %ebp
467 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
468 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
469 ; X86-NEXT: movl %ecx, %eax
470 ; X86-NEXT: adcl $0, %eax
471 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
472 ; X86-NEXT: adcl $0, %ecx
473 ; X86-NEXT: addl %ebx, %eax
474 ; X86-NEXT: adcl %ebp, %ecx
476 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
477 ; X86-NEXT: movl %eax, %ebp
478 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
479 ; X86-NEXT: movzbl %bl, %ebx
480 ; X86-NEXT: adcl %edi, %ebx
481 ; X86-NEXT: adcl $0, (%esp) # 4-byte Folded Spill
482 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
483 ; X86-NEXT: addl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
484 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
485 ; X86-NEXT: adcl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
486 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
487 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
488 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
489 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
490 ; X86-NEXT: adcl $0, %ebp
491 ; X86-NEXT: adcl $0, %ecx
492 ; X86-NEXT: adcl $0, %ebx
493 ; X86-NEXT: movl (%esp), %eax # 4-byte Reload
494 ; X86-NEXT: adcl $0, %eax
495 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
496 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
497 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
498 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
499 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
500 ; X86-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
501 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
502 ; X86-NEXT: movl %eax, (%esp) # 4-byte Spill
503 ; X86-NEXT: setb {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Folded Spill
504 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
505 ; X86-NEXT: mull {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
506 ; X86-NEXT: movl %eax, %edi
507 ; X86-NEXT: movl %eax, %ebp
508 ; X86-NEXT: addl %edx, %ebp
509 ; X86-NEXT: movl %edx, %ecx
510 ; X86-NEXT: adcl $0, %ecx
511 ; X86-NEXT: addl %eax, %ebp
512 ; X86-NEXT: adcl %edx, %ecx
514 ; X86-NEXT: addl %eax, %ecx
515 ; X86-NEXT: movzbl %bl, %esi
516 ; X86-NEXT: adcl %edx, %esi
517 ; X86-NEXT: movl %eax, %edx
518 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
519 ; X86-NEXT: addl %ecx, %edx
520 ; X86-NEXT: movl %ebp, %eax
521 ; X86-NEXT: adcl %esi, %eax
522 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
523 ; X86-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
524 ; X86-NEXT: movl %ecx, %ebx
525 ; X86-NEXT: movl %ecx, %eax
526 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
527 ; X86-NEXT: adcl $0, %ebx
528 ; X86-NEXT: movl %esi, %ecx
529 ; X86-NEXT: adcl $0, %ecx
530 ; X86-NEXT: addl %edi, %edx
531 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
532 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
533 ; X86-NEXT: adcl %ebp, %edi
534 ; X86-NEXT: movl %eax, %edx
535 ; X86-NEXT: adcl $0, %edx
536 ; X86-NEXT: movl %esi, %eax
537 ; X86-NEXT: adcl $0, %eax
538 ; X86-NEXT: addl %ebx, %edx
539 ; X86-NEXT: adcl %ecx, %eax
541 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
542 ; X86-NEXT: addl %ebx, %edx
543 ; X86-NEXT: movl %ebp, %esi
544 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
545 ; X86-NEXT: adcl %ebp, %eax
546 ; X86-NEXT: movl %eax, %ebp
547 ; X86-NEXT: movzbl %cl, %eax
548 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
549 ; X86-NEXT: movl %eax, %ecx
550 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
551 ; X86-NEXT: adcl $0, %eax
552 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
553 ; X86-NEXT: addl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
554 ; X86-NEXT: adcl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
555 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
556 ; X86-NEXT: adcl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
557 ; X86-NEXT: adcl (%esp), %edi # 4-byte Folded Reload
558 ; X86-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
559 ; X86-NEXT: movzbl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 1-byte Folded Reload
560 ; X86-NEXT: adcl %eax, %edx
561 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
562 ; X86-NEXT: adcl $0, %ebp
563 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
564 ; X86-NEXT: adcl $0, %ecx
565 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
566 ; X86-NEXT: adcl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
567 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
568 ; X86-NEXT: movl %edi, %edx
569 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
570 ; X86-NEXT: addl %ecx, %edx
571 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
572 ; X86-NEXT: movl %esi, %ebx
573 ; X86-NEXT: adcl $0, %ebx
574 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
575 ; X86-NEXT: adcl %ecx, %ebx
577 ; X86-NEXT: addl %edi, %ebx
578 ; X86-NEXT: movzbl %al, %eax
579 ; X86-NEXT: adcl %esi, %eax
580 ; X86-NEXT: movl %eax, (%esp) # 4-byte Spill
581 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
582 ; X86-NEXT: movl %ebp, %eax
583 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
584 ; X86-NEXT: addl %esi, %eax
585 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
586 ; X86-NEXT: adcl $0, %edi
587 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
588 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
589 ; X86-NEXT: adcl %esi, %edi
591 ; X86-NEXT: addl %ebp, %edi
592 ; X86-NEXT: movzbl %al, %esi
593 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
594 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
595 ; X86-NEXT: addl %edi, %ecx
596 ; X86-NEXT: movl %edx, %eax
597 ; X86-NEXT: adcl %esi, %eax
598 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
599 ; X86-NEXT: movl %ebx, %eax
600 ; X86-NEXT: adcl $0, %eax
601 ; X86-NEXT: movl (%esp), %ebp # 4-byte Reload
602 ; X86-NEXT: adcl $0, %ebp
603 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
604 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
605 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
606 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
607 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
608 ; X86-NEXT: adcl $0, %edi
609 ; X86-NEXT: adcl $0, %esi
610 ; X86-NEXT: addl %eax, %edi
611 ; X86-NEXT: adcl %ebp, %esi
613 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
614 ; X86-NEXT: addl %ecx, %edi
615 ; X86-NEXT: adcl %edx, %esi
616 ; X86-NEXT: movzbl %al, %eax
617 ; X86-NEXT: adcl %ebx, %eax
618 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
619 ; X86-NEXT: adcl $0, (%esp) # 4-byte Folded Spill
620 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
621 ; X86-NEXT: movl %ecx, %eax
622 ; X86-NEXT: addl %ebx, %eax
623 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
624 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
625 ; X86-NEXT: adcl %ecx, %edx
626 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
627 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
628 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
629 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
630 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
631 ; X86-NEXT: imull {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
632 ; X86-NEXT: movl %edx, %ebp
633 ; X86-NEXT: addl %eax, %eax
634 ; X86-NEXT: adcl %edx, %ebp
635 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
636 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
637 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
638 ; X86-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
639 ; X86-NEXT: movl %ebx, %eax
640 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
641 ; X86-NEXT: movl %eax, %ebx
642 ; X86-NEXT: movl %ecx, %eax
643 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
644 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
645 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
646 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
647 ; X86-NEXT: adcl %ebp, %edx
648 ; X86-NEXT: addl %edi, %ebx
649 ; X86-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
650 ; X86-NEXT: adcl %esi, %eax
651 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
652 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
653 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
654 ; X86-NEXT: adcl (%esp), %edx # 4-byte Folded Reload
655 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
656 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
657 ; X86-NEXT: movl %ecx, %eax
658 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
659 ; X86-NEXT: addl %edx, %eax
660 ; X86-NEXT: adcl $0, %edx
661 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
662 ; X86-NEXT: addl %edi, %eax
663 ; X86-NEXT: movl %eax, %ebx
664 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
665 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
666 ; X86-NEXT: adcl %esi, %edx
668 ; X86-NEXT: addl %edi, %edx
669 ; X86-NEXT: movzbl %al, %ebp
670 ; X86-NEXT: adcl %esi, %ebp
671 ; X86-NEXT: movl %ecx, %eax
672 ; X86-NEXT: addl %edx, %eax
673 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
674 ; X86-NEXT: movl %ebx, %eax
675 ; X86-NEXT: adcl %ebp, %eax
676 ; X86-NEXT: movl %eax, (%esp) # 4-byte Spill
677 ; X86-NEXT: adcl $0, %edx
678 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
679 ; X86-NEXT: adcl $0, %ebp
680 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
681 ; X86-NEXT: movl %edi, %eax
682 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
683 ; X86-NEXT: addl %edx, %eax
684 ; X86-NEXT: adcl $0, %edx
685 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
686 ; X86-NEXT: addl %ecx, %eax
687 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
688 ; X86-NEXT: adcl %esi, %edx
690 ; X86-NEXT: addl %ecx, %edx
691 ; X86-NEXT: movl %edx, %ecx
692 ; X86-NEXT: movzbl %bl, %ebx
693 ; X86-NEXT: adcl %esi, %ebx
694 ; X86-NEXT: addl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
695 ; X86-NEXT: movl %edi, %esi
696 ; X86-NEXT: adcl %eax, (%esp) # 4-byte Folded Spill
697 ; X86-NEXT: adcl $0, %edx
698 ; X86-NEXT: movl %ebx, %edi
699 ; X86-NEXT: adcl $0, %edi
700 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
701 ; X86-NEXT: adcl %ebp, %edi
702 ; X86-NEXT: setb {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Folded Spill
703 ; X86-NEXT: movl %esi, %ebp
704 ; X86-NEXT: addl %esi, %edx
705 ; X86-NEXT: adcl %eax, %edi
706 ; X86-NEXT: movzbl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 1-byte Folded Reload
707 ; X86-NEXT: adcl %ecx, %eax
708 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
709 ; X86-NEXT: adcl $0, %ebx
710 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
711 ; X86-NEXT: addl %ecx, %ebp
712 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
713 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
714 ; X86-NEXT: adcl %esi, %eax
715 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
716 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
717 ; X86-NEXT: addl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
718 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
719 ; X86-NEXT: adcl %esi, %ecx
720 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
721 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
722 ; X86-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
723 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
724 ; X86-NEXT: addl %edx, %esi
725 ; X86-NEXT: adcl %edi, %ecx
726 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
727 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
728 ; X86-NEXT: movl %ebp, %eax
729 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
730 ; X86-NEXT: adcl %ebx, %edi
731 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
732 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
733 ; X86-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
734 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
735 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
736 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
737 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
738 ; X86-NEXT: movl (%esp), %ebx # 4-byte Reload
739 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
740 ; X86-NEXT: movl %esi, %ecx
741 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
742 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
743 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
744 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
745 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
746 ; X86-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
747 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
748 ; X86-NEXT: addl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
749 ; X86-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
750 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
751 ; X86-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
752 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
753 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
754 ; X86-NEXT: movl %ebx, (%esp) # 4-byte Spill
755 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
756 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
757 ; X86-NEXT: movl %esi, %edi
758 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
759 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
760 ; X86-NEXT: adcl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
761 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
762 ; X86-NEXT: sarl $31, %edx
763 ; X86-NEXT: xorl %edx, %ebp
764 ; X86-NEXT: xorl %edx, %eax
765 ; X86-NEXT: orl %ebp, %eax
766 ; X86-NEXT: movl %ecx, %ebx
767 ; X86-NEXT: xorl %edx, %ebx
768 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
769 ; X86-NEXT: xorl %edx, %ecx
770 ; X86-NEXT: orl %ebx, %ecx
771 ; X86-NEXT: orl %eax, %ecx
772 ; X86-NEXT: movl (%esp), %ebx # 4-byte Reload
773 ; X86-NEXT: xorl %edx, %ebx
774 ; X86-NEXT: xorl %edx, %esi
775 ; X86-NEXT: orl %ebx, %esi
776 ; X86-NEXT: xorl %edx, %edi
777 ; X86-NEXT: xorl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
778 ; X86-NEXT: orl %edi, %edx
779 ; X86-NEXT: orl %esi, %edx
780 ; X86-NEXT: orl %ecx, %edx
781 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
782 ; X86-NEXT: movl %edi, %ecx
783 ; X86-NEXT: andl $1, %ecx
784 ; X86-NEXT: movl %ecx, %eax
785 ; X86-NEXT: negl %eax
786 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
787 ; X86-NEXT: xorl %eax, %ebx
788 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
789 ; X86-NEXT: xorl %eax, %esi
790 ; X86-NEXT: orl %ebx, %esi
791 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
792 ; X86-NEXT: xorl %eax, %ebx
793 ; X86-NEXT: xorl %edi, %eax
794 ; X86-NEXT: orl %ebx, %eax
795 ; X86-NEXT: orl %esi, %eax
796 ; X86-NEXT: orl %edx, %eax
797 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
798 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
799 ; X86-NEXT: movl %edx, 4(%eax)
800 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
801 ; X86-NEXT: movl %edx, (%eax)
802 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
803 ; X86-NEXT: movl %edx, 8(%eax)
804 ; X86-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
805 ; X86-NEXT: movl %edx, 12(%eax)
806 ; X86-NEXT: movb %cl, 16(%eax)
807 ; X86-NEXT: setne 32(%eax)
808 ; X86-NEXT: addl $188, %esp
809 ; X86-NEXT: popl %esi
810 ; X86-NEXT: popl %edi
811 ; X86-NEXT: popl %ebx
812 ; X86-NEXT: popl %ebp
815 ; X64-LABEL: smul_ovf:
817 ; X64-NEXT: pushq %rbp
818 ; X64-NEXT: pushq %r15
819 ; X64-NEXT: pushq %r14
820 ; X64-NEXT: pushq %r13
821 ; X64-NEXT: pushq %r12
822 ; X64-NEXT: pushq %rbx
823 ; X64-NEXT: movq %r9, %r15
824 ; X64-NEXT: movq %rcx, %r9
825 ; X64-NEXT: movq %rdx, %r14
826 ; X64-NEXT: movq %rsi, %r12
827 ; X64-NEXT: movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
828 ; X64-NEXT: movq {{[0-9]+}}(%rsp), %r11
829 ; X64-NEXT: andl $1, %r11d
830 ; X64-NEXT: negq %r11
831 ; X64-NEXT: andl $1, %r9d
833 ; X64-NEXT: movq %r9, %rax
835 ; X64-NEXT: movq %rdx, %rcx
836 ; X64-NEXT: movq %rax, %rbp
837 ; X64-NEXT: movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
838 ; X64-NEXT: movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
839 ; X64-NEXT: addq %rdx, %rbp
840 ; X64-NEXT: adcq $0, %rcx
841 ; X64-NEXT: movq %r9, %rax
842 ; X64-NEXT: mulq %r15
843 ; X64-NEXT: movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
844 ; X64-NEXT: movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
845 ; X64-NEXT: addq %rax, %rbp
846 ; X64-NEXT: adcq %rdx, %rcx
847 ; X64-NEXT: setb %sil
848 ; X64-NEXT: movzbl %sil, %edi
849 ; X64-NEXT: addq %rax, %rcx
850 ; X64-NEXT: adcq %rdx, %rdi
851 ; X64-NEXT: movq %r12, %rax
853 ; X64-NEXT: movq %rdx, %r10
854 ; X64-NEXT: movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
855 ; X64-NEXT: movq %r14, %rax
857 ; X64-NEXT: movq %rdx, %rbx
858 ; X64-NEXT: movq %rax, %r13
859 ; X64-NEXT: addq %r10, %r13
860 ; X64-NEXT: adcq $0, %rbx
861 ; X64-NEXT: movq %r12, %rax
862 ; X64-NEXT: mulq %r15
863 ; X64-NEXT: movq %rdx, %rsi
864 ; X64-NEXT: addq %r13, %rax
865 ; X64-NEXT: movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
866 ; X64-NEXT: adcq %rbx, %rsi
867 ; X64-NEXT: setb %r8b
868 ; X64-NEXT: movq %r14, %rax
869 ; X64-NEXT: mulq %r15
870 ; X64-NEXT: movq %rdx, %rbx
871 ; X64-NEXT: addq %rsi, %rax
872 ; X64-NEXT: movzbl %r8b, %edx
873 ; X64-NEXT: adcq %rdx, %rbx
874 ; X64-NEXT: addq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Folded Reload
875 ; X64-NEXT: movq %rax, %rsi
876 ; X64-NEXT: adcq %rbp, %rbx
877 ; X64-NEXT: adcq $0, %rcx
878 ; X64-NEXT: adcq $0, %rdi
879 ; X64-NEXT: movq %r11, %rax
880 ; X64-NEXT: mulq %r12
881 ; X64-NEXT: movq %rdx, %r13
882 ; X64-NEXT: movq %rax, %r15
883 ; X64-NEXT: movq %r11, %rax
884 ; X64-NEXT: mulq %r14
885 ; X64-NEXT: movq %rax, %r14
886 ; X64-NEXT: movq %rax, %r8
887 ; X64-NEXT: movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
888 ; X64-NEXT: addq %r13, %r14
889 ; X64-NEXT: movq %rdx, %rbp
890 ; X64-NEXT: movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
891 ; X64-NEXT: adcq $0, %rbp
892 ; X64-NEXT: addq %r15, %r14
893 ; X64-NEXT: adcq %r13, %rbp
895 ; X64-NEXT: addq %r8, %rbp
896 ; X64-NEXT: movzbl %al, %r12d
897 ; X64-NEXT: adcq %rdx, %r12
898 ; X64-NEXT: addq %r15, %rsi
899 ; X64-NEXT: movq %rsi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
900 ; X64-NEXT: adcq %rbx, %r14
901 ; X64-NEXT: adcq $0, %rbp
902 ; X64-NEXT: adcq $0, %r12
903 ; X64-NEXT: addq %rcx, %rbp
904 ; X64-NEXT: adcq %rdi, %r12
906 ; X64-NEXT: movq %r9, %rax
907 ; X64-NEXT: mulq %r11
908 ; X64-NEXT: movq %rax, %r10
909 ; X64-NEXT: addq %rdx, %r10
910 ; X64-NEXT: movq %rdx, %rdi
911 ; X64-NEXT: adcq $0, %rdi
912 ; X64-NEXT: addq %rax, %r10
913 ; X64-NEXT: adcq %rdx, %rdi
915 ; X64-NEXT: addq %rax, %rdi
916 ; X64-NEXT: movzbl %bl, %esi
917 ; X64-NEXT: adcq %rdx, %rsi
918 ; X64-NEXT: addq %rax, %rbp
919 ; X64-NEXT: adcq %r12, %r10
920 ; X64-NEXT: movzbl %cl, %eax
921 ; X64-NEXT: adcq %rax, %rdi
922 ; X64-NEXT: adcq $0, %rsi
923 ; X64-NEXT: movq %rsi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
924 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload
925 ; X64-NEXT: movq %rsi, %r8
926 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload
927 ; X64-NEXT: addq %rax, %r8
928 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload
929 ; X64-NEXT: movq %rdx, %rcx
930 ; X64-NEXT: adcq $0, %rcx
931 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload
932 ; X64-NEXT: addq %rbx, %r8
933 ; X64-NEXT: adcq %rax, %rcx
935 ; X64-NEXT: addq %rsi, %rcx
936 ; X64-NEXT: movzbl %al, %esi
937 ; X64-NEXT: adcq %rdx, %rsi
938 ; X64-NEXT: movq %r9, %rax
939 ; X64-NEXT: imulq %r11
940 ; X64-NEXT: movq %rbx, %r11
941 ; X64-NEXT: addq %rax, %r11
942 ; X64-NEXT: movq %r8, %r12
943 ; X64-NEXT: adcq %rdx, %r12
944 ; X64-NEXT: addq %rcx, %r11
945 ; X64-NEXT: adcq %rsi, %r12
946 ; X64-NEXT: movq %r15, %r9
947 ; X64-NEXT: addq %r13, %r9
948 ; X64-NEXT: adcq $0, %r13
949 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload
950 ; X64-NEXT: addq %rcx, %r9
951 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload
952 ; X64-NEXT: adcq %rsi, %r13
954 ; X64-NEXT: addq %rcx, %r13
955 ; X64-NEXT: movzbl %bl, %ecx
956 ; X64-NEXT: adcq %rsi, %rcx
957 ; X64-NEXT: addq %r15, %rax
958 ; X64-NEXT: adcq %r9, %rdx
959 ; X64-NEXT: addq %r13, %rax
960 ; X64-NEXT: adcq %rcx, %rdx
961 ; X64-NEXT: addq {{[-0-9]+}}(%r{{[sb]}}p), %r15 # 8-byte Folded Reload
962 ; X64-NEXT: adcq %r8, %r9
963 ; X64-NEXT: adcq %r11, %rax
964 ; X64-NEXT: adcq %r12, %rdx
965 ; X64-NEXT: addq %rbp, %r15
966 ; X64-NEXT: adcq %r10, %r9
967 ; X64-NEXT: adcq %rdi, %rax
968 ; X64-NEXT: adcq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Folded Reload
969 ; X64-NEXT: movq %r14, %rcx
970 ; X64-NEXT: sarq $63, %rcx
971 ; X64-NEXT: xorq %rcx, %rdx
972 ; X64-NEXT: xorq %rcx, %r9
973 ; X64-NEXT: orq %rdx, %r9
974 ; X64-NEXT: xorq %rcx, %rax
975 ; X64-NEXT: xorq %r15, %rcx
976 ; X64-NEXT: orq %rax, %rcx
977 ; X64-NEXT: orq %r9, %rcx
978 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload
979 ; X64-NEXT: movl %eax, %esi
980 ; X64-NEXT: andl $1, %esi
981 ; X64-NEXT: movq %rsi, %rdx
982 ; X64-NEXT: negq %rdx
983 ; X64-NEXT: xorq %rdx, %r14
984 ; X64-NEXT: xorq %rax, %rdx
985 ; X64-NEXT: orq %r14, %rdx
986 ; X64-NEXT: orq %rcx, %rdx
987 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload
988 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload
989 ; X64-NEXT: movq %rcx, 8(%rax)
990 ; X64-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload
991 ; X64-NEXT: movq %rcx, (%rax)
992 ; X64-NEXT: movb %sil, 16(%rax)
993 ; X64-NEXT: setne 32(%rax)
994 ; X64-NEXT: popq %rbx
995 ; X64-NEXT: popq %r12
996 ; X64-NEXT: popq %r13
997 ; X64-NEXT: popq %r14
998 ; X64-NEXT: popq %r15
999 ; X64-NEXT: popq %rbp
1001 %r = tail call { i129, i1 } @llvm.smul.with.overflow.i129(i129 %x, i129 %y)