1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-- | FileCheck %s
4 ; FIXME: umul-with-overflow not supported yet.
6 @ok = internal constant [4 x i8] c"%d\0A\00"
7 @no = internal constant [4 x i8] c"no\0A\00"
9 define i1 @func(i32 %v1, i32 %v2) nounwind {
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
13 ; CHECK-NEXT: mull {{[0-9]+}}(%esp)
14 ; CHECK-NEXT: jno .LBB0_1
15 ; CHECK-NEXT: # %bb.2: # %carry
16 ; CHECK-NEXT: pushl $no
17 ; CHECK-NEXT: calll printf@PLT
18 ; CHECK-NEXT: addl $4, %esp
19 ; CHECK-NEXT: xorl %eax, %eax
21 ; CHECK-NEXT: .LBB0_1: # %normal
22 ; CHECK-NEXT: pushl %eax
23 ; CHECK-NEXT: pushl $ok
24 ; CHECK-NEXT: calll printf@PLT
25 ; CHECK-NEXT: addl $8, %esp
26 ; CHECK-NEXT: movb $1, %al
29 %t = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %v1, i32 %v2)
30 %sum = extractvalue {i32, i1} %t, 0
31 %obit = extractvalue {i32, i1} %t, 1
32 br i1 %obit, label %carry, label %normal
35 %t1 = tail call i32 (ptr, ...) @printf( ptr @ok, i32 %sum ) nounwind
39 %t2 = tail call i32 (ptr, ...) @printf( ptr @no ) nounwind
43 declare i32 @printf(ptr, ...) nounwind
44 declare {i32, i1} @llvm.umul.with.overflow.i32(i32, i32)