blob: cf5f31d34e9db86d5c2a683cf7d156fda6cab8f9 [file] [log] [blame]
Dan Gohman1b4c27772009-09-08 16:50:01 +00001; RUN: opt %s -indvars -disable-output
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003declare void @q_atomic_increment()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005declare void @_Z9qt_assertPKcS0_i()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00007define void @_ZN13QMetaResourceC1EPKh() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008entry:
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00009 invoke void @_Z9qt_assertPKcS0_i( )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010 to label %endif.1 unwind label %then.i.i551
11
12then.i.i551: ; preds = %entry
13 ret void
14
15endif.1: ; preds = %entry
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000016 br i1 false, label %then.2, label %then.i.i
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017
18then.2: ; preds = %endif.1
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000019 invoke void @q_atomic_increment( )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020 to label %loopentry.0 unwind label %invoke_catch.6
21
22invoke_catch.6: ; preds = %then.2
23 ret void
24
25loopentry.0: ; preds = %then.2
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000026 br i1 false, label %shortcirc_next.i, label %endif.3
Dan Gohmanf17a25c2007-07-18 16:29:46 +000027
28endif.3: ; preds = %loopentry.0
29 ret void
30
31shortcirc_next.i: ; preds = %loopentry.0
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000032 br i1 false, label %_ZNK7QString2atEi.exit, label %then.i
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033
34then.i: ; preds = %shortcirc_next.i
35 ret void
36
37_ZNK7QString2atEi.exit: ; preds = %shortcirc_next.i
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000038 br i1 false, label %endif.4, label %then.4
Dan Gohmanf17a25c2007-07-18 16:29:46 +000039
40then.4: ; preds = %_ZNK7QString2atEi.exit
41 ret void
42
43endif.4: ; preds = %_ZNK7QString2atEi.exit
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000044 %tmp.115 = load i8* null ; <i8> [#uses=1]
45 br i1 false, label %loopexit.1, label %no_exit.0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000046
47no_exit.0: ; preds = %no_exit.0, %endif.4
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000048 %bytes_in_len.4.5 = phi i8 [ %dec, %no_exit.0 ], [ %tmp.115, %endif.4 ] ; <i8> [#uses=1]
49 %off.5.5.in = phi i32 [ %off.5.5, %no_exit.0 ], [ 0, %endif.4 ] ; <i32> [#uses=1]
50 %off.5.5 = add i32 %off.5.5.in, 1 ; <i32> [#uses=2]
51 %dec = add i8 %bytes_in_len.4.5, -1 ; <i8> [#uses=2]
52 %tmp.123631 = icmp eq i8 %dec, 0 ; <i1> [#uses=1]
53 br i1 %tmp.123631, label %loopexit.1, label %no_exit.0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000054
55loopexit.1: ; preds = %no_exit.0, %endif.4
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000056 %off.5.in.6 = phi i32 [ 0, %endif.4 ], [ %off.5.5, %no_exit.0 ] ; <i32> [#uses=0]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000057 ret void
58
59then.i.i: ; preds = %endif.1
60 ret void
61}