Nick Lewycky | 56d2482 | 2007-09-20 00:48:36 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | opt -predsimplify | llvm-dis | grep -v unreachable |
| 2 | ; PR1683 |
| 3 | |
| 4 | @.str = internal constant [13 x i8] c"c36174a.adb\00\00" ; <[13 x i8]*> [#uses=1] |
| 5 | |
| 6 | define void @_ada_c36174a() { |
| 7 | entry: |
| 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] |
| 11 | |
| 12 | entry.lpad_crit_edge: ; preds = %entry |
| 13 | br label %lpad |
| 14 | |
| 15 | invcont: ; preds = %entry |
| 16 | %tmp6 = icmp slt i32 %tmp4, 1 ; <i1> [#uses=1] |
| 17 | br i1 %tmp6, label %bb, label %bb9 |
| 18 | |
| 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 |
| 22 | |
| 23 | bb.lpad_crit_edge: ; preds = %bb |
| 24 | br label %lpad |
| 25 | |
| 26 | invcont8: ; preds = %bb |
| 27 | unreachable |
| 28 | |
| 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 |
| 33 | |
| 34 | bb9.bb61_crit_edge: ; preds = %bb9 |
| 35 | br label %bb61 |
| 36 | |
| 37 | bb9.bb76_crit_edge: ; preds = %bb9 |
| 38 | br label %bb76 |
| 39 | |
| 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 |
| 44 | |
| 45 | bb61.bb76_crit_edge: ; preds = %bb61 |
| 46 | br label %bb76 |
| 47 | |
| 48 | bb73: ; preds = %bb61 |
| 49 | %tmp75 = add i32 %J4b.0, 1 ; <i32> [#uses=1] |
| 50 | br label %bb61 |
| 51 | |
| 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 |
| 61 | |
| 62 | bb76.bb99_crit_edge: ; preds = %bb76 |
| 63 | br label %bb99 |
| 64 | |
| 65 | bb93: ; preds = %bb76 |
| 66 | invoke void @abort( ) |
| 67 | to label %bb93.bb99_crit_edge unwind label %bb93.lpad_crit_edge |
| 68 | |
| 69 | bb93.lpad_crit_edge: ; preds = %bb93 |
| 70 | br label %lpad |
| 71 | |
| 72 | bb93.bb99_crit_edge: ; preds = %bb93 |
| 73 | br label %bb99 |
| 74 | |
| 75 | bb99: ; preds = %bb93.bb99_crit_edge, %bb76.bb99_crit_edge |
| 76 | ret void |
| 77 | |
| 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] |
| 83 | unreachable |
| 84 | } |
| 85 | |
| 86 | declare i8* @llvm.stacksave() |
| 87 | |
| 88 | declare i32 @report__ident_int(i32) |
| 89 | |
| 90 | declare void @__gnat_rcheck_07(i8*, i32) |
| 91 | |
| 92 | declare void @abort() |
| 93 | |
| 94 | declare i8* @llvm.eh.exception() |
| 95 | |
| 96 | declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) |
| 97 | |
| 98 | declare i32 @__gnat_eh_personality(...) |
| 99 | |
| 100 | declare i32 @_Unwind_Resume(...) |
| 101 | |
| 102 | declare void @llvm.stackrestore(i8*) |