1 ; RUN: opt < %s -simplifycfg -disable-output
4 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
5 target triple = "thumbv7-apple-ios9.0.0"
7 %struct.anon = type { %struct.anon.0, i32, i32, %union.T1 }
8 %struct.anon.0 = type { i32, [256 x i32], [256 x i8] }
9 %union.T1 = type { %struct.F}
10 %struct.F = type { i32 }
12 @U = internal global %struct.anon zeroinitializer, align 4
16 %0 = load i32, i32* getelementptr inbounds (%struct.anon, %struct.anon* @U, i32 0, i32 2), align 4
17 %cmp.i = icmp eq i32 %0, -1
18 br i1 %cmp.i, label %if.then, label %if.end
20 if.then: ; preds = %entry
23 if.end: ; preds = %entry, %if.then
24 %1 = load i32, i32* getelementptr inbounds (%struct.anon, %struct.anon* @U, i32 0, i32 2), align 4
25 %bf.load = load i32, i32* getelementptr inbounds (%struct.anon, %struct.anon* @U, i32 0, i32 3, i32 0, i32 0), align 4
26 %cmp = icmp slt i32 %0, 0
27 br i1 %cmp, label %if.end7, label %cond.false
29 cond.false: ; preds = %if.end
30 %add = and i32 %bf.load, 30
31 %shl = add nuw nsw i32 %add, 2
34 if.end7: ; preds = %if.end, %cond.false
35 %2 = icmp eq i32 %0, 1
36 br i1 %2, label %if.then9, label %if.else10
38 if.then9: ; preds = %if.end7
41 if.else10: ; preds = %if.end7
42 %cmp11 = icmp ugt i32 %0, 13
43 br i1 %cmp11, label %if.then12, label %if.else14
45 if.then12: ; preds = %if.else10
48 if.else14: ; preds = %if.else10
49 %tobool = icmp eq i1 %2, 0
50 br i1 %tobool, label %lor.rhs, label %if.then18
52 lor.rhs: ; preds = %if.else14
53 %tobool.not.i = icmp eq i1 %2, 0
54 br i1 %tobool.not.i, label %if.else21, label %if.end.i54
56 if.end.i54: ; preds = %lor.rhs
59 for.cond.i: ; preds = %if.end6.i, %if.end.i54
60 %ix.0.i = phi i32 [ 0, %if.end.i54 ], [ %inc.i55, %if.end6.i ]
61 %ret.0.off0.i = phi i1 [ false, %if.end.i54 ], [ %.ret.0.off0.i, %if.end6.i ]
62 %cmp2.i = icmp ult i32 %ix.0.i, 2
63 br i1 %cmp2.i, label %for.body.i, label %TmpSimpleNeedExt.exit
65 for.body.i: ; preds = %for.cond.i
66 %arrayidx.i = getelementptr inbounds %struct.anon, %struct.anon* @U, i32 0, i32 0, i32 2, i32 %ix.0.i
67 %elt = load i8, i8* %arrayidx.i, align 1
68 %cmp3.i = icmp sgt i8 %elt, 7
69 br i1 %cmp3.i, label %if.else21, label %if.end6.i
71 if.end6.i: ; preds = %for.body.i
72 %cmp10.i = icmp ugt i8 %elt, 59
73 %.ret.0.off0.i = or i1 %ret.0.off0.i, %cmp10.i
74 %inc.i55 = add i32 %ix.0.i, 1
77 TmpSimpleNeedExt.exit: ; preds = %for.body.i
78 br i1 %ret.0.off0.i, label %if.then18, label %if.else21
80 if.then18: ; preds = %if.else14, %TmpSimpleNeedExt.exit
83 if.else21: ; preds = %for.body.i, %lor.rhs, %TmpSimpleNeedExt.exit
86 if.end26: ; preds = %if.then18, %if.else21, %if.then12
87 %cmp.i51 = icmp slt i32 %0, 7
88 br i1 %cmp.i51, label %if.then.i, label %if.end.i
90 if.then.i: ; preds = %if.end26
93 if.end.i: ; preds = %if.then.i, %if.end26
96 if.then2.i: ; preds = %if.end.i
99 if.end29: ; preds = %if.end.i, %if.then2.i, %if.then9