Dan Gohman | f2f6ce6 | 2009-09-11 18:01:28 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -indvars |
Dan Gohman | d6d0294 | 2009-05-22 16:47:11 +0000 | [diff] [blame] | 2 | |
| 3 | ; An invoke has a result value which is used in an "Interesting" |
| 4 | ; expression inside the loop. IndVars should be able to rewrite |
| 5 | ; the expression in the correct place. |
| 6 | |
| 7 | target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" |
| 8 | target triple = "i386-pc-linux-gnu" |
| 9 | %struct.string___XUB = type { i32, i32 } |
| 10 | %struct.string___XUP = type { [0 x i8]*, %struct.string___XUB* } |
| 11 | @.str7 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1] |
| 12 | @C.17.316 = external constant %struct.string___XUB ; <%struct.string___XUB*> [#uses=1] |
| 13 | |
| 14 | define void @_ada_c35503g() { |
| 15 | entry: |
| 16 | br label %bb |
| 17 | |
| 18 | bb: ; preds = %bb, %entry |
| 19 | br i1 false, label %bb65.loopexit, label %bb |
| 20 | |
| 21 | bb65.loopexit: ; preds = %bb |
| 22 | br label %bb123 |
| 23 | |
| 24 | bb123: ; preds = %bb178, %bb65.loopexit |
| 25 | %i.0 = phi i32 [ %3, %bb178 ], [ 0, %bb65.loopexit ] ; <i32> [#uses=3] |
| 26 | %0 = invoke i32 @report__ident_int(i32 1) |
| 27 | to label %invcont127 unwind label %lpad266 ; <i32> [#uses=1] |
| 28 | |
| 29 | invcont127: ; preds = %bb123 |
| 30 | %1 = sub i32 %i.0, %0 ; <i32> [#uses=1] |
| 31 | %2 = icmp eq i32 0, %1 ; <i1> [#uses=1] |
| 32 | br i1 %2, label %bb178, label %bb128 |
| 33 | |
| 34 | bb128: ; preds = %invcont127 |
| 35 | invoke void @system__img_int__image_integer(%struct.string___XUP* noalias sret null, i32 %i.0) |
| 36 | to label %invcont129 unwind label %lpad266 |
| 37 | |
| 38 | invcont129: ; preds = %bb128 |
| 39 | invoke void @system__string_ops__str_concat(%struct.string___XUP* noalias sret null, [0 x i8]* bitcast ([24 x i8]* @.str7 to [0 x i8]*), %struct.string___XUB* @C.17.316, [0 x i8]* null, %struct.string___XUB* null) |
| 40 | to label %invcont138 unwind label %lpad266 |
| 41 | |
| 42 | invcont138: ; preds = %invcont129 |
| 43 | unreachable |
| 44 | |
| 45 | bb178: ; preds = %invcont127 |
| 46 | %3 = add i32 %i.0, 1 ; <i32> [#uses=1] |
| 47 | br label %bb123 |
| 48 | |
| 49 | lpad266: ; preds = %invcont129, %bb128, %bb123 |
Bill Wendling | 15db556 | 2011-09-01 01:02:41 +0000 | [diff] [blame] | 50 | %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 |
| 51 | cleanup |
Dan Gohman | d6d0294 | 2009-05-22 16:47:11 +0000 | [diff] [blame] | 52 | unreachable |
| 53 | } |
| 54 | |
Bill Wendling | 15db556 | 2011-09-01 01:02:41 +0000 | [diff] [blame] | 55 | declare i32 @__gxx_personality_v0(...) |
| 56 | |
Dan Gohman | d6d0294 | 2009-05-22 16:47:11 +0000 | [diff] [blame] | 57 | declare void @system__img_int__image_integer(%struct.string___XUP* noalias sret, i32) |
| 58 | |
| 59 | declare void @system__string_ops__str_concat(%struct.string___XUP* noalias sret, [0 x i8]*, %struct.string___XUB*, [0 x i8]*, %struct.string___XUB*) |
| 60 | |
| 61 | declare i32 @report__ident_int(i32) |