1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=X64
3 ; RUN: llc < %s -mtriple=i686 -mattr=cmov | FileCheck %s --check-prefix=X86
5 declare i4 @llvm.umul.fix.sat.i4 (i4, i4, i32)
6 declare i32 @llvm.umul.fix.sat.i32 (i32, i32, i32)
7 declare i64 @llvm.umul.fix.sat.i64 (i64, i64, i32)
8 declare <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32>, <4 x i32>, i32)
10 define i32 @func(i32 %x, i32 %y) nounwind {
13 ; X64-NEXT: movl %esi, %eax
14 ; X64-NEXT: movl %edi, %ecx
15 ; X64-NEXT: imulq %rax, %rcx
16 ; X64-NEXT: movq %rcx, %rax
17 ; X64-NEXT: shrq $32, %rax
18 ; X64-NEXT: shrdl $2, %eax, %ecx
19 ; X64-NEXT: cmpl $4, %eax
20 ; X64-NEXT: movl $-1, %eax
21 ; X64-NEXT: cmovbl %ecx, %eax
26 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
27 ; X86-NEXT: mull {{[0-9]+}}(%esp)
28 ; X86-NEXT: shrdl $2, %edx, %eax
29 ; X86-NEXT: cmpl $4, %edx
30 ; X86-NEXT: movl $-1, %ecx
31 ; X86-NEXT: cmovael %ecx, %eax
33 %tmp = call i32 @llvm.umul.fix.sat.i32(i32 %x, i32 %y, i32 2)
37 define i64 @func2(i64 %x, i64 %y) nounwind {
40 ; X64-NEXT: movq %rdi, %rax
42 ; X64-NEXT: shrdq $2, %rdx, %rax
43 ; X64-NEXT: cmpq $4, %rdx
44 ; X64-NEXT: movq $-1, %rcx
45 ; X64-NEXT: cmovaeq %rcx, %rax
50 ; X86-NEXT: pushl %ebp
51 ; X86-NEXT: pushl %ebx
52 ; X86-NEXT: pushl %edi
53 ; X86-NEXT: pushl %esi
54 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
55 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
56 ; X86-NEXT: movl %ecx, %eax
58 ; X86-NEXT: movl %edx, %esi
59 ; X86-NEXT: movl %eax, %ebx
60 ; X86-NEXT: movl %ecx, %eax
61 ; X86-NEXT: mull {{[0-9]+}}(%esp)
62 ; X86-NEXT: movl %eax, %ecx
63 ; X86-NEXT: addl %edx, %ebx
64 ; X86-NEXT: adcl $0, %esi
65 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
67 ; X86-NEXT: movl %edx, %edi
68 ; X86-NEXT: movl %eax, %ebp
69 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
70 ; X86-NEXT: mull {{[0-9]+}}(%esp)
71 ; X86-NEXT: addl %ebx, %eax
72 ; X86-NEXT: adcl %esi, %edx
73 ; X86-NEXT: adcl $0, %edi
74 ; X86-NEXT: addl %ebp, %edx
75 ; X86-NEXT: adcl $0, %edi
76 ; X86-NEXT: shrdl $2, %eax, %ecx
77 ; X86-NEXT: shrdl $2, %edx, %eax
78 ; X86-NEXT: shrl $2, %edx
79 ; X86-NEXT: orl %edi, %edx
80 ; X86-NEXT: movl $-1, %edx
81 ; X86-NEXT: cmovnel %edx, %ecx
82 ; X86-NEXT: cmovel %eax, %edx
83 ; X86-NEXT: movl %ecx, %eax
89 %tmp = call i64 @llvm.umul.fix.sat.i64(i64 %x, i64 %y, i32 2)
93 define i4 @func3(i4 %x, i4 %y) nounwind {
96 ; X64-NEXT: andl $15, %esi
97 ; X64-NEXT: shlb $4, %dil
98 ; X64-NEXT: movzbl %dil, %eax
99 ; X64-NEXT: imull %esi, %eax
100 ; X64-NEXT: movl %eax, %ecx
101 ; X64-NEXT: shrb $2, %cl
102 ; X64-NEXT: shrl $8, %eax
103 ; X64-NEXT: movl %eax, %edx
104 ; X64-NEXT: shlb $6, %dl
105 ; X64-NEXT: orb %cl, %dl
106 ; X64-NEXT: movzbl %dl, %ecx
107 ; X64-NEXT: cmpb $4, %al
108 ; X64-NEXT: movl $255, %eax
109 ; X64-NEXT: cmovbl %ecx, %eax
110 ; X64-NEXT: shrb $4, %al
111 ; X64-NEXT: # kill: def $al killed $al killed $eax
116 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
117 ; X86-NEXT: andb $15, %al
118 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
119 ; X86-NEXT: movzbl %al, %edx
120 ; X86-NEXT: shlb $4, %cl
121 ; X86-NEXT: movzbl %cl, %eax
122 ; X86-NEXT: imull %edx, %eax
123 ; X86-NEXT: movb %ah, %cl
124 ; X86-NEXT: shlb $6, %cl
125 ; X86-NEXT: shrb $2, %al
126 ; X86-NEXT: orb %cl, %al
127 ; X86-NEXT: movzbl %al, %ecx
128 ; X86-NEXT: cmpb $4, %ah
129 ; X86-NEXT: movl $255, %eax
130 ; X86-NEXT: cmovbl %ecx, %eax
131 ; X86-NEXT: shrb $4, %al
132 ; X86-NEXT: # kill: def $al killed $al killed $eax
134 %tmp = call i4 @llvm.umul.fix.sat.i4(i4 %x, i4 %y, i32 2)
138 define <4 x i32> @vec(<4 x i32> %x, <4 x i32> %y) nounwind {
141 ; X64-NEXT: pshufd {{.*#+}} xmm2 = xmm1[3,3,3,3]
142 ; X64-NEXT: movd %xmm2, %eax
143 ; X64-NEXT: pshufd {{.*#+}} xmm2 = xmm0[3,3,3,3]
144 ; X64-NEXT: movd %xmm2, %ecx
145 ; X64-NEXT: imulq %rax, %rcx
146 ; X64-NEXT: movq %rcx, %rax
147 ; X64-NEXT: shrq $32, %rax
148 ; X64-NEXT: shrdl $2, %eax, %ecx
149 ; X64-NEXT: cmpl $4, %eax
150 ; X64-NEXT: movl $-1, %eax
151 ; X64-NEXT: cmovael %eax, %ecx
152 ; X64-NEXT: movd %ecx, %xmm2
153 ; X64-NEXT: pshufd {{.*#+}} xmm3 = xmm1[2,3,2,3]
154 ; X64-NEXT: movd %xmm3, %ecx
155 ; X64-NEXT: pshufd {{.*#+}} xmm3 = xmm0[2,3,2,3]
156 ; X64-NEXT: movd %xmm3, %edx
157 ; X64-NEXT: imulq %rcx, %rdx
158 ; X64-NEXT: movq %rdx, %rcx
159 ; X64-NEXT: shrq $32, %rcx
160 ; X64-NEXT: shrdl $2, %ecx, %edx
161 ; X64-NEXT: cmpl $4, %ecx
162 ; X64-NEXT: cmovael %eax, %edx
163 ; X64-NEXT: movd %edx, %xmm3
164 ; X64-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
165 ; X64-NEXT: movd %xmm1, %ecx
166 ; X64-NEXT: movd %xmm0, %edx
167 ; X64-NEXT: imulq %rcx, %rdx
168 ; X64-NEXT: movq %rdx, %rcx
169 ; X64-NEXT: shrq $32, %rcx
170 ; X64-NEXT: shrdl $2, %ecx, %edx
171 ; X64-NEXT: cmpl $4, %ecx
172 ; X64-NEXT: cmovael %eax, %edx
173 ; X64-NEXT: movd %edx, %xmm2
174 ; X64-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,1,1]
175 ; X64-NEXT: movd %xmm1, %ecx
176 ; X64-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
177 ; X64-NEXT: movd %xmm0, %edx
178 ; X64-NEXT: imulq %rcx, %rdx
179 ; X64-NEXT: movq %rdx, %rcx
180 ; X64-NEXT: shrq $32, %rcx
181 ; X64-NEXT: shrdl $2, %ecx, %edx
182 ; X64-NEXT: cmpl $4, %ecx
183 ; X64-NEXT: cmovael %eax, %edx
184 ; X64-NEXT: movd %edx, %xmm0
185 ; X64-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
186 ; X64-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm3[0]
187 ; X64-NEXT: movdqa %xmm2, %xmm0
192 ; X86-NEXT: pushl %ebp
193 ; X86-NEXT: pushl %ebx
194 ; X86-NEXT: pushl %edi
195 ; X86-NEXT: pushl %esi
196 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
197 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
198 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
199 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
200 ; X86-NEXT: mull {{[0-9]+}}(%esp)
201 ; X86-NEXT: movl %eax, %esi
202 ; X86-NEXT: shrdl $2, %edx, %esi
203 ; X86-NEXT: cmpl $4, %edx
204 ; X86-NEXT: movl $-1, %ecx
205 ; X86-NEXT: cmovael %ecx, %esi
206 ; X86-NEXT: movl %ebx, %eax
207 ; X86-NEXT: mull {{[0-9]+}}(%esp)
208 ; X86-NEXT: movl %eax, %ebx
209 ; X86-NEXT: shrdl $2, %edx, %ebx
210 ; X86-NEXT: cmpl $4, %edx
211 ; X86-NEXT: cmovael %ecx, %ebx
212 ; X86-NEXT: movl %ebp, %eax
213 ; X86-NEXT: mull {{[0-9]+}}(%esp)
214 ; X86-NEXT: movl %eax, %ebp
215 ; X86-NEXT: shrdl $2, %edx, %ebp
216 ; X86-NEXT: cmpl $4, %edx
217 ; X86-NEXT: cmovael %ecx, %ebp
218 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
219 ; X86-NEXT: mull {{[0-9]+}}(%esp)
220 ; X86-NEXT: shrdl $2, %edx, %eax
221 ; X86-NEXT: cmpl $4, %edx
222 ; X86-NEXT: cmovael %ecx, %eax
223 ; X86-NEXT: movl %eax, 12(%edi)
224 ; X86-NEXT: movl %ebp, 8(%edi)
225 ; X86-NEXT: movl %ebx, 4(%edi)
226 ; X86-NEXT: movl %esi, (%edi)
227 ; X86-NEXT: movl %edi, %eax
228 ; X86-NEXT: popl %esi
229 ; X86-NEXT: popl %edi
230 ; X86-NEXT: popl %ebx
231 ; X86-NEXT: popl %ebp
233 %tmp = call <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32> %x, <4 x i32> %y, i32 2)
237 ; These result in regular integer multiplication
238 define i32 @func4(i32 %x, i32 %y) nounwind {
241 ; X64-NEXT: movl %edi, %eax
242 ; X64-NEXT: mull %esi
243 ; X64-NEXT: movl $-1, %ecx
244 ; X64-NEXT: cmovol %ecx, %eax
249 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
250 ; X86-NEXT: mull {{[0-9]+}}(%esp)
251 ; X86-NEXT: movl $-1, %ecx
252 ; X86-NEXT: cmovol %ecx, %eax
254 %tmp = call i32 @llvm.umul.fix.sat.i32(i32 %x, i32 %y, i32 0)
258 define i64 @func5(i64 %x, i64 %y) {
261 ; X64-NEXT: movq %rdi, %rax
262 ; X64-NEXT: mulq %rsi
263 ; X64-NEXT: movq $-1, %rcx
264 ; X64-NEXT: cmovoq %rcx, %rax
269 ; X86-NEXT: pushl %ebp
270 ; X86-NEXT: .cfi_def_cfa_offset 8
271 ; X86-NEXT: pushl %ebx
272 ; X86-NEXT: .cfi_def_cfa_offset 12
273 ; X86-NEXT: pushl %edi
274 ; X86-NEXT: .cfi_def_cfa_offset 16
275 ; X86-NEXT: pushl %esi
276 ; X86-NEXT: .cfi_def_cfa_offset 20
277 ; X86-NEXT: .cfi_offset %esi, -20
278 ; X86-NEXT: .cfi_offset %edi, -16
279 ; X86-NEXT: .cfi_offset %ebx, -12
280 ; X86-NEXT: .cfi_offset %ebp, -8
281 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
282 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
283 ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
284 ; X86-NEXT: testl %esi, %esi
285 ; X86-NEXT: setne %dl
286 ; X86-NEXT: testl %eax, %eax
287 ; X86-NEXT: setne %cl
288 ; X86-NEXT: andb %dl, %cl
289 ; X86-NEXT: mull {{[0-9]+}}(%esp)
290 ; X86-NEXT: movl %eax, %edi
292 ; X86-NEXT: movl %esi, %eax
293 ; X86-NEXT: mull %ebp
295 ; X86-NEXT: orb %bl, %ch
296 ; X86-NEXT: orb %cl, %ch
297 ; X86-NEXT: leal (%edi,%eax), %esi
298 ; X86-NEXT: movl %ebp, %eax
299 ; X86-NEXT: mull {{[0-9]+}}(%esp)
300 ; X86-NEXT: addl %esi, %edx
302 ; X86-NEXT: orb %ch, %cl
303 ; X86-NEXT: movl $-1, %ecx
304 ; X86-NEXT: cmovnel %ecx, %eax
305 ; X86-NEXT: cmovnel %ecx, %edx
306 ; X86-NEXT: popl %esi
307 ; X86-NEXT: .cfi_def_cfa_offset 16
308 ; X86-NEXT: popl %edi
309 ; X86-NEXT: .cfi_def_cfa_offset 12
310 ; X86-NEXT: popl %ebx
311 ; X86-NEXT: .cfi_def_cfa_offset 8
312 ; X86-NEXT: popl %ebp
313 ; X86-NEXT: .cfi_def_cfa_offset 4
315 %tmp = call i64 @llvm.umul.fix.sat.i64(i64 %x, i64 %y, i32 0)
319 define i4 @func6(i4 %x, i4 %y) nounwind {
322 ; X64-NEXT: movl %edi, %eax
323 ; X64-NEXT: andb $15, %sil
324 ; X64-NEXT: shlb $4, %al
325 ; X64-NEXT: # kill: def $al killed $al killed $eax
326 ; X64-NEXT: mulb %sil
327 ; X64-NEXT: movzbl %al, %ecx
328 ; X64-NEXT: movl $255, %eax
329 ; X64-NEXT: cmovnol %ecx, %eax
330 ; X64-NEXT: shrb $4, %al
331 ; X64-NEXT: # kill: def $al killed $al killed $eax
336 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
337 ; X86-NEXT: andb $15, %cl
338 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
339 ; X86-NEXT: shlb $4, %al
341 ; X86-NEXT: movzbl %al, %ecx
342 ; X86-NEXT: movl $255, %eax
343 ; X86-NEXT: cmovnol %ecx, %eax
344 ; X86-NEXT: shrb $4, %al
345 ; X86-NEXT: # kill: def $al killed $al killed $eax
347 %tmp = call i4 @llvm.umul.fix.sat.i4(i4 %x, i4 %y, i32 0)
351 define <4 x i32> @vec2(<4 x i32> %x, <4 x i32> %y) nounwind {
354 ; X64-NEXT: pshufd {{.*#+}} xmm2 = xmm0[3,3,3,3]
355 ; X64-NEXT: movd %xmm2, %eax
356 ; X64-NEXT: pshufd {{.*#+}} xmm2 = xmm1[3,3,3,3]
357 ; X64-NEXT: movd %xmm2, %ecx
358 ; X64-NEXT: mull %ecx
359 ; X64-NEXT: movl $-1, %ecx
360 ; X64-NEXT: cmovol %ecx, %eax
361 ; X64-NEXT: movd %eax, %xmm2
362 ; X64-NEXT: pshufd {{.*#+}} xmm3 = xmm0[2,3,2,3]
363 ; X64-NEXT: movd %xmm3, %eax
364 ; X64-NEXT: pshufd {{.*#+}} xmm3 = xmm1[2,3,2,3]
365 ; X64-NEXT: movd %xmm3, %edx
366 ; X64-NEXT: mull %edx
367 ; X64-NEXT: cmovol %ecx, %eax
368 ; X64-NEXT: movd %eax, %xmm3
369 ; X64-NEXT: punpckldq {{.*#+}} xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
370 ; X64-NEXT: movd %xmm0, %eax
371 ; X64-NEXT: movd %xmm1, %edx
372 ; X64-NEXT: mull %edx
373 ; X64-NEXT: cmovol %ecx, %eax
374 ; X64-NEXT: movd %eax, %xmm2
375 ; X64-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
376 ; X64-NEXT: movd %xmm0, %eax
377 ; X64-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,1,1,1]
378 ; X64-NEXT: movd %xmm0, %edx
379 ; X64-NEXT: mull %edx
380 ; X64-NEXT: cmovol %ecx, %eax
381 ; X64-NEXT: movd %eax, %xmm0
382 ; X64-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
383 ; X64-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm3[0]
384 ; X64-NEXT: movdqa %xmm2, %xmm0
389 ; X86-NEXT: pushl %ebp
390 ; X86-NEXT: pushl %ebx
391 ; X86-NEXT: pushl %edi
392 ; X86-NEXT: pushl %esi
393 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
394 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
395 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
396 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
397 ; X86-NEXT: mull {{[0-9]+}}(%esp)
398 ; X86-NEXT: movl %eax, %esi
399 ; X86-NEXT: movl $-1, %edi
400 ; X86-NEXT: cmovol %edi, %esi
401 ; X86-NEXT: movl %ebx, %eax
402 ; X86-NEXT: mull {{[0-9]+}}(%esp)
403 ; X86-NEXT: movl %eax, %ebx
404 ; X86-NEXT: cmovol %edi, %ebx
405 ; X86-NEXT: movl %ebp, %eax
406 ; X86-NEXT: mull {{[0-9]+}}(%esp)
407 ; X86-NEXT: movl %eax, %ebp
408 ; X86-NEXT: cmovol %edi, %ebp
409 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
410 ; X86-NEXT: mull {{[0-9]+}}(%esp)
411 ; X86-NEXT: cmovol %edi, %eax
412 ; X86-NEXT: movl %eax, 12(%ecx)
413 ; X86-NEXT: movl %ebp, 8(%ecx)
414 ; X86-NEXT: movl %ebx, 4(%ecx)
415 ; X86-NEXT: movl %esi, (%ecx)
416 ; X86-NEXT: movl %ecx, %eax
417 ; X86-NEXT: popl %esi
418 ; X86-NEXT: popl %edi
419 ; X86-NEXT: popl %ebx
420 ; X86-NEXT: popl %ebp
422 %tmp = call <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32> %x, <4 x i32> %y, i32 0)
426 define i64 @func7(i64 %x, i64 %y) nounwind {
429 ; X64-NEXT: movq %rdi, %rax
430 ; X64-NEXT: mulq %rsi
431 ; X64-NEXT: shrdq $32, %rdx, %rax
432 ; X64-NEXT: movl $4294967295, %ecx # imm = 0xFFFFFFFF
433 ; X64-NEXT: cmpq %rcx, %rdx
434 ; X64-NEXT: movq $-1, %rcx
435 ; X64-NEXT: cmovaq %rcx, %rax
440 ; X86-NEXT: pushl %ebp
441 ; X86-NEXT: pushl %ebx
442 ; X86-NEXT: pushl %edi
443 ; X86-NEXT: pushl %esi
444 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
445 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
446 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
447 ; X86-NEXT: movl %edi, %eax
448 ; X86-NEXT: mull %ebp
449 ; X86-NEXT: movl %edx, %ecx
450 ; X86-NEXT: movl %eax, %esi
451 ; X86-NEXT: movl %edi, %eax
452 ; X86-NEXT: mull %ebx
453 ; X86-NEXT: addl %edx, %esi
454 ; X86-NEXT: adcl $0, %ecx
455 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
456 ; X86-NEXT: mull %ebp
457 ; X86-NEXT: movl %edx, %edi
458 ; X86-NEXT: movl %eax, %ebp
459 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
460 ; X86-NEXT: mull %ebx
461 ; X86-NEXT: addl %esi, %eax
462 ; X86-NEXT: adcl %ecx, %edx
463 ; X86-NEXT: adcl $0, %edi
464 ; X86-NEXT: addl %ebp, %edx
465 ; X86-NEXT: adcl $0, %edi
466 ; X86-NEXT: xorl %ecx, %ecx
467 ; X86-NEXT: negl %edi
468 ; X86-NEXT: sbbl %ecx, %ecx
469 ; X86-NEXT: orl %ecx, %eax
470 ; X86-NEXT: orl %ecx, %edx
471 ; X86-NEXT: popl %esi
472 ; X86-NEXT: popl %edi
473 ; X86-NEXT: popl %ebx
474 ; X86-NEXT: popl %ebp
476 %tmp = call i64 @llvm.umul.fix.sat.i64(i64 %x, i64 %y, i32 32)
480 define i64 @func8(i64 %x, i64 %y) nounwind {
483 ; X64-NEXT: movq %rdi, %rax
484 ; X64-NEXT: mulq %rsi
485 ; X64-NEXT: shrdq $63, %rdx, %rax
486 ; X64-NEXT: movabsq $9223372036854775807, %rcx # imm = 0x7FFFFFFFFFFFFFFF
487 ; X64-NEXT: cmpq %rcx, %rdx
488 ; X64-NEXT: movq $-1, %rcx
489 ; X64-NEXT: cmovaq %rcx, %rax
494 ; X86-NEXT: pushl %ebp
495 ; X86-NEXT: pushl %ebx
496 ; X86-NEXT: pushl %edi
497 ; X86-NEXT: pushl %esi
498 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
499 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
500 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
501 ; X86-NEXT: movl %ecx, %eax
502 ; X86-NEXT: mull %ebp
503 ; X86-NEXT: movl %edx, %esi
504 ; X86-NEXT: movl %eax, %edi
505 ; X86-NEXT: movl %ecx, %eax
506 ; X86-NEXT: mull %ebx
507 ; X86-NEXT: addl %edx, %edi
508 ; X86-NEXT: adcl $0, %esi
509 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
510 ; X86-NEXT: mull %ebp
511 ; X86-NEXT: movl %edx, %ecx
512 ; X86-NEXT: movl %eax, %ebp
513 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
514 ; X86-NEXT: mull %ebx
515 ; X86-NEXT: addl %edi, %eax
516 ; X86-NEXT: adcl %esi, %edx
517 ; X86-NEXT: adcl $0, %ecx
518 ; X86-NEXT: addl %ebp, %edx
519 ; X86-NEXT: adcl $0, %ecx
520 ; X86-NEXT: shldl $1, %edx, %ecx
521 ; X86-NEXT: shrdl $31, %edx, %eax
522 ; X86-NEXT: testl $-2147483648, %edx # imm = 0x80000000
523 ; X86-NEXT: movl $-1, %edx
524 ; X86-NEXT: cmovnel %edx, %eax
525 ; X86-NEXT: cmovnel %edx, %ecx
526 ; X86-NEXT: movl %ecx, %edx
527 ; X86-NEXT: popl %esi
528 ; X86-NEXT: popl %edi
529 ; X86-NEXT: popl %ebx
530 ; X86-NEXT: popl %ebp
532 %tmp = call i64 @llvm.umul.fix.sat.i64(i64 %x, i64 %y, i32 63)