1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-classify-expressions=0 2>&1 | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
6 %struct.complex = type { float, float }
7 %struct.element = type { i32, i32 }
8 %struct.node = type { ptr, ptr, i32 }
9 @seed = external global i64 ; <ptr> [#uses=0]
10 @_2E_str = external constant [18 x i8], align 1 ; <ptr> [#uses=0]
11 @_2E_str1 = external constant [4 x i8], align 1 ; <ptr> [#uses=0]
12 @value = external global float ; <ptr> [#uses=0]
13 @fixed = external global float ; <ptr> [#uses=0]
14 @floated = external global float ; <ptr> [#uses=0]
15 @permarray = external global [11 x i32], align 32 ; <ptr> [#uses=0]
16 @pctr = external global i32 ; <ptr> [#uses=0]
17 @tree = external global ptr ; <ptr> [#uses=0]
18 @stack = external global [4 x i32], align 16 ; <ptr> [#uses=0]
19 @cellspace = external global [19 x %struct.element], align 32 ; <ptr> [#uses=0]
20 @freelist = external global i32 ; <ptr> [#uses=0]
21 @movesdone = external global i32 ; <ptr> [#uses=0]
22 @ima = external global [41 x [41 x i32]], align 32 ; <ptr> [#uses=0]
23 @imb = external global [41 x [41 x i32]], align 32 ; <ptr> [#uses=0]
24 @imr = external global [41 x [41 x i32]], align 32 ; <ptr> [#uses=0]
25 @rma = external global [41 x [41 x float]], align 32 ; <ptr> [#uses=0]
26 @rmb = external global [41 x [41 x float]], align 32 ; <ptr> [#uses=0]
27 @rmr = external global [41 x [41 x float]], align 32 ; <ptr> [#uses=0]
28 @piececount = external global [4 x i32], align 16 ; <ptr> [#uses=0]
29 @class = external global [13 x i32], align 32 ; <ptr> [#uses=0]
30 @piecemax = external global [13 x i32], align 32 ; <ptr> [#uses=0]
31 @puzzl = external global [512 x i32], align 32 ; <ptr> [#uses=0]
32 @p = external global [13 x [512 x i32]], align 32 ; <ptr> [#uses=0]
33 @n = external global i32 ; <ptr> [#uses=0]
34 @kount = external global i32 ; <ptr> [#uses=0]
35 @sortlist = external global [5001 x i32], align 32 ; <ptr> [#uses=0]
36 @biggest = external global i32 ; <ptr> [#uses=0]
37 @littlest = external global i32 ; <ptr> [#uses=0]
38 @top = external global i32 ; <ptr> [#uses=0]
39 @z = external global [257 x %struct.complex], align 32 ; <ptr> [#uses=0]
40 @w = external global [257 x %struct.complex], align 32 ; <ptr> [#uses=0]
41 @e = external global [130 x %struct.complex], align 32 ; <ptr> [#uses=0]
42 @zr = external global float ; <ptr> [#uses=0]
43 @zi = external global float ; <ptr> [#uses=0]
45 declare void @Initrand() nounwind
47 declare i32 @Rand() nounwind
49 declare void @Try(i32, ptr, ptr, ptr, ptr, ptr) nounwind
51 declare i32 @puts(ptr nocapture) nounwind
53 declare void @Queens(i32) nounwind
55 declare i32 @printf(ptr nocapture, ...) nounwind
57 declare i32 @main() nounwind
59 declare void @Doit() nounwind
61 declare void @Doit_bb7(ptr, ptr, ptr) nounwind
63 define void @Doit_bb7_2E_i(ptr %x1, ptr %c, ptr %b, ptr %a, ptr %q, ptr %x1.sub, ptr %b9, ptr %a10, ptr %c11) nounwind {
64 ; CHECK-LABEL: 'Doit_bb7_2E_i'
65 ; CHECK-NEXT: Determining loop execution counts for: @Doit_bb7_2E_i
66 ; CHECK-NEXT: Loop %bb7.i: Unpredictable backedge-taken count.
67 ; CHECK-NEXT: Loop %bb7.i: constant max backedge-taken count is 8
68 ; CHECK-NEXT: Loop %bb7.i: symbolic max backedge-taken count is 8
69 ; CHECK-NEXT: Loop %bb7.i: Unpredictable predicated backedge-taken count.
74 Try.exit.exitStub: ; preds = %bb7.i
77 bb.i: ; preds = %bb7.i
78 %tmp = add i32 %j.0.i, 1 ; <i32> [#uses=5]
79 store i32 0, ptr %q, align 4
80 %tmp1 = sext i32 %tmp to i64 ; <i64> [#uses=1]
81 %tmp2 = getelementptr [9 x i32], ptr %a, i64 0, i64 %tmp1 ; <ptr> [#uses=1]
82 %tmp3 = load i32, ptr %tmp2, align 4 ; <i32> [#uses=1]
83 %tmp4 = icmp eq i32 %tmp3, 0 ; <i1> [#uses=1]
84 br i1 %tmp4, label %bb.i.bb7.i.backedge_crit_edge, label %bb1.i
86 bb1.i: ; preds = %bb.i
87 %tmp5 = add i32 %j.0.i, 2 ; <i32> [#uses=1]
88 %tmp6 = sext i32 %tmp5 to i64 ; <i64> [#uses=1]
89 %tmp7 = getelementptr [17 x i32], ptr %b, i64 0, i64 %tmp6 ; <ptr> [#uses=1]
90 %tmp8 = load i32, ptr %tmp7, align 4 ; <i32> [#uses=1]
91 %tmp9 = icmp eq i32 %tmp8, 0 ; <i1> [#uses=1]
92 br i1 %tmp9, label %bb1.i.bb7.i.backedge_crit_edge, label %bb2.i
94 bb2.i: ; preds = %bb1.i
95 %tmp10 = sub i32 7, %j.0.i ; <i32> [#uses=1]
96 %tmp11 = sext i32 %tmp10 to i64 ; <i64> [#uses=1]
97 %tmp12 = getelementptr [15 x i32], ptr %c, i64 0, i64 %tmp11 ; <ptr> [#uses=1]
98 %tmp13 = load i32, ptr %tmp12, align 4 ; <i32> [#uses=1]
99 %tmp14 = icmp eq i32 %tmp13, 0 ; <i1> [#uses=1]
100 br i1 %tmp14, label %bb2.i.bb7.i.backedge_crit_edge, label %bb3.i
102 bb3.i: ; preds = %bb2.i
103 %tmp15 = getelementptr [9 x i32], ptr %x1, i64 0, i64 1 ; <ptr> [#uses=1]
104 store i32 %tmp, ptr %tmp15, align 4
105 %tmp16 = sext i32 %tmp to i64 ; <i64> [#uses=1]
106 %tmp17 = getelementptr [9 x i32], ptr %a, i64 0, i64 %tmp16 ; <ptr> [#uses=1]
107 store i32 0, ptr %tmp17, align 4
108 %tmp18 = add i32 %j.0.i, 2 ; <i32> [#uses=1]
109 %tmp19 = sext i32 %tmp18 to i64 ; <i64> [#uses=1]
110 %tmp20 = getelementptr [17 x i32], ptr %b, i64 0, i64 %tmp19 ; <ptr> [#uses=1]
111 store i32 0, ptr %tmp20, align 4
112 %tmp21 = sub i32 7, %j.0.i ; <i32> [#uses=1]
113 %tmp22 = sext i32 %tmp21 to i64 ; <i64> [#uses=1]
114 %tmp23 = getelementptr [15 x i32], ptr %c, i64 0, i64 %tmp22 ; <ptr> [#uses=1]
115 store i32 0, ptr %tmp23, align 4
116 call void @Try(i32 2, ptr %q, ptr %b9, ptr %a10, ptr %c11, ptr %x1.sub) nounwind
117 %tmp24 = load i32, ptr %q, align 4 ; <i32> [#uses=1]
118 %tmp25 = icmp eq i32 %tmp24, 0 ; <i1> [#uses=1]
119 br i1 %tmp25, label %bb5.i, label %bb3.i.bb7.i.backedge_crit_edge
121 bb5.i: ; preds = %bb3.i
122 %tmp26 = sext i32 %tmp to i64 ; <i64> [#uses=1]
123 %tmp27 = getelementptr [9 x i32], ptr %a, i64 0, i64 %tmp26 ; <ptr> [#uses=1]
124 store i32 1, ptr %tmp27, align 4
125 %tmp28 = add i32 %j.0.i, 2 ; <i32> [#uses=1]
126 %tmp29 = sext i32 %tmp28 to i64 ; <i64> [#uses=1]
127 %tmp30 = getelementptr [17 x i32], ptr %b, i64 0, i64 %tmp29 ; <ptr> [#uses=1]
128 store i32 1, ptr %tmp30, align 4
129 %tmp31 = sub i32 7, %j.0.i ; <i32> [#uses=1]
130 %tmp32 = sext i32 %tmp31 to i64 ; <i64> [#uses=1]
131 %tmp33 = getelementptr [15 x i32], ptr %c, i64 0, i64 %tmp32 ; <ptr> [#uses=1]
132 store i32 1, ptr %tmp33, align 4
133 br label %bb7.i.backedge
135 bb7.i.backedge: ; preds = %bb3.i.bb7.i.backedge_crit_edge, %bb2.i.bb7.i.backedge_crit_edge, %bb1.i.bb7.i.backedge_crit_edge, %bb.i.bb7.i.backedge_crit_edge, %bb5.i
138 bb7.i: ; preds = %bb7.i.backedge, %newFuncRoot
139 %j.0.i = phi i32 [ 0, %newFuncRoot ], [ %tmp, %bb7.i.backedge ] ; <i32> [#uses=8]
140 %tmp34 = load i32, ptr %q, align 4 ; <i32> [#uses=1]
141 %tmp35 = icmp eq i32 %tmp34, 0 ; <i1> [#uses=1]
142 %tmp36 = icmp ne i32 %j.0.i, 8 ; <i1> [#uses=1]
143 %tmp37 = and i1 %tmp35, %tmp36 ; <i1> [#uses=1]
144 br i1 %tmp37, label %bb.i, label %Try.exit.exitStub
146 bb.i.bb7.i.backedge_crit_edge: ; preds = %bb.i
147 br label %bb7.i.backedge
149 bb1.i.bb7.i.backedge_crit_edge: ; preds = %bb1.i
150 br label %bb7.i.backedge
152 bb2.i.bb7.i.backedge_crit_edge: ; preds = %bb2.i
153 br label %bb7.i.backedge
155 bb3.i.bb7.i.backedge_crit_edge: ; preds = %bb3.i
156 br label %bb7.i.backedge