1 ; RUN: llc < %s -march=x86 | grep {jo} | count 1
2 ; RUN: llc < %s -march=x86 | grep {jb} | count 1
4 @ok = internal constant [4 x i8] c"%d\0A\00"
5 @no = internal constant [4 x i8] c"no\0A\00"
7 define i1 @func1(i32 %v1, i32 %v2) nounwind {
9 %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %v1, i32 %v2)
10 %sum = extractvalue {i32, i1} %t, 0
11 %obit = extractvalue {i32, i1} %t, 1
12 br i1 %obit, label %overflow, label %normal
15 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
19 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
23 define i1 @func2(i32 %v1, i32 %v2) nounwind {
25 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)
26 %sum = extractvalue {i32, i1} %t, 0
27 %obit = extractvalue {i32, i1} %t, 1
28 br i1 %obit, label %carry, label %normal
31 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
35 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
39 declare i32 @printf(i8*, ...) nounwind
40 declare {i32, i1} @llvm.ssub.with.overflow.i32(i32, i32)
41 declare {i32, i1} @llvm.usub.with.overflow.i32(i32, i32)