1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-darwin-unknown < %s | FileCheck %s --check-prefix=SDAG
3 ; RUN: llc -mtriple=x86_64-darwin-unknown -fast-isel -fast-isel-abort=1 < %s | FileCheck %s --check-prefix=FAST
4 ; RUN: llc -mtriple=x86_64-darwin-unknown -mcpu=knl < %s | FileCheck %s --check-prefix=KNL
6 define {i64, i1} @t1() nounwind {
9 ; SDAG-NEXT: movl $8, %ecx
10 ; SDAG-NEXT: movl $9, %eax
11 ; SDAG-NEXT: mulq %rcx
17 ; FAST-NEXT: movl $8, %ecx
18 ; FAST-NEXT: movl $9, %eax
19 ; FAST-NEXT: mulq %rcx
25 ; KNL-NEXT: movl $8, %ecx
26 ; KNL-NEXT: movl $9, %eax
30 %1 = call {i64, i1} @llvm.umul.with.overflow.i64(i64 9, i64 8)
34 define {i64, i1} @t2() nounwind {
37 ; SDAG-NEXT: xorl %ecx, %ecx
38 ; SDAG-NEXT: movl $9, %eax
39 ; SDAG-NEXT: mulq %rcx
45 ; FAST-NEXT: xorl %ecx, %ecx
46 ; FAST-NEXT: movl $9, %eax
47 ; FAST-NEXT: mulq %rcx
53 ; KNL-NEXT: xorl %ecx, %ecx
54 ; KNL-NEXT: movl $9, %eax
58 %1 = call {i64, i1} @llvm.umul.with.overflow.i64(i64 9, i64 0)
62 define {i64, i1} @t3() nounwind {
65 ; SDAG-NEXT: movq $-1, %rcx
66 ; SDAG-NEXT: movl $9, %eax
67 ; SDAG-NEXT: mulq %rcx
73 ; FAST-NEXT: movq $-1, %rcx
74 ; FAST-NEXT: movl $9, %eax
75 ; FAST-NEXT: mulq %rcx
81 ; KNL-NEXT: movq $-1, %rcx
82 ; KNL-NEXT: movl $9, %eax
86 %1 = call {i64, i1} @llvm.umul.with.overflow.i64(i64 9, i64 -1)
91 define zeroext i1 @smuloi8(i8 %v1, i8 %v2, i8* %res) {
92 ; SDAG-LABEL: smuloi8:
94 ; SDAG-NEXT: movl %edi, %eax
95 ; SDAG-NEXT: imulb %sil
97 ; SDAG-NEXT: movb %al, (%rdx)
98 ; SDAG-NEXT: movl %ecx, %eax
101 ; FAST-LABEL: smuloi8:
103 ; FAST-NEXT: movl %edi, %eax
104 ; FAST-NEXT: imulb %sil
105 ; FAST-NEXT: seto %cl
106 ; FAST-NEXT: movb %al, (%rdx)
107 ; FAST-NEXT: andb $1, %cl
108 ; FAST-NEXT: movzbl %cl, %eax
111 ; KNL-LABEL: smuloi8:
113 ; KNL-NEXT: movl %edi, %eax
114 ; KNL-NEXT: imulb %sil
116 ; KNL-NEXT: movb %al, (%rdx)
117 ; KNL-NEXT: movl %ecx, %eax
119 %t = call {i8, i1} @llvm.smul.with.overflow.i8(i8 %v1, i8 %v2)
120 %val = extractvalue {i8, i1} %t, 0
121 %obit = extractvalue {i8, i1} %t, 1
122 store i8 %val, i8* %res
126 define zeroext i1 @smuloi16(i16 %v1, i16 %v2, i16* %res) {
127 ; SDAG-LABEL: smuloi16:
129 ; SDAG-NEXT: imulw %si, %di
130 ; SDAG-NEXT: seto %al
131 ; SDAG-NEXT: movw %di, (%rdx)
134 ; FAST-LABEL: smuloi16:
136 ; FAST-NEXT: imulw %si, %di
137 ; FAST-NEXT: seto %al
138 ; FAST-NEXT: movw %di, (%rdx)
139 ; FAST-NEXT: andb $1, %al
140 ; FAST-NEXT: movzbl %al, %eax
143 ; KNL-LABEL: smuloi16:
145 ; KNL-NEXT: imulw %si, %di
147 ; KNL-NEXT: movw %di, (%rdx)
149 %t = call {i16, i1} @llvm.smul.with.overflow.i16(i16 %v1, i16 %v2)
150 %val = extractvalue {i16, i1} %t, 0
151 %obit = extractvalue {i16, i1} %t, 1
152 store i16 %val, i16* %res
156 define zeroext i1 @smuloi32(i32 %v1, i32 %v2, i32* %res) {
157 ; SDAG-LABEL: smuloi32:
159 ; SDAG-NEXT: imull %esi, %edi
160 ; SDAG-NEXT: seto %al
161 ; SDAG-NEXT: movl %edi, (%rdx)
164 ; FAST-LABEL: smuloi32:
166 ; FAST-NEXT: imull %esi, %edi
167 ; FAST-NEXT: seto %al
168 ; FAST-NEXT: movl %edi, (%rdx)
169 ; FAST-NEXT: andb $1, %al
170 ; FAST-NEXT: movzbl %al, %eax
173 ; KNL-LABEL: smuloi32:
175 ; KNL-NEXT: imull %esi, %edi
177 ; KNL-NEXT: movl %edi, (%rdx)
179 %t = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %v1, i32 %v2)
180 %val = extractvalue {i32, i1} %t, 0
181 %obit = extractvalue {i32, i1} %t, 1
182 store i32 %val, i32* %res
186 define zeroext i1 @smuloi64(i64 %v1, i64 %v2, i64* %res) {
187 ; SDAG-LABEL: smuloi64:
189 ; SDAG-NEXT: imulq %rsi, %rdi
190 ; SDAG-NEXT: seto %al
191 ; SDAG-NEXT: movq %rdi, (%rdx)
194 ; FAST-LABEL: smuloi64:
196 ; FAST-NEXT: imulq %rsi, %rdi
197 ; FAST-NEXT: seto %al
198 ; FAST-NEXT: movq %rdi, (%rdx)
199 ; FAST-NEXT: andb $1, %al
200 ; FAST-NEXT: movzbl %al, %eax
203 ; KNL-LABEL: smuloi64:
205 ; KNL-NEXT: imulq %rsi, %rdi
207 ; KNL-NEXT: movq %rdi, (%rdx)
209 %t = call {i64, i1} @llvm.smul.with.overflow.i64(i64 %v1, i64 %v2)
210 %val = extractvalue {i64, i1} %t, 0
211 %obit = extractvalue {i64, i1} %t, 1
212 store i64 %val, i64* %res
217 define zeroext i1 @umuloi8(i8 %v1, i8 %v2, i8* %res) {
218 ; SDAG-LABEL: umuloi8:
220 ; SDAG-NEXT: movl %edi, %eax
221 ; SDAG-NEXT: mulb %sil
222 ; SDAG-NEXT: seto %cl
223 ; SDAG-NEXT: movb %al, (%rdx)
224 ; SDAG-NEXT: movl %ecx, %eax
227 ; FAST-LABEL: umuloi8:
229 ; FAST-NEXT: movl %edi, %eax
230 ; FAST-NEXT: mulb %sil
231 ; FAST-NEXT: seto %cl
232 ; FAST-NEXT: movb %al, (%rdx)
233 ; FAST-NEXT: andb $1, %cl
234 ; FAST-NEXT: movzbl %cl, %eax
237 ; KNL-LABEL: umuloi8:
239 ; KNL-NEXT: movl %edi, %eax
240 ; KNL-NEXT: mulb %sil
242 ; KNL-NEXT: movb %al, (%rdx)
243 ; KNL-NEXT: movl %ecx, %eax
245 %t = call {i8, i1} @llvm.umul.with.overflow.i8(i8 %v1, i8 %v2)
246 %val = extractvalue {i8, i1} %t, 0
247 %obit = extractvalue {i8, i1} %t, 1
248 store i8 %val, i8* %res
252 define zeroext i1 @umuloi16(i16 %v1, i16 %v2, i16* %res) {
253 ; SDAG-LABEL: umuloi16:
255 ; SDAG-NEXT: movq %rdx, %rcx
256 ; SDAG-NEXT: movl %edi, %eax
257 ; SDAG-NEXT: mulw %si
258 ; SDAG-NEXT: seto %dl
259 ; SDAG-NEXT: movw %ax, (%rcx)
260 ; SDAG-NEXT: movl %edx, %eax
263 ; FAST-LABEL: umuloi16:
265 ; FAST-NEXT: movq %rdx, %rcx
266 ; FAST-NEXT: movl %edi, %eax
267 ; FAST-NEXT: mulw %si
268 ; FAST-NEXT: seto %dl
269 ; FAST-NEXT: movw %ax, (%rcx)
270 ; FAST-NEXT: andb $1, %dl
271 ; FAST-NEXT: movzbl %dl, %eax
274 ; KNL-LABEL: umuloi16:
276 ; KNL-NEXT: movq %rdx, %rcx
277 ; KNL-NEXT: movl %edi, %eax
280 ; KNL-NEXT: movw %ax, (%rcx)
281 ; KNL-NEXT: movl %edx, %eax
283 %t = call {i16, i1} @llvm.umul.with.overflow.i16(i16 %v1, i16 %v2)
284 %val = extractvalue {i16, i1} %t, 0
285 %obit = extractvalue {i16, i1} %t, 1
286 store i16 %val, i16* %res
290 define zeroext i1 @umuloi32(i32 %v1, i32 %v2, i32* %res) {
291 ; SDAG-LABEL: umuloi32:
293 ; SDAG-NEXT: movq %rdx, %rcx
294 ; SDAG-NEXT: movl %edi, %eax
295 ; SDAG-NEXT: mull %esi
296 ; SDAG-NEXT: seto %dl
297 ; SDAG-NEXT: movl %eax, (%rcx)
298 ; SDAG-NEXT: movl %edx, %eax
301 ; FAST-LABEL: umuloi32:
303 ; FAST-NEXT: movq %rdx, %rcx
304 ; FAST-NEXT: movl %edi, %eax
305 ; FAST-NEXT: mull %esi
306 ; FAST-NEXT: seto %dl
307 ; FAST-NEXT: movl %eax, (%rcx)
308 ; FAST-NEXT: andb $1, %dl
309 ; FAST-NEXT: movzbl %dl, %eax
312 ; KNL-LABEL: umuloi32:
314 ; KNL-NEXT: movq %rdx, %rcx
315 ; KNL-NEXT: movl %edi, %eax
316 ; KNL-NEXT: mull %esi
318 ; KNL-NEXT: movl %eax, (%rcx)
319 ; KNL-NEXT: movl %edx, %eax
321 %t = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %v1, i32 %v2)
322 %val = extractvalue {i32, i1} %t, 0
323 %obit = extractvalue {i32, i1} %t, 1
324 store i32 %val, i32* %res
328 define zeroext i1 @umuloi64(i64 %v1, i64 %v2, i64* %res) {
329 ; SDAG-LABEL: umuloi64:
331 ; SDAG-NEXT: movq %rdx, %rcx
332 ; SDAG-NEXT: movq %rdi, %rax
333 ; SDAG-NEXT: mulq %rsi
334 ; SDAG-NEXT: seto %dl
335 ; SDAG-NEXT: movq %rax, (%rcx)
336 ; SDAG-NEXT: movl %edx, %eax
339 ; FAST-LABEL: umuloi64:
341 ; FAST-NEXT: movq %rdx, %rcx
342 ; FAST-NEXT: movq %rdi, %rax
343 ; FAST-NEXT: mulq %rsi
344 ; FAST-NEXT: seto %dl
345 ; FAST-NEXT: movq %rax, (%rcx)
346 ; FAST-NEXT: andb $1, %dl
347 ; FAST-NEXT: movzbl %dl, %eax
350 ; KNL-LABEL: umuloi64:
352 ; KNL-NEXT: movq %rdx, %rcx
353 ; KNL-NEXT: movq %rdi, %rax
354 ; KNL-NEXT: mulq %rsi
356 ; KNL-NEXT: movq %rax, (%rcx)
357 ; KNL-NEXT: movl %edx, %eax
359 %t = call {i64, i1} @llvm.umul.with.overflow.i64(i64 %v1, i64 %v2)
360 %val = extractvalue {i64, i1} %t, 0
361 %obit = extractvalue {i64, i1} %t, 1
362 store i64 %val, i64* %res
367 ; Check the use of the overflow bit in combination with a select instruction.
369 define i32 @smuloselecti32(i32 %v1, i32 %v2) {
370 ; SDAG-LABEL: smuloselecti32:
372 ; SDAG-NEXT: movl %edi, %eax
373 ; SDAG-NEXT: imull %esi, %eax
374 ; SDAG-NEXT: cmovol %edi, %esi
375 ; SDAG-NEXT: movl %esi, %eax
378 ; FAST-LABEL: smuloselecti32:
380 ; FAST-NEXT: movl %edi, %eax
381 ; FAST-NEXT: imull %esi, %eax
382 ; FAST-NEXT: cmovol %edi, %esi
383 ; FAST-NEXT: movl %esi, %eax
386 ; KNL-LABEL: smuloselecti32:
388 ; KNL-NEXT: movl %edi, %eax
389 ; KNL-NEXT: imull %esi, %eax
390 ; KNL-NEXT: cmovol %edi, %esi
391 ; KNL-NEXT: movl %esi, %eax
393 %t = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %v1, i32 %v2)
394 %obit = extractvalue {i32, i1} %t, 1
395 %ret = select i1 %obit, i32 %v1, i32 %v2
399 define i64 @smuloselecti64(i64 %v1, i64 %v2) {
400 ; SDAG-LABEL: smuloselecti64:
402 ; SDAG-NEXT: movq %rdi, %rax
403 ; SDAG-NEXT: imulq %rsi, %rax
404 ; SDAG-NEXT: cmovoq %rdi, %rsi
405 ; SDAG-NEXT: movq %rsi, %rax
408 ; FAST-LABEL: smuloselecti64:
410 ; FAST-NEXT: movq %rdi, %rax
411 ; FAST-NEXT: imulq %rsi, %rax
412 ; FAST-NEXT: cmovoq %rdi, %rsi
413 ; FAST-NEXT: movq %rsi, %rax
416 ; KNL-LABEL: smuloselecti64:
418 ; KNL-NEXT: movq %rdi, %rax
419 ; KNL-NEXT: imulq %rsi, %rax
420 ; KNL-NEXT: cmovoq %rdi, %rsi
421 ; KNL-NEXT: movq %rsi, %rax
423 %t = call {i64, i1} @llvm.smul.with.overflow.i64(i64 %v1, i64 %v2)
424 %obit = extractvalue {i64, i1} %t, 1
425 %ret = select i1 %obit, i64 %v1, i64 %v2
429 define i32 @umuloselecti32(i32 %v1, i32 %v2) {
430 ; SDAG-LABEL: umuloselecti32:
432 ; SDAG-NEXT: movl %edi, %eax
433 ; SDAG-NEXT: mull %esi
434 ; SDAG-NEXT: cmovol %edi, %esi
435 ; SDAG-NEXT: movl %esi, %eax
438 ; FAST-LABEL: umuloselecti32:
440 ; FAST-NEXT: movl %edi, %eax
441 ; FAST-NEXT: mull %esi
442 ; FAST-NEXT: cmovol %edi, %esi
443 ; FAST-NEXT: movl %esi, %eax
446 ; KNL-LABEL: umuloselecti32:
448 ; KNL-NEXT: movl %edi, %eax
449 ; KNL-NEXT: mull %esi
450 ; KNL-NEXT: cmovol %edi, %esi
451 ; KNL-NEXT: movl %esi, %eax
453 %t = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %v1, i32 %v2)
454 %obit = extractvalue {i32, i1} %t, 1
455 %ret = select i1 %obit, i32 %v1, i32 %v2
459 define i64 @umuloselecti64(i64 %v1, i64 %v2) {
460 ; SDAG-LABEL: umuloselecti64:
462 ; SDAG-NEXT: movq %rdi, %rax
463 ; SDAG-NEXT: mulq %rsi
464 ; SDAG-NEXT: cmovoq %rdi, %rsi
465 ; SDAG-NEXT: movq %rsi, %rax
468 ; FAST-LABEL: umuloselecti64:
470 ; FAST-NEXT: movq %rdi, %rax
471 ; FAST-NEXT: mulq %rsi
472 ; FAST-NEXT: cmovoq %rdi, %rsi
473 ; FAST-NEXT: movq %rsi, %rax
476 ; KNL-LABEL: umuloselecti64:
478 ; KNL-NEXT: movq %rdi, %rax
479 ; KNL-NEXT: mulq %rsi
480 ; KNL-NEXT: cmovoq %rdi, %rsi
481 ; KNL-NEXT: movq %rsi, %rax
483 %t = call {i64, i1} @llvm.umul.with.overflow.i64(i64 %v1, i64 %v2)
484 %obit = extractvalue {i64, i1} %t, 1
485 %ret = select i1 %obit, i64 %v1, i64 %v2
490 ; Check the use of the overflow bit in combination with a branch instruction.
492 define zeroext i1 @smulobri32(i32 %v1, i32 %v2) {
493 ; SDAG-LABEL: smulobri32:
495 ; SDAG-NEXT: imull %esi, %edi
496 ; SDAG-NEXT: jo LBB15_1
497 ; SDAG-NEXT: ## BB#2: ## %continue
498 ; SDAG-NEXT: movb $1, %al
500 ; SDAG-NEXT: LBB15_1: ## %overflow
501 ; SDAG-NEXT: xorl %eax, %eax
504 ; FAST-LABEL: smulobri32:
506 ; FAST-NEXT: imull %esi, %edi
507 ; FAST-NEXT: jo LBB15_1
508 ; FAST-NEXT: ## BB#2: ## %continue
509 ; FAST-NEXT: movb $1, %al
510 ; FAST-NEXT: andb $1, %al
511 ; FAST-NEXT: movzbl %al, %eax
513 ; FAST-NEXT: LBB15_1: ## %overflow
514 ; FAST-NEXT: xorl %eax, %eax
515 ; FAST-NEXT: andb $1, %al
516 ; FAST-NEXT: movzbl %al, %eax
519 ; KNL-LABEL: smulobri32:
521 ; KNL-NEXT: imull %esi, %edi
522 ; KNL-NEXT: jo LBB15_1
523 ; KNL-NEXT: ## BB#2: ## %continue
524 ; KNL-NEXT: movb $1, %al
526 ; KNL-NEXT: LBB15_1: ## %overflow
527 ; KNL-NEXT: xorl %eax, %eax
529 %t = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %v1, i32 %v2)
530 %val = extractvalue {i32, i1} %t, 0
531 %obit = extractvalue {i32, i1} %t, 1
532 br i1 %obit, label %overflow, label %continue, !prof !0
541 define zeroext i1 @smulobri64(i64 %v1, i64 %v2) {
542 ; SDAG-LABEL: smulobri64:
544 ; SDAG-NEXT: imulq %rsi, %rdi
545 ; SDAG-NEXT: jo LBB16_1
546 ; SDAG-NEXT: ## BB#2: ## %continue
547 ; SDAG-NEXT: movb $1, %al
549 ; SDAG-NEXT: LBB16_1: ## %overflow
550 ; SDAG-NEXT: xorl %eax, %eax
553 ; FAST-LABEL: smulobri64:
555 ; FAST-NEXT: imulq %rsi, %rdi
556 ; FAST-NEXT: jo LBB16_1
557 ; FAST-NEXT: ## BB#2: ## %continue
558 ; FAST-NEXT: movb $1, %al
559 ; FAST-NEXT: andb $1, %al
560 ; FAST-NEXT: movzbl %al, %eax
562 ; FAST-NEXT: LBB16_1: ## %overflow
563 ; FAST-NEXT: xorl %eax, %eax
564 ; FAST-NEXT: andb $1, %al
565 ; FAST-NEXT: movzbl %al, %eax
568 ; KNL-LABEL: smulobri64:
570 ; KNL-NEXT: imulq %rsi, %rdi
571 ; KNL-NEXT: jo LBB16_1
572 ; KNL-NEXT: ## BB#2: ## %continue
573 ; KNL-NEXT: movb $1, %al
575 ; KNL-NEXT: LBB16_1: ## %overflow
576 ; KNL-NEXT: xorl %eax, %eax
578 %t = call {i64, i1} @llvm.smul.with.overflow.i64(i64 %v1, i64 %v2)
579 %val = extractvalue {i64, i1} %t, 0
580 %obit = extractvalue {i64, i1} %t, 1
581 br i1 %obit, label %overflow, label %continue, !prof !0
590 define zeroext i1 @umulobri32(i32 %v1, i32 %v2) {
591 ; SDAG-LABEL: umulobri32:
593 ; SDAG-NEXT: movl %edi, %eax
594 ; SDAG-NEXT: mull %esi
595 ; SDAG-NEXT: jo LBB17_1
596 ; SDAG-NEXT: ## BB#2: ## %continue
597 ; SDAG-NEXT: movb $1, %al
599 ; SDAG-NEXT: LBB17_1: ## %overflow
600 ; SDAG-NEXT: xorl %eax, %eax
603 ; FAST-LABEL: umulobri32:
605 ; FAST-NEXT: movl %edi, %eax
606 ; FAST-NEXT: mull %esi
607 ; FAST-NEXT: jo LBB17_1
608 ; FAST-NEXT: ## BB#2: ## %continue
609 ; FAST-NEXT: movb $1, %al
610 ; FAST-NEXT: andb $1, %al
611 ; FAST-NEXT: movzbl %al, %eax
613 ; FAST-NEXT: LBB17_1: ## %overflow
614 ; FAST-NEXT: xorl %eax, %eax
615 ; FAST-NEXT: andb $1, %al
616 ; FAST-NEXT: movzbl %al, %eax
619 ; KNL-LABEL: umulobri32:
621 ; KNL-NEXT: movl %edi, %eax
622 ; KNL-NEXT: mull %esi
623 ; KNL-NEXT: jo LBB17_1
624 ; KNL-NEXT: ## BB#2: ## %continue
625 ; KNL-NEXT: movb $1, %al
627 ; KNL-NEXT: LBB17_1: ## %overflow
628 ; KNL-NEXT: xorl %eax, %eax
630 %t = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %v1, i32 %v2)
631 %val = extractvalue {i32, i1} %t, 0
632 %obit = extractvalue {i32, i1} %t, 1
633 br i1 %obit, label %overflow, label %continue, !prof !0
642 define zeroext i1 @umulobri64(i64 %v1, i64 %v2) {
643 ; SDAG-LABEL: umulobri64:
645 ; SDAG-NEXT: movq %rdi, %rax
646 ; SDAG-NEXT: mulq %rsi
647 ; SDAG-NEXT: jo LBB18_1
648 ; SDAG-NEXT: ## BB#2: ## %continue
649 ; SDAG-NEXT: movb $1, %al
651 ; SDAG-NEXT: LBB18_1: ## %overflow
652 ; SDAG-NEXT: xorl %eax, %eax
655 ; FAST-LABEL: umulobri64:
657 ; FAST-NEXT: movq %rdi, %rax
658 ; FAST-NEXT: mulq %rsi
659 ; FAST-NEXT: jo LBB18_1
660 ; FAST-NEXT: ## BB#2: ## %continue
661 ; FAST-NEXT: movb $1, %al
662 ; FAST-NEXT: andb $1, %al
663 ; FAST-NEXT: movzbl %al, %eax
665 ; FAST-NEXT: LBB18_1: ## %overflow
666 ; FAST-NEXT: xorl %eax, %eax
667 ; FAST-NEXT: andb $1, %al
668 ; FAST-NEXT: movzbl %al, %eax
671 ; KNL-LABEL: umulobri64:
673 ; KNL-NEXT: movq %rdi, %rax
674 ; KNL-NEXT: mulq %rsi
675 ; KNL-NEXT: jo LBB18_1
676 ; KNL-NEXT: ## BB#2: ## %continue
677 ; KNL-NEXT: movb $1, %al
679 ; KNL-NEXT: LBB18_1: ## %overflow
680 ; KNL-NEXT: xorl %eax, %eax
682 %t = call {i64, i1} @llvm.umul.with.overflow.i64(i64 %v1, i64 %v2)
683 %val = extractvalue {i64, i1} %t, 0
684 %obit = extractvalue {i64, i1} %t, 1
685 br i1 %obit, label %overflow, label %continue, !prof !0
694 define i1 @bug27873(i64 %c1, i1 %c2) {
695 ; SDAG-LABEL: bug27873:
697 ; SDAG-NEXT: movl $160, %ecx
698 ; SDAG-NEXT: movq %rdi, %rax
699 ; SDAG-NEXT: mulq %rcx
700 ; SDAG-NEXT: seto %al
701 ; SDAG-NEXT: orb %sil, %al
704 ; FAST-LABEL: bug27873:
706 ; FAST-NEXT: movl $160, %ecx
707 ; FAST-NEXT: movq %rdi, %rax
708 ; FAST-NEXT: mulq %rcx
709 ; FAST-NEXT: seto %al
710 ; FAST-NEXT: orb %sil, %al
713 ; KNL-LABEL: bug27873:
715 ; KNL-NEXT: movl $160, %ecx
716 ; KNL-NEXT: movq %rdi, %rax
717 ; KNL-NEXT: mulq %rcx
719 ; KNL-NEXT: orb %sil, %al
721 %mul = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %c1, i64 160)
722 %mul.overflow = extractvalue { i64, i1 } %mul, 1
723 %x1 = or i1 %c2, %mul.overflow
727 declare {i8, i1} @llvm.smul.with.overflow.i8 (i8, i8 ) nounwind readnone
728 declare {i16, i1} @llvm.smul.with.overflow.i16(i16, i16) nounwind readnone
729 declare {i32, i1} @llvm.smul.with.overflow.i32(i32, i32) nounwind readnone
730 declare {i64, i1} @llvm.smul.with.overflow.i64(i64, i64) nounwind readnone
731 declare {i8, i1} @llvm.umul.with.overflow.i8 (i8, i8 ) nounwind readnone
732 declare {i16, i1} @llvm.umul.with.overflow.i16(i16, i16) nounwind readnone
733 declare {i32, i1} @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
734 declare {i64, i1} @llvm.umul.with.overflow.i64(i64, i64) nounwind readnone
736 !0 = !{!"branch_weights", i32 0, i32 2147483647}