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
4 define void @test1(i32* %S2) {
6 br i1 false, label %list_Length.exit, label %cond_true.i
7 cond_true.i: ; preds = %entry
9 list_Length.exit: ; preds = %entry
10 br i1 false, label %list_Length.exit9, label %cond_true.i5
11 cond_true.i5: ; preds = %list_Length.exit
13 list_Length.exit9: ; preds = %list_Length.exit
14 br i1 false, label %bb78, label %return
15 bb44: ; preds = %bb78, %cond_next68
16 br i1 %tmp49.not, label %bb62, label %bb62.loopexit
17 bb62.loopexit: ; preds = %bb44
19 bb62: ; preds = %bb62.loopexit, %bb44
20 br i1 false, label %return.loopexit, label %cond_next68
21 cond_next68: ; preds = %bb62
22 br i1 false, label %return.loopexit, label %bb44
23 bb78: ; preds = %list_Length.exit9
24 %tmp49.not = icmp eq i32* %S2, null ; <i1> [#uses=1]
26 return.loopexit: ; preds = %cond_next68, %bb62
27 %retval.0.ph = phi i32 [ 1, %cond_next68 ], [ 0, %bb62 ] ; <i32> [#uses=1]
29 return: ; preds = %return.loopexit, %list_Length.exit9
30 %retval.0 = phi i32 [ 0, %list_Length.exit9 ], [ %retval.0.ph, %return.loopexit ] ; <i32> [#uses=0]
34 define void @test2() nounwind {
38 bb.nph: ; preds = %entry
39 %and.i13521 = and <4 x i1> undef, undef ; <<4 x i1>> [#uses=1]
42 for.body: ; preds = %for.body, %bb.nph
43 %or.i = select <4 x i1> %and.i13521, <4 x i32> undef, <4 x i32> undef ; <<4 x i32>> [#uses=0]
44 br i1 false, label %for.body, label %for.end
46 for.end: ; preds = %for.body, %entry
51 define i32* @test3(i32** %p_45, i16 zeroext %p_46, i64 %p_47, i64 %p_48, i16 signext %p_49) nounwind {
55 for.cond: ; preds = %for.cond4, %entry
56 br i1 false, label %for.cond4, label %for.end88
58 for.cond4: ; preds = %for.cond
59 %conv46 = trunc i32 0 to i8 ; <i8> [#uses=2]
60 %cmp60 = icmp sgt i8 %conv46, 124 ; <i1> [#uses=1]
61 %or.cond = and i1 undef, %cmp60 ; <i1> [#uses=1]
62 %cond = select i1 %or.cond, i8 %conv46, i8 undef ; <i8> [#uses=0]
65 for.end88: ; preds = %for.cond