1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=loop-predication < %s 2>&1 | FileCheck %s
3 ; RUN: opt -S -passes='require<scalar-evolution>,loop-mssa(loop-predication)' -verify-memoryssa < %s 2>&1 | FileCheck %s
5 declare void @llvm.experimental.guard(i1, ...)
7 define i32 @test_visited(ptr %array, i32 %length, i32 %n, i32 %x) {
8 ; CHECK-LABEL: @test_visited(
10 ; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i32 [[N:%.*]], 0
11 ; CHECK-NEXT: br i1 [[TMP5]], label [[EXIT:%.*]], label [[LOOP_PREHEADER:%.*]]
12 ; CHECK: loop.preheader:
13 ; CHECK-NEXT: [[TMP0:%.*]] = icmp ule i32 [[N]], [[LENGTH:%.*]]
14 ; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 0, [[LENGTH]]
15 ; CHECK-NEXT: [[TMP2:%.*]] = and i1 [[TMP1]], [[TMP0]]
16 ; CHECK-NEXT: [[TMP3:%.*]] = freeze i1 [[TMP2]]
17 ; CHECK-NEXT: br label [[LOOP:%.*]]
19 ; CHECK-NEXT: [[LOOP_ACC:%.*]] = phi i32 [ [[LOOP_ACC_NEXT:%.*]], [[LOOP]] ], [ 0, [[LOOP_PREHEADER]] ]
20 ; CHECK-NEXT: [[I:%.*]] = phi i32 [ [[I_NEXT:%.*]], [[LOOP]] ], [ 0, [[LOOP_PREHEADER]] ]
21 ; CHECK-NEXT: [[WITHIN_BOUNDS:%.*]] = icmp ult i32 [[I]], [[LENGTH]]
22 ; CHECK-NEXT: [[UNRELATED_COND:%.*]] = icmp eq i32 [[X:%.*]], [[I]]
23 ; CHECK-NEXT: [[GUARD_COND_2:%.*]] = and i1 [[WITHIN_BOUNDS]], [[UNRELATED_COND]]
24 ; CHECK-NEXT: [[GUARD_COND_3:%.*]] = and i1 [[GUARD_COND_2]], [[UNRELATED_COND]]
25 ; CHECK-NEXT: [[GUARD_COND_4:%.*]] = and i1 [[GUARD_COND_3]], [[GUARD_COND_2]]
26 ; CHECK-NEXT: [[GUARD_COND_5:%.*]] = and i1 [[GUARD_COND_4]], [[GUARD_COND_3]]
27 ; CHECK-NEXT: [[GUARD_COND_6:%.*]] = and i1 [[GUARD_COND_5]], [[GUARD_COND_4]]
28 ; CHECK-NEXT: [[GUARD_COND_7:%.*]] = and i1 [[GUARD_COND_6]], [[GUARD_COND_5]]
29 ; CHECK-NEXT: [[GUARD_COND_8:%.*]] = and i1 [[GUARD_COND_7]], [[GUARD_COND_6]]
30 ; CHECK-NEXT: [[GUARD_COND_9:%.*]] = and i1 [[GUARD_COND_8]], [[GUARD_COND_7]]
31 ; CHECK-NEXT: [[GUARD_COND_10:%.*]] = and i1 [[GUARD_COND_9]], [[GUARD_COND_8]]
32 ; CHECK-NEXT: [[GUARD_COND_11:%.*]] = and i1 [[GUARD_COND_10]], [[GUARD_COND_9]]
33 ; CHECK-NEXT: [[GUARD_COND_12:%.*]] = and i1 [[GUARD_COND_11]], [[GUARD_COND_10]]
34 ; CHECK-NEXT: [[GUARD_COND_13:%.*]] = and i1 [[GUARD_COND_12]], [[GUARD_COND_11]]
35 ; CHECK-NEXT: [[GUARD_COND_14:%.*]] = and i1 [[GUARD_COND_13]], [[GUARD_COND_12]]
36 ; CHECK-NEXT: [[GUARD_COND_15:%.*]] = and i1 [[GUARD_COND_14]], [[GUARD_COND_13]]
37 ; CHECK-NEXT: [[GUARD_COND_16:%.*]] = and i1 [[GUARD_COND_15]], [[GUARD_COND_14]]
38 ; CHECK-NEXT: [[GUARD_COND_17:%.*]] = and i1 [[GUARD_COND_16]], [[GUARD_COND_15]]
39 ; CHECK-NEXT: [[GUARD_COND_18:%.*]] = and i1 [[GUARD_COND_17]], [[GUARD_COND_16]]
40 ; CHECK-NEXT: [[GUARD_COND_19:%.*]] = and i1 [[GUARD_COND_18]], [[GUARD_COND_17]]
41 ; CHECK-NEXT: [[GUARD_COND_20:%.*]] = and i1 [[GUARD_COND_19]], [[GUARD_COND_18]]
42 ; CHECK-NEXT: [[GUARD_COND_21:%.*]] = and i1 [[GUARD_COND_20]], [[GUARD_COND_19]]
43 ; CHECK-NEXT: [[GUARD_COND_22:%.*]] = and i1 [[GUARD_COND_21]], [[GUARD_COND_20]]
44 ; CHECK-NEXT: [[GUARD_COND_23:%.*]] = and i1 [[GUARD_COND_22]], [[GUARD_COND_21]]
45 ; CHECK-NEXT: [[GUARD_COND_24:%.*]] = and i1 [[GUARD_COND_23]], [[GUARD_COND_22]]
46 ; CHECK-NEXT: [[GUARD_COND_25:%.*]] = and i1 [[GUARD_COND_24]], [[GUARD_COND_23]]
47 ; CHECK-NEXT: [[GUARD_COND_26:%.*]] = and i1 [[GUARD_COND_25]], [[GUARD_COND_24]]
48 ; CHECK-NEXT: [[GUARD_COND_27:%.*]] = and i1 [[GUARD_COND_26]], [[GUARD_COND_25]]
49 ; CHECK-NEXT: [[GUARD_COND_28:%.*]] = and i1 [[GUARD_COND_27]], [[GUARD_COND_26]]
50 ; CHECK-NEXT: [[GUARD_COND_29:%.*]] = and i1 [[GUARD_COND_28]], [[GUARD_COND_27]]
51 ; CHECK-NEXT: [[GUARD_COND_30:%.*]] = and i1 [[GUARD_COND_29]], [[GUARD_COND_28]]
52 ; CHECK-NEXT: [[GUARD_COND_31:%.*]] = and i1 [[GUARD_COND_30]], [[GUARD_COND_29]]
53 ; CHECK-NEXT: [[GUARD_COND_32:%.*]] = and i1 [[GUARD_COND_31]], [[GUARD_COND_30]]
54 ; CHECK-NEXT: [[GUARD_COND_33:%.*]] = and i1 [[GUARD_COND_32]], [[GUARD_COND_31]]
55 ; CHECK-NEXT: [[GUARD_COND_34:%.*]] = and i1 [[GUARD_COND_33]], [[GUARD_COND_32]]
56 ; CHECK-NEXT: [[GUARD_COND_35:%.*]] = and i1 [[GUARD_COND_34]], [[GUARD_COND_33]]
57 ; CHECK-NEXT: [[GUARD_COND_36:%.*]] = and i1 [[GUARD_COND_35]], [[GUARD_COND_34]]
58 ; CHECK-NEXT: [[GUARD_COND_37:%.*]] = and i1 [[GUARD_COND_36]], [[GUARD_COND_35]]
59 ; CHECK-NEXT: [[GUARD_COND_38:%.*]] = and i1 [[GUARD_COND_37]], [[GUARD_COND_36]]
60 ; CHECK-NEXT: [[GUARD_COND_39:%.*]] = and i1 [[GUARD_COND_38]], [[GUARD_COND_37]]
61 ; CHECK-NEXT: [[GUARD_COND_40:%.*]] = and i1 [[GUARD_COND_39]], [[GUARD_COND_38]]
62 ; CHECK-NEXT: [[GUARD_COND_41:%.*]] = and i1 [[GUARD_COND_40]], [[GUARD_COND_39]]
63 ; CHECK-NEXT: [[GUARD_COND_42:%.*]] = and i1 [[GUARD_COND_41]], [[GUARD_COND_40]]
64 ; CHECK-NEXT: [[GUARD_COND_43:%.*]] = and i1 [[GUARD_COND_42]], [[GUARD_COND_41]]
65 ; CHECK-NEXT: [[GUARD_COND_44:%.*]] = and i1 [[GUARD_COND_43]], [[GUARD_COND_42]]
66 ; CHECK-NEXT: [[GUARD_COND_45:%.*]] = and i1 [[GUARD_COND_44]], [[GUARD_COND_43]]
67 ; CHECK-NEXT: [[GUARD_COND_46:%.*]] = and i1 [[GUARD_COND_45]], [[GUARD_COND_44]]
68 ; CHECK-NEXT: [[GUARD_COND_47:%.*]] = and i1 [[GUARD_COND_46]], [[GUARD_COND_45]]
69 ; CHECK-NEXT: [[GUARD_COND_48:%.*]] = and i1 [[GUARD_COND_47]], [[GUARD_COND_46]]
70 ; CHECK-NEXT: [[GUARD_COND_49:%.*]] = and i1 [[GUARD_COND_48]], [[GUARD_COND_47]]
71 ; CHECK-NEXT: [[GUARD_COND_50:%.*]] = and i1 [[GUARD_COND_49]], [[GUARD_COND_48]]
72 ; CHECK-NEXT: [[GUARD_COND_51:%.*]] = and i1 [[GUARD_COND_50]], [[GUARD_COND_49]]
73 ; CHECK-NEXT: [[GUARD_COND_52:%.*]] = and i1 [[GUARD_COND_51]], [[GUARD_COND_50]]
74 ; CHECK-NEXT: [[GUARD_COND_53:%.*]] = and i1 [[GUARD_COND_52]], [[GUARD_COND_51]]
75 ; CHECK-NEXT: [[GUARD_COND_54:%.*]] = and i1 [[GUARD_COND_53]], [[GUARD_COND_52]]
76 ; CHECK-NEXT: [[GUARD_COND_55:%.*]] = and i1 [[GUARD_COND_54]], [[GUARD_COND_53]]
77 ; CHECK-NEXT: [[GUARD_COND_56:%.*]] = and i1 [[GUARD_COND_55]], [[GUARD_COND_54]]
78 ; CHECK-NEXT: [[GUARD_COND_57:%.*]] = and i1 [[GUARD_COND_56]], [[GUARD_COND_55]]
79 ; CHECK-NEXT: [[GUARD_COND_58:%.*]] = and i1 [[GUARD_COND_57]], [[GUARD_COND_56]]
80 ; CHECK-NEXT: [[GUARD_COND_59:%.*]] = and i1 [[GUARD_COND_58]], [[GUARD_COND_57]]
81 ; CHECK-NEXT: [[GUARD_COND_60:%.*]] = and i1 [[GUARD_COND_59]], [[GUARD_COND_58]]
82 ; CHECK-NEXT: [[GUARD_COND_61:%.*]] = and i1 [[GUARD_COND_60]], [[GUARD_COND_59]]
83 ; CHECK-NEXT: [[GUARD_COND_62:%.*]] = and i1 [[GUARD_COND_61]], [[GUARD_COND_60]]
84 ; CHECK-NEXT: [[GUARD_COND_63:%.*]] = and i1 [[GUARD_COND_62]], [[GUARD_COND_61]]
85 ; CHECK-NEXT: [[GUARD_COND_64:%.*]] = and i1 [[GUARD_COND_63]], [[GUARD_COND_62]]
86 ; CHECK-NEXT: [[GUARD_COND_65:%.*]] = and i1 [[GUARD_COND_64]], [[GUARD_COND_63]]
87 ; CHECK-NEXT: [[GUARD_COND_66:%.*]] = and i1 [[GUARD_COND_65]], [[GUARD_COND_64]]
88 ; CHECK-NEXT: [[GUARD_COND_67:%.*]] = and i1 [[GUARD_COND_66]], [[GUARD_COND_65]]
89 ; CHECK-NEXT: [[GUARD_COND_68:%.*]] = and i1 [[GUARD_COND_67]], [[GUARD_COND_66]]
90 ; CHECK-NEXT: [[GUARD_COND_69:%.*]] = and i1 [[GUARD_COND_68]], [[GUARD_COND_67]]
91 ; CHECK-NEXT: [[GUARD_COND_70:%.*]] = and i1 [[GUARD_COND_69]], [[GUARD_COND_68]]
92 ; CHECK-NEXT: [[GUARD_COND_71:%.*]] = and i1 [[GUARD_COND_70]], [[GUARD_COND_69]]
93 ; CHECK-NEXT: [[GUARD_COND_72:%.*]] = and i1 [[GUARD_COND_71]], [[GUARD_COND_70]]
94 ; CHECK-NEXT: [[GUARD_COND_73:%.*]] = and i1 [[GUARD_COND_72]], [[GUARD_COND_71]]
95 ; CHECK-NEXT: [[GUARD_COND_74:%.*]] = and i1 [[GUARD_COND_73]], [[GUARD_COND_72]]
96 ; CHECK-NEXT: [[GUARD_COND_75:%.*]] = and i1 [[GUARD_COND_74]], [[GUARD_COND_73]]
97 ; CHECK-NEXT: [[GUARD_COND_76:%.*]] = and i1 [[GUARD_COND_75]], [[GUARD_COND_74]]
98 ; CHECK-NEXT: [[GUARD_COND_77:%.*]] = and i1 [[GUARD_COND_76]], [[GUARD_COND_75]]
99 ; CHECK-NEXT: [[GUARD_COND_78:%.*]] = and i1 [[GUARD_COND_77]], [[GUARD_COND_76]]
100 ; CHECK-NEXT: [[GUARD_COND_79:%.*]] = and i1 [[GUARD_COND_78]], [[GUARD_COND_77]]
101 ; CHECK-NEXT: [[GUARD_COND_80:%.*]] = and i1 [[GUARD_COND_79]], [[GUARD_COND_78]]
102 ; CHECK-NEXT: [[GUARD_COND_81:%.*]] = and i1 [[GUARD_COND_80]], [[GUARD_COND_79]]
103 ; CHECK-NEXT: [[GUARD_COND_82:%.*]] = and i1 [[GUARD_COND_81]], [[GUARD_COND_80]]
104 ; CHECK-NEXT: [[GUARD_COND_83:%.*]] = and i1 [[GUARD_COND_82]], [[GUARD_COND_81]]
105 ; CHECK-NEXT: [[GUARD_COND_84:%.*]] = and i1 [[GUARD_COND_83]], [[GUARD_COND_82]]
106 ; CHECK-NEXT: [[GUARD_COND_85:%.*]] = and i1 [[GUARD_COND_84]], [[GUARD_COND_83]]
107 ; CHECK-NEXT: [[GUARD_COND_86:%.*]] = and i1 [[GUARD_COND_85]], [[GUARD_COND_84]]
108 ; CHECK-NEXT: [[GUARD_COND_87:%.*]] = and i1 [[GUARD_COND_86]], [[GUARD_COND_85]]
109 ; CHECK-NEXT: [[GUARD_COND_88:%.*]] = and i1 [[GUARD_COND_87]], [[GUARD_COND_86]]
110 ; CHECK-NEXT: [[GUARD_COND_89:%.*]] = and i1 [[GUARD_COND_88]], [[GUARD_COND_87]]
111 ; CHECK-NEXT: [[GUARD_COND_90:%.*]] = and i1 [[GUARD_COND_89]], [[GUARD_COND_88]]
112 ; CHECK-NEXT: [[GUARD_COND_91:%.*]] = and i1 [[GUARD_COND_90]], [[GUARD_COND_89]]
113 ; CHECK-NEXT: [[GUARD_COND_92:%.*]] = and i1 [[GUARD_COND_91]], [[GUARD_COND_90]]
114 ; CHECK-NEXT: [[GUARD_COND_93:%.*]] = and i1 [[GUARD_COND_92]], [[GUARD_COND_91]]
115 ; CHECK-NEXT: [[GUARD_COND_94:%.*]] = and i1 [[GUARD_COND_93]], [[GUARD_COND_92]]
116 ; CHECK-NEXT: [[GUARD_COND_95:%.*]] = and i1 [[GUARD_COND_94]], [[GUARD_COND_93]]
117 ; CHECK-NEXT: [[GUARD_COND_96:%.*]] = and i1 [[GUARD_COND_95]], [[GUARD_COND_94]]
118 ; CHECK-NEXT: [[GUARD_COND_97:%.*]] = and i1 [[GUARD_COND_96]], [[GUARD_COND_95]]
119 ; CHECK-NEXT: [[GUARD_COND_98:%.*]] = and i1 [[GUARD_COND_97]], [[GUARD_COND_96]]
120 ; CHECK-NEXT: [[GUARD_COND_99:%.*]] = and i1 [[GUARD_COND_98]], [[GUARD_COND_97]]
121 ; CHECK-NEXT: [[TMP4:%.*]] = and i1 [[UNRELATED_COND]], [[TMP3]]
122 ; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 [[TMP4]], i32 9) [ "deopt"() ]
123 ; CHECK-NEXT: call void @llvm.assume(i1 [[GUARD_COND_99]])
124 ; CHECK-NEXT: [[I_I64:%.*]] = zext i32 [[I]] to i64
125 ; CHECK-NEXT: [[ARRAY_I_PTR:%.*]] = getelementptr inbounds i32, ptr [[ARRAY:%.*]], i64 [[I_I64]]
126 ; CHECK-NEXT: [[ARRAY_I:%.*]] = load i32, ptr [[ARRAY_I_PTR]], align 4
127 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
128 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
129 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
130 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
131 ; CHECK: exit.loopexit:
132 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[LOOP]] ]
133 ; CHECK-NEXT: br label [[EXIT]]
135 ; CHECK-NEXT: [[RESULT:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[LOOP_ACC_NEXT_LCSSA]], [[EXIT_LOOPEXIT]] ]
136 ; CHECK-NEXT: ret i32 [[RESULT]]
139 %tmp5 = icmp eq i32 %n, 0
140 br i1 %tmp5, label %exit, label %loop.preheader
146 %loop.acc = phi i32 [ %loop.acc.next, %loop ], [ 0, %loop.preheader ]
147 %i = phi i32 [ %i.next, %loop ], [ 0, %loop.preheader ]
148 %within.bounds = icmp ult i32 %i, %length
149 %unrelated.cond = icmp eq i32 %x, %i
150 %guard.cond.2 = and i1 %within.bounds, %unrelated.cond
151 %guard.cond.3 = and i1 %guard.cond.2, %unrelated.cond
152 %guard.cond.4 = and i1 %guard.cond.3, %guard.cond.2
153 %guard.cond.5 = and i1 %guard.cond.4, %guard.cond.3
154 %guard.cond.6 = and i1 %guard.cond.5, %guard.cond.4
155 %guard.cond.7 = and i1 %guard.cond.6, %guard.cond.5
156 %guard.cond.8 = and i1 %guard.cond.7, %guard.cond.6
157 %guard.cond.9 = and i1 %guard.cond.8, %guard.cond.7
158 %guard.cond.10 = and i1 %guard.cond.9, %guard.cond.8
159 %guard.cond.11 = and i1 %guard.cond.10, %guard.cond.9
160 %guard.cond.12 = and i1 %guard.cond.11, %guard.cond.10
161 %guard.cond.13 = and i1 %guard.cond.12, %guard.cond.11
162 %guard.cond.14 = and i1 %guard.cond.13, %guard.cond.12
163 %guard.cond.15 = and i1 %guard.cond.14, %guard.cond.13
164 %guard.cond.16 = and i1 %guard.cond.15, %guard.cond.14
165 %guard.cond.17 = and i1 %guard.cond.16, %guard.cond.15
166 %guard.cond.18 = and i1 %guard.cond.17, %guard.cond.16
167 %guard.cond.19 = and i1 %guard.cond.18, %guard.cond.17
168 %guard.cond.20 = and i1 %guard.cond.19, %guard.cond.18
169 %guard.cond.21 = and i1 %guard.cond.20, %guard.cond.19
170 %guard.cond.22 = and i1 %guard.cond.21, %guard.cond.20
171 %guard.cond.23 = and i1 %guard.cond.22, %guard.cond.21
172 %guard.cond.24 = and i1 %guard.cond.23, %guard.cond.22
173 %guard.cond.25 = and i1 %guard.cond.24, %guard.cond.23
174 %guard.cond.26 = and i1 %guard.cond.25, %guard.cond.24
175 %guard.cond.27 = and i1 %guard.cond.26, %guard.cond.25
176 %guard.cond.28 = and i1 %guard.cond.27, %guard.cond.26
177 %guard.cond.29 = and i1 %guard.cond.28, %guard.cond.27
178 %guard.cond.30 = and i1 %guard.cond.29, %guard.cond.28
179 %guard.cond.31 = and i1 %guard.cond.30, %guard.cond.29
180 %guard.cond.32 = and i1 %guard.cond.31, %guard.cond.30
181 %guard.cond.33 = and i1 %guard.cond.32, %guard.cond.31
182 %guard.cond.34 = and i1 %guard.cond.33, %guard.cond.32
183 %guard.cond.35 = and i1 %guard.cond.34, %guard.cond.33
184 %guard.cond.36 = and i1 %guard.cond.35, %guard.cond.34
185 %guard.cond.37 = and i1 %guard.cond.36, %guard.cond.35
186 %guard.cond.38 = and i1 %guard.cond.37, %guard.cond.36
187 %guard.cond.39 = and i1 %guard.cond.38, %guard.cond.37
188 %guard.cond.40 = and i1 %guard.cond.39, %guard.cond.38
189 %guard.cond.41 = and i1 %guard.cond.40, %guard.cond.39
190 %guard.cond.42 = and i1 %guard.cond.41, %guard.cond.40
191 %guard.cond.43 = and i1 %guard.cond.42, %guard.cond.41
192 %guard.cond.44 = and i1 %guard.cond.43, %guard.cond.42
193 %guard.cond.45 = and i1 %guard.cond.44, %guard.cond.43
194 %guard.cond.46 = and i1 %guard.cond.45, %guard.cond.44
195 %guard.cond.47 = and i1 %guard.cond.46, %guard.cond.45
196 %guard.cond.48 = and i1 %guard.cond.47, %guard.cond.46
197 %guard.cond.49 = and i1 %guard.cond.48, %guard.cond.47
198 %guard.cond.50 = and i1 %guard.cond.49, %guard.cond.48
199 %guard.cond.51 = and i1 %guard.cond.50, %guard.cond.49
200 %guard.cond.52 = and i1 %guard.cond.51, %guard.cond.50
201 %guard.cond.53 = and i1 %guard.cond.52, %guard.cond.51
202 %guard.cond.54 = and i1 %guard.cond.53, %guard.cond.52
203 %guard.cond.55 = and i1 %guard.cond.54, %guard.cond.53
204 %guard.cond.56 = and i1 %guard.cond.55, %guard.cond.54
205 %guard.cond.57 = and i1 %guard.cond.56, %guard.cond.55
206 %guard.cond.58 = and i1 %guard.cond.57, %guard.cond.56
207 %guard.cond.59 = and i1 %guard.cond.58, %guard.cond.57
208 %guard.cond.60 = and i1 %guard.cond.59, %guard.cond.58
209 %guard.cond.61 = and i1 %guard.cond.60, %guard.cond.59
210 %guard.cond.62 = and i1 %guard.cond.61, %guard.cond.60
211 %guard.cond.63 = and i1 %guard.cond.62, %guard.cond.61
212 %guard.cond.64 = and i1 %guard.cond.63, %guard.cond.62
213 %guard.cond.65 = and i1 %guard.cond.64, %guard.cond.63
214 %guard.cond.66 = and i1 %guard.cond.65, %guard.cond.64
215 %guard.cond.67 = and i1 %guard.cond.66, %guard.cond.65
216 %guard.cond.68 = and i1 %guard.cond.67, %guard.cond.66
217 %guard.cond.69 = and i1 %guard.cond.68, %guard.cond.67
218 %guard.cond.70 = and i1 %guard.cond.69, %guard.cond.68
219 %guard.cond.71 = and i1 %guard.cond.70, %guard.cond.69
220 %guard.cond.72 = and i1 %guard.cond.71, %guard.cond.70
221 %guard.cond.73 = and i1 %guard.cond.72, %guard.cond.71
222 %guard.cond.74 = and i1 %guard.cond.73, %guard.cond.72
223 %guard.cond.75 = and i1 %guard.cond.74, %guard.cond.73
224 %guard.cond.76 = and i1 %guard.cond.75, %guard.cond.74
225 %guard.cond.77 = and i1 %guard.cond.76, %guard.cond.75
226 %guard.cond.78 = and i1 %guard.cond.77, %guard.cond.76
227 %guard.cond.79 = and i1 %guard.cond.78, %guard.cond.77
228 %guard.cond.80 = and i1 %guard.cond.79, %guard.cond.78
229 %guard.cond.81 = and i1 %guard.cond.80, %guard.cond.79
230 %guard.cond.82 = and i1 %guard.cond.81, %guard.cond.80
231 %guard.cond.83 = and i1 %guard.cond.82, %guard.cond.81
232 %guard.cond.84 = and i1 %guard.cond.83, %guard.cond.82
233 %guard.cond.85 = and i1 %guard.cond.84, %guard.cond.83
234 %guard.cond.86 = and i1 %guard.cond.85, %guard.cond.84
235 %guard.cond.87 = and i1 %guard.cond.86, %guard.cond.85
236 %guard.cond.88 = and i1 %guard.cond.87, %guard.cond.86
237 %guard.cond.89 = and i1 %guard.cond.88, %guard.cond.87
238 %guard.cond.90 = and i1 %guard.cond.89, %guard.cond.88
239 %guard.cond.91 = and i1 %guard.cond.90, %guard.cond.89
240 %guard.cond.92 = and i1 %guard.cond.91, %guard.cond.90
241 %guard.cond.93 = and i1 %guard.cond.92, %guard.cond.91
242 %guard.cond.94 = and i1 %guard.cond.93, %guard.cond.92
243 %guard.cond.95 = and i1 %guard.cond.94, %guard.cond.93
244 %guard.cond.96 = and i1 %guard.cond.95, %guard.cond.94
245 %guard.cond.97 = and i1 %guard.cond.96, %guard.cond.95
246 %guard.cond.98 = and i1 %guard.cond.97, %guard.cond.96
247 %guard.cond.99 = and i1 %guard.cond.98, %guard.cond.97
248 call void (i1, ...) @llvm.experimental.guard(i1 %guard.cond.99, i32 9) [ "deopt"() ]
250 %i.i64 = zext i32 %i to i64
251 %array.i.ptr = getelementptr inbounds i32, ptr %array, i64 %i.i64
252 %array.i = load i32, ptr %array.i.ptr, align 4
253 %loop.acc.next = add i32 %loop.acc, %array.i
255 %i.next = add nuw i32 %i, 1
256 %continue = icmp ult i32 %i.next, %n
257 br i1 %continue, label %loop, label %exit
260 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %loop ]