1 ; RUN: opt < %s -simple-loop-unswitch -disable-output
2 ; RUN: opt < %s -simple-loop-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa -disable-output
5 target triple = "i686-pc-linux-gnu"
6 %struct.re_pattern_buffer = type { i8*, i32, i32, i32, i8*, i8*, i32, i8 }
8 define fastcc i32 @byte_regex_compile(i8* %pattern, i32 %size, i32 %syntax, %struct.re_pattern_buffer* %bufp) {
10 br i1 false, label %bb147, label %cond_next123
12 cond_next123: ; preds = %entry
15 bb147: ; preds = %entry
16 switch i32 0, label %normal_char [
21 bb1734: ; preds = %bb147
22 br label %bb1855.outer.outer
24 cond_true1831: ; preds = %bb1855.outer
25 br i1 %tmp1837, label %cond_next1844, label %cond_true1840
27 cond_true1840: ; preds = %cond_true1831
30 cond_next1844: ; preds = %cond_true1831
31 br i1 false, label %bb1855.outer, label %cond_true1849
33 cond_true1849: ; preds = %cond_next1844
34 br label %bb1855.outer.outer
36 bb1855.outer.outer: ; preds = %cond_true1849, %bb1734
37 %b.10.ph.ph = phi i8* [ null, %cond_true1849 ], [ null, %bb1734 ] ; <i8*> [#uses=1]
38 br label %bb1855.outer
40 bb1855.outer: ; preds = %bb1855.outer.outer, %cond_next1844
41 %b.10.ph = phi i8* [ null, %cond_next1844 ], [ %b.10.ph.ph, %bb1855.outer.outer ] ; <i8*> [#uses=1]
42 %tmp1837 = icmp eq i8* null, null ; <i1> [#uses=2]
43 br i1 false, label %cond_true1831, label %cond_next1915
45 cond_next1915: ; preds = %cond_next1961, %bb1855.outer
46 store i8* null, i8** null
47 br i1 %tmp1837, label %cond_next1929, label %cond_true1923
49 cond_true1923: ; preds = %cond_next1915
52 cond_next1929: ; preds = %cond_next1915
53 br i1 false, label %cond_next1961, label %cond_next2009
55 cond_next1961: ; preds = %cond_next1929
56 %tmp1992 = getelementptr i8, i8* %b.10.ph, i32 0 ; <i8*> [#uses=0]
57 br label %cond_next1915
59 cond_next2009: ; preds = %cond_next1929
62 bb5700: ; preds = %bb147
65 normal_char: ; preds = %bb147