1 ; RUN: opt < %s -predsimplify -S | grep unreachable | count 2
4 @.str = internal constant [13 x i8] c"c36174a.adb\00\00" ; <[13 x i8]*> [#uses=1]
6 define void @_ada_c36174a() {
8 %tmp3 = call i8* @llvm.stacksave( ) ; <i8*> [#uses=1]
9 %tmp4 = invoke i32 @report__ident_int( i32 6 )
10 to label %invcont unwind label %entry.lpad_crit_edge ; <i32> [#uses=7]
12 entry.lpad_crit_edge: ; preds = %entry
15 invcont: ; preds = %entry
16 %tmp6 = icmp slt i32 %tmp4, 1 ; <i1> [#uses=1]
17 br i1 %tmp6, label %bb, label %bb9
19 bb: ; preds = %invcont
20 invoke void @__gnat_rcheck_07( i8* getelementptr ([13 x i8]* @.str, i32 0, i32 0), i32 10 )
21 to label %invcont8 unwind label %bb.lpad_crit_edge
23 bb.lpad_crit_edge: ; preds = %bb
26 invcont8: ; preds = %bb
29 bb9: ; preds = %invcont
30 %tmp51 = add i32 %tmp4, 6 ; <i32> [#uses=2]
31 %tmp56 = icmp sgt i32 %tmp4, %tmp51 ; <i1> [#uses=1]
32 br i1 %tmp56, label %bb9.bb76_crit_edge, label %bb9.bb61_crit_edge
34 bb9.bb61_crit_edge: ; preds = %bb9
37 bb9.bb76_crit_edge: ; preds = %bb9
40 bb61: ; preds = %bb73, %bb9.bb61_crit_edge
41 %J4b.0 = phi i32 [ %tmp75, %bb73 ], [ %tmp4, %bb9.bb61_crit_edge ] ; <i32> [#uses=2]
42 %tmp70 = icmp eq i32 %tmp51, %J4b.0 ; <i1> [#uses=1]
43 br i1 %tmp70, label %bb61.bb76_crit_edge, label %bb73
45 bb61.bb76_crit_edge: ; preds = %bb61
49 %tmp75 = add i32 %J4b.0, 1 ; <i32> [#uses=1]
52 bb76: ; preds = %bb61.bb76_crit_edge, %bb9.bb76_crit_edge
53 %tmp78 = icmp ne i32 %tmp4, 6 ; <i1> [#uses=1]
54 %tmp81 = add i32 %tmp4, 6 ; <i32> [#uses=1]
55 %tmp8182 = sext i32 %tmp81 to i64 ; <i64> [#uses=1]
56 %tmp8384 = sext i32 %tmp4 to i64 ; <i64> [#uses=1]
57 %tmp85 = sub i64 %tmp8182, %tmp8384 ; <i64> [#uses=1]
58 %tmp86 = icmp ne i64 %tmp85, 6 ; <i1> [#uses=1]
59 %tmp90 = or i1 %tmp78, %tmp86 ; <i1> [#uses=1]
60 br i1 %tmp90, label %bb93, label %bb76.bb99_crit_edge
62 bb76.bb99_crit_edge: ; preds = %bb76
67 to label %bb93.bb99_crit_edge unwind label %bb93.lpad_crit_edge
69 bb93.lpad_crit_edge: ; preds = %bb93
72 bb93.bb99_crit_edge: ; preds = %bb93
75 bb99: ; preds = %bb93.bb99_crit_edge, %bb76.bb99_crit_edge
78 lpad: ; preds = %bb93.lpad_crit_edge, %bb.lpad_crit_edge, %entry.lpad_crit_edge
79 %eh_ptr = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2]
80 %eh_select102 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32 0 ) ; <i32> [#uses=0]
81 call void @llvm.stackrestore( i8* %tmp3 )
82 call i32 (...)* @_Unwind_Resume( i8* %eh_ptr ) ; <i32>:0 [#uses=0]
86 declare i8* @llvm.stacksave()
88 declare i32 @report__ident_int(i32)
90 declare void @__gnat_rcheck_07(i8*, i32)
94 declare i8* @llvm.eh.exception()
96 declare i32 @llvm.eh.selector.i32(i8*, i8*, ...)
98 declare i32 @__gnat_eh_personality(...)
100 declare i32 @_Unwind_Resume(...)
102 declare void @llvm.stackrestore(i8*)