1 ; RUN: llc < %s -mtriple=i386-apple-darwin
4 %CF = type { %Register }
6 %Register = type { %"struct.XXC::BCFs", i32 }
7 %"struct.XXC::BCFs" = type { i32 }
9 declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) nounwind
11 define fastcc ptr @bar(ptr %call_frame, ptr %exception) nounwind {
13 %param_x = load ptr, ptr null ; <ptr> [#uses=1]
14 %unique_1.i = ptrtoint ptr %param_x to i1 ; <i1> [#uses=1]
15 br i1 %unique_1.i, label %NextVerify42, label %FailedVerify
17 NextVerify42: ; preds = %prologue
18 %param_y = load ptr, ptr null ; <ptr> [#uses=1]
19 %unique_1.i58 = ptrtoint ptr %param_y to i1 ; <i1> [#uses=1]
20 br i1 %unique_1.i58, label %function_setup.cont, label %FailedVerify
22 function_setup.cont: ; preds = %NextVerify42
23 br i1 false, label %label13, label %label
25 label: ; preds = %function_setup.cont
26 %has_exn = icmp eq ptr null, null ; <i1> [#uses=1]
27 br i1 %has_exn, label %kjsNumberLiteral.exit, label %handle_exception
29 kjsNumberLiteral.exit: ; preds = %label
30 %0 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 0, i32 0) ; <{ i32, i1 }> [#uses=2]
31 %intAdd = extractvalue { i32, i1 } %0, 0 ; <i32> [#uses=2]
32 %intAddOverflow = extractvalue { i32, i1 } %0, 1 ; <i1> [#uses=1]
33 %toint56 = ashr i32 %intAdd, 1 ; <i32> [#uses=1]
34 %toFP57 = sitofp i32 %toint56 to double ; <double> [#uses=1]
35 br i1 %intAddOverflow, label %rematerializeAdd, label %label13
37 label13: ; preds = %kjsNumberLiteral.exit, %function_setup.cont
38 %var_lr1.0 = phi double [ %toFP57, %kjsNumberLiteral.exit ], [ 0.000000e+00, %function_setup.cont ] ; <double> [#uses=0]
41 FailedVerify: ; preds = %NextVerify42, %prologue
44 rematerializeAdd: ; preds = %kjsNumberLiteral.exit
45 %rematerializedInt = sub i32 %intAdd, 0 ; <i32> [#uses=0]
48 handle_exception: ; preds = %label