3 @ok = internal constant [4 x i8] c"%d\0A\00"
4 @no = internal constant [4 x i8] c"no\0A\00"
6 define i1 @func1(i24 signext %v1, i24 signext %v2) nounwind {
8 %t = call {i24, i1} @llvm.sadd.with.overflow.i24(i24 %v1, i24 %v2)
9 %sum = extractvalue {i24, i1} %t, 0
10 %sum32 = sext i24 %sum to i32
11 %obit = extractvalue {i24, i1} %t, 1
12 br i1 %obit, label %overflow, label %normal
15 %t1 = tail call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
19 %t2 = tail call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
23 define i1 @func2(i24 zeroext %v1, i24 zeroext %v2) nounwind {
25 %t = call {i24, i1} @llvm.uadd.with.overflow.i24(i24 %v1, i24 %v2)
26 %sum = extractvalue {i24, i1} %t, 0
27 %sum32 = zext i24 %sum to i32
28 %obit = extractvalue {i24, i1} %t, 1
29 br i1 %obit, label %carry, label %normal
32 %t1 = tail call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
36 %t2 = tail call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
40 declare i32 @printf(i8*, ...) nounwind
41 declare {i24, i1} @llvm.sadd.with.overflow.i24(i24, i24)
42 declare {i24, i1} @llvm.uadd.with.overflow.i24(i24, i24)