1 ; RUN: opt %loadPolly -polly-scops -analyze \
2 ; RUN: < %s | FileCheck %s
4 ; CHECK-NOT: Assumed Context:
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 %struct.hoge = type { i32, %struct.widget*, %struct.ham*, %struct.ham*, i32, %struct.wombat*, double*, i32, i32, i32**, i32, i32*, [6 x i32], i32, %struct.foo*, i32 }
8 %struct.widget = type { i32, i32, %struct.wombat*, i32*, %struct.quux*, i32, %struct.barney*, i32, i32, [3 x i32], i32 }
9 %struct.quux = type { %struct.wombat*, i32*, i32*, i32, i32, i32, [3 x [3 x [3 x %struct.hoge.0*]]]* }
10 %struct.hoge.0 = type { i32, %struct.hoge.0* }
11 %struct.barney = type { [3 x i32], [3 x i32] }
12 %struct.ham = type { [3 x i32]*, i32, i32, i32, i32 }
13 %struct.wombat = type { %struct.barney*, i32, i32 }
14 %struct.foo = type { i32, i32, i32, i32, i32*, i32*, %struct.wibble**, %struct.wibble**, i32*, i32*, %struct.wibble*, %struct.wibble* }
15 %struct.wibble = type { %struct.foo.1**, i32 }
16 %struct.foo.1 = type { [3 x i32], [3 x i32], i32, i32, [4 x i32], [4 x i32] }
18 ; Function Attrs: nounwind uwtable
19 define void @hoge() #0 {
21 %tmp52 = alloca %struct.hoge*, align 8
22 %tmp53 = alloca %struct.barney*, align 8
23 %tmp54 = alloca %struct.barney*, align 8
24 %tmp55 = alloca %struct.barney*, align 8
28 switch i32 undef, label %bb59 [
40 %tmp = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
41 %tmp60 = getelementptr inbounds %struct.barney, %struct.barney* %tmp, i32 0, i32 1
42 %tmp61 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp60, i64 0, i64 0
43 %tmp62 = load i32, i32* %tmp61, align 4, !tbaa !5
44 %tmp63 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
45 %tmp64 = getelementptr inbounds %struct.barney, %struct.barney* %tmp63, i32 0, i32 0
46 %tmp65 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp64, i64 0, i64 0
47 %tmp66 = sub nsw i32 %tmp62, 0
48 %tmp67 = add nsw i32 %tmp66, 1
49 %tmp68 = icmp slt i32 0, %tmp67
50 br i1 %tmp68, label %bb69, label %bb70
55 bb70: ; preds = %bb69, %bb59
56 %tmp71 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
57 %tmp72 = getelementptr inbounds %struct.barney, %struct.barney* %tmp71, i32 0, i32 1
58 %tmp73 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp72, i64 0, i64 1
59 %tmp74 = load i32, i32* %tmp73, align 4, !tbaa !5
60 %tmp75 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
61 %tmp76 = getelementptr inbounds %struct.barney, %struct.barney* %tmp75, i32 0, i32 0
62 %tmp77 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp76, i64 0, i64 1
63 %tmp78 = sub nsw i32 %tmp74, 0
64 %tmp79 = add nsw i32 %tmp78, 1
65 %tmp80 = icmp slt i32 0, %tmp79
66 br i1 %tmp80, label %bb81, label %bb82
71 bb82: ; preds = %bb81, %bb70
72 %tmp83 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
73 %tmp84 = getelementptr inbounds %struct.barney, %struct.barney* %tmp83, i32 0, i32 1
74 %tmp85 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp84, i64 0, i64 0
75 %tmp86 = load i32, i32* %tmp85, align 4, !tbaa !5
76 %tmp87 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
77 %tmp88 = getelementptr inbounds %struct.barney, %struct.barney* %tmp87, i32 0, i32 0
78 %tmp89 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp88, i64 0, i64 0
79 %tmp90 = sub nsw i32 %tmp86, 0
80 %tmp91 = add nsw i32 %tmp90, 1
81 %tmp92 = icmp slt i32 0, %tmp91
82 br i1 %tmp92, label %bb93, label %bb94
87 bb94: ; preds = %bb93, %bb82
88 %tmp95 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
89 %tmp96 = getelementptr inbounds %struct.barney, %struct.barney* %tmp95, i32 0, i32 1
90 %tmp97 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp96, i64 0, i64 0
91 %tmp98 = load i32, i32* %tmp97, align 4, !tbaa !5
92 %tmp99 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
93 %tmp100 = getelementptr inbounds %struct.barney, %struct.barney* %tmp99, i32 0, i32 0
94 %tmp101 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp100, i64 0, i64 0
95 %tmp102 = sub nsw i32 %tmp98, 0
96 %tmp103 = add nsw i32 %tmp102, 1
97 %tmp104 = icmp slt i32 0, %tmp103
98 br i1 %tmp104, label %bb105, label %bb106
100 bb105: ; preds = %bb94
103 bb106: ; preds = %bb105, %bb94
104 %tmp107 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
105 %tmp108 = getelementptr inbounds %struct.barney, %struct.barney* %tmp107, i32 0, i32 1
106 %tmp109 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp108, i64 0, i64 1
107 %tmp110 = load i32, i32* %tmp109, align 4, !tbaa !5
108 %tmp111 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
109 %tmp112 = getelementptr inbounds %struct.barney, %struct.barney* %tmp111, i32 0, i32 0
110 %tmp113 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp112, i64 0, i64 1
111 %tmp114 = sub nsw i32 %tmp110, 0
112 %tmp115 = add nsw i32 %tmp114, 1
113 %tmp116 = icmp slt i32 0, %tmp115
114 br i1 %tmp116, label %bb117, label %bb118
116 bb117: ; preds = %bb106
119 bb118: ; preds = %bb117, %bb106
120 %tmp119 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
121 %tmp120 = getelementptr inbounds %struct.barney, %struct.barney* %tmp119, i32 0, i32 1
122 %tmp121 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp120, i64 0, i64 0
123 %tmp122 = load i32, i32* %tmp121, align 4, !tbaa !5
124 %tmp123 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
125 %tmp124 = getelementptr inbounds %struct.barney, %struct.barney* %tmp123, i32 0, i32 0
126 %tmp125 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp124, i64 0, i64 0
127 %tmp126 = sub nsw i32 %tmp122, 0
128 %tmp127 = add nsw i32 %tmp126, 1
129 %tmp128 = icmp slt i32 0, %tmp127
130 br i1 %tmp128, label %bb129, label %bb130
132 bb129: ; preds = %bb118
135 bb130: ; preds = %bb129, %bb118
136 %tmp131 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
137 %tmp132 = getelementptr inbounds %struct.barney, %struct.barney* %tmp131, i32 0, i32 1
138 %tmp133 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp132, i64 0, i64 0
139 %tmp134 = load i32, i32* %tmp133, align 4, !tbaa !5
140 %tmp135 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
141 %tmp136 = getelementptr inbounds %struct.barney, %struct.barney* %tmp135, i32 0, i32 0
142 %tmp137 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp136, i64 0, i64 0
143 %tmp138 = sub nsw i32 %tmp134, 0
144 %tmp139 = add nsw i32 %tmp138, 1
145 %tmp140 = icmp slt i32 0, %tmp139
146 br i1 %tmp140, label %bb141, label %bb142
148 bb141: ; preds = %bb130
151 bb142: ; preds = %bb141, %bb130
152 %tmp143 = load %struct.barney*, %struct.barney** %tmp55, align 8, !tbaa !1
153 %tmp144 = getelementptr inbounds %struct.barney, %struct.barney* %tmp143, i32 0, i32 1
154 %tmp145 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp144, i64 0, i64 0
155 %tmp146 = load i32, i32* %tmp145, align 4, !tbaa !5
156 %tmp147 = load %struct.barney*, %struct.barney** %tmp55, align 8, !tbaa !1
157 %tmp148 = getelementptr inbounds %struct.barney, %struct.barney* %tmp147, i32 0, i32 0
158 %tmp149 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp148, i64 0, i64 0
159 %tmp150 = sub nsw i32 %tmp146, 0
160 %tmp151 = add nsw i32 %tmp150, 1
161 %tmp152 = icmp slt i32 0, %tmp151
162 br i1 %tmp152, label %bb153, label %bb154
164 bb153: ; preds = %bb142
167 bb154: ; preds = %bb153, %bb142
168 %tmp155 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
169 %tmp156 = getelementptr inbounds %struct.barney, %struct.barney* %tmp155, i32 0, i32 1
170 %tmp157 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp156, i64 0, i64 0
171 %tmp158 = load i32, i32* %tmp157, align 4, !tbaa !5
172 %tmp159 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
173 %tmp160 = getelementptr inbounds %struct.barney, %struct.barney* %tmp159, i32 0, i32 0
174 %tmp161 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp160, i64 0, i64 0
175 %tmp162 = load i32, i32* %tmp161, align 4, !tbaa !5
176 %tmp163 = sub nsw i32 %tmp158, %tmp162
177 %tmp164 = add nsw i32 %tmp163, 1
178 %tmp165 = icmp slt i32 0, %tmp164
179 br i1 %tmp165, label %bb166, label %bb167
181 bb166: ; preds = %bb154
184 bb167: ; preds = %bb166, %bb154
185 %tmp168 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
186 %tmp169 = getelementptr inbounds %struct.barney, %struct.barney* %tmp168, i32 0, i32 1
187 %tmp170 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp169, i64 0, i64 0
188 %tmp171 = load i32, i32* %tmp170, align 4, !tbaa !5
189 %tmp172 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
190 %tmp173 = getelementptr inbounds %struct.barney, %struct.barney* %tmp172, i32 0, i32 0
191 %tmp174 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp173, i64 0, i64 0
192 %tmp175 = load i32, i32* %tmp174, align 4, !tbaa !5
193 %tmp176 = sub nsw i32 %tmp171, %tmp175
194 %tmp177 = add nsw i32 %tmp176, 1
195 %tmp178 = icmp slt i32 0, %tmp177
196 br i1 %tmp178, label %bb179, label %bb180
198 bb179: ; preds = %bb167
201 bb180: ; preds = %bb179, %bb167
202 %tmp181 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
203 %tmp182 = getelementptr inbounds %struct.barney, %struct.barney* %tmp181, i32 0, i32 1
204 %tmp183 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp182, i64 0, i64 1
205 %tmp184 = load i32, i32* %tmp183, align 4, !tbaa !5
206 %tmp185 = load %struct.barney*, %struct.barney** %tmp53, align 8, !tbaa !1
207 %tmp186 = getelementptr inbounds %struct.barney, %struct.barney* %tmp185, i32 0, i32 0
208 %tmp187 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp186, i64 0, i64 1
209 %tmp188 = load i32, i32* %tmp187, align 4, !tbaa !5
210 %tmp189 = sub nsw i32 %tmp184, %tmp188
211 %tmp190 = add nsw i32 %tmp189, 1
212 %tmp191 = icmp slt i32 0, %tmp190
213 br i1 %tmp191, label %bb192, label %bb193
215 bb192: ; preds = %bb180
218 bb193: ; preds = %bb192, %bb180
219 %tmp194 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
220 %tmp195 = getelementptr inbounds %struct.barney, %struct.barney* %tmp194, i32 0, i32 1
221 %tmp196 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp195, i64 0, i64 0
222 %tmp197 = load i32, i32* %tmp196, align 4, !tbaa !5
223 %tmp198 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
224 %tmp199 = getelementptr inbounds %struct.barney, %struct.barney* %tmp198, i32 0, i32 0
225 %tmp200 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp199, i64 0, i64 0
226 %tmp201 = load i32, i32* %tmp200, align 4, !tbaa !5
227 %tmp202 = sub nsw i32 %tmp197, %tmp201
228 %tmp203 = add nsw i32 %tmp202, 1
229 %tmp204 = icmp slt i32 0, %tmp203
230 br i1 %tmp204, label %bb205, label %bb206
232 bb205: ; preds = %bb193
235 bb206: ; preds = %bb205, %bb193
236 %tmp207 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
237 %tmp208 = getelementptr inbounds %struct.barney, %struct.barney* %tmp207, i32 0, i32 1
238 %tmp209 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp208, i64 0, i64 0
239 %tmp210 = load i32, i32* %tmp209, align 4, !tbaa !5
240 %tmp211 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
241 %tmp212 = getelementptr inbounds %struct.barney, %struct.barney* %tmp211, i32 0, i32 0
242 %tmp213 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp212, i64 0, i64 0
243 %tmp214 = load i32, i32* %tmp213, align 4, !tbaa !5
244 %tmp215 = sub nsw i32 %tmp210, %tmp214
245 %tmp216 = add nsw i32 %tmp215, 1
246 %tmp217 = icmp slt i32 0, %tmp216
247 br i1 %tmp217, label %bb218, label %bb219
249 bb218: ; preds = %bb206
252 bb219: ; preds = %bb218, %bb206
253 %tmp220 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
254 %tmp221 = getelementptr inbounds %struct.barney, %struct.barney* %tmp220, i32 0, i32 1
255 %tmp222 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp221, i64 0, i64 1
256 %tmp223 = load i32, i32* %tmp222, align 4, !tbaa !5
257 %tmp224 = load %struct.barney*, %struct.barney** %tmp54, align 8, !tbaa !1
258 %tmp225 = getelementptr inbounds %struct.barney, %struct.barney* %tmp224, i32 0, i32 0
259 %tmp226 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp225, i64 0, i64 1
260 %tmp227 = load i32, i32* %tmp226, align 4, !tbaa !5
261 %tmp228 = sub nsw i32 %tmp223, %tmp227
262 %tmp229 = add nsw i32 %tmp228, 1
263 %tmp230 = icmp slt i32 0, %tmp229
264 br i1 %tmp230, label %bb231, label %bb232
266 bb231: ; preds = %bb219
269 bb232: ; preds = %bb231, %bb219
270 %tmp233 = load %struct.barney*, %struct.barney** %tmp55, align 8, !tbaa !1
271 %tmp234 = getelementptr inbounds %struct.barney, %struct.barney* %tmp233, i32 0, i32 1
272 %tmp235 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp234, i64 0, i64 0
273 %tmp236 = load i32, i32* %tmp235, align 4, !tbaa !5
274 %tmp237 = load %struct.barney*, %struct.barney** %tmp55, align 8, !tbaa !1
275 %tmp238 = getelementptr inbounds %struct.barney, %struct.barney* %tmp237, i32 0, i32 0
276 %tmp239 = getelementptr inbounds [3 x i32], [3 x i32]* %tmp238, i64 0, i64 0
277 %tmp240 = load i32, i32* %tmp239, align 4, !tbaa !5
278 %tmp241 = sub nsw i32 %tmp236, %tmp240
279 %tmp242 = add nsw i32 %tmp241, 1
280 %tmp243 = icmp slt i32 0, %tmp242
281 br i1 %tmp243, label %bb244, label %bb245
283 bb244: ; preds = %bb232
286 bb245: ; preds = %bb244, %bb232
290 attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
292 !llvm.ident = !{!0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0}
294 !0 = !{!"clang version 3.8.0 (trunk 252261) (llvm/trunk 252271)"}
295 !1 = !{!2, !2, i64 0}
296 !2 = !{!"any pointer", !3, i64 0}
297 !3 = !{!"omnipotent char", !4, i64 0}
298 !4 = !{!"Simple C/C++ TBAA"}
299 !5 = !{!6, !6, i64 0}
300 !6 = !{!"int", !3, i64 0}