1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Check that the context is built fast and does not explode due to us
4 ; combining a large number of non-convex ranges. Instead, after a certain
5 ; time, we store range information with reduced precision.
8 ; CHECK: [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8,
9 ; CHECK: tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15] -> { :
10 ; CHECK: -2147483648 <= tmp_0 <= 2147483647 and
11 ; CHECK: -2147483648 <= tmp_1 <= 2147483647 and
12 ; CHECK: -2147483648 <= tmp_2 <= 2147483647 and
13 ; CHECK: -2147483648 <= tmp_3 <= 2147483647 and
14 ; CHECK: -2147483648 <= tmp_4 <= 2147483647 and
15 ; CHECK: -2147483648 <= tmp_5 <= 2147483647 and
16 ; CHECK: -2147483648 <= tmp_6 <= 2147483647 and
17 ; CHECK: -2147483648 <= tmp_7 <= 2147483647 and
18 ; CHECK: -2147483648 <= tmp_8 <= 2147483647 and
19 ; CHECK: -2147483648 <= tmp_9 <= 2147483647 and
20 ; CHECK: -2147483648 <= tmp_10 <= 2147483647 and
21 ; CHECK: -2147483648 <= tmp_11 <= 2147483647 and
22 ; CHECK: -2147483648 <= tmp_12 <= 2147483647 and
23 ; CHECK: -2147483648 <= tmp_13 <= 2147483647 and
24 ; CHECK: -2147483648 <= tmp_14 <= 2147483647 and
25 ; CHECK: -2147483648 <= tmp_15 <= 2147483647 and
26 ; CHECK: ((tmp_0 >= 256 and tmp_1 >= 256 and tmp_2 >= 256) or
27 ; CHECK: (tmp_0 >= 256 and tmp_1 >= 256 and tmp_2 < 0) or
28 ; CHECK: (tmp_0 >= 256 and tmp_1 < 0 and tmp_2 >= 256) or
29 ; CHECK: (tmp_0 >= 256 and tmp_1 < 0 and tmp_2 < 0) or
30 ; CHECK: (tmp_0 < 0 and tmp_1 >= 256 and tmp_2 >= 256) or
31 ; CHECK: (tmp_0 < 0 and tmp_1 >= 256 and tmp_2 < 0) or
32 ; CHECK: (tmp_0 < 0 and tmp_1 < 0 and tmp_2 >= 256) or
33 ; CHECK: (tmp_0 < 0 and tmp_1 < 0 and tmp_2 < 0)) }
35 ; void jd(int *A, int *p /* in [256, 0) */) {
36 ; for (int i = 0; i < 1024; i++)
40 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
42 define void @jd(ptr %A,
61 %tmp_0 = load i32, ptr %p_0, !range !0
62 %tmp_1 = load i32, ptr %p_1, !range !0
63 %tmp_2 = load i32, ptr %p_2, !range !0
64 %tmp_3 = load i32, ptr %p_3, !range !0
65 %tmp_4 = load i32, ptr %p_4, !range !0
66 %tmp_5 = load i32, ptr %p_5, !range !0
67 %tmp_6 = load i32, ptr %p_6, !range !0
68 %tmp_7 = load i32, ptr %p_7, !range !0
69 %tmp_8 = load i32, ptr %p_8, !range !0
70 %tmp_9 = load i32, ptr %p_9, !range !0
71 %tmp_10 = load i32, ptr %p_10, !range !0
72 %tmp_11 = load i32, ptr %p_11, !range !0
73 %tmp_12 = load i32, ptr %p_12, !range !0
74 %tmp_13 = load i32, ptr %p_13, !range !0
75 %tmp_14 = load i32, ptr %p_14, !range !0
76 %tmp_15 = load i32, ptr %p_15, !range !0
79 for.cond: ; preds = %for.inc, %entry
80 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
81 %exitcond = icmp ne i32 %i.0, 1024
82 br i1 %exitcond, label %for.body_0, label %for.end
85 %add_0 = add i32 %i.0, %tmp_0
86 %idxprom_0 = sext i32 %add_0 to i64
87 %arrayidx_0 = getelementptr inbounds i32, ptr %A, i64 %idxprom_0
88 store i32 %i.0, ptr %arrayidx_0, align 4
92 %add_1 = add i32 %i.0, %tmp_1
93 %idxprom_1 = sext i32 %add_1 to i64
94 %arrayidx_1 = getelementptr inbounds i32, ptr %A, i64 %idxprom_1
95 store i32 %i.0, ptr %arrayidx_1, align 4
99 %add_2 = add i32 %i.0, %tmp_2
100 %idxprom_2 = sext i32 %add_2 to i64
101 %arrayidx_2 = getelementptr inbounds i32, ptr %A, i64 %idxprom_2
102 store i32 %i.0, ptr %arrayidx_2, align 4
106 %add_3 = add i32 %i.0, %tmp_3
107 %idxprom_3 = sext i32 %add_3 to i64
108 %arrayidx_3 = getelementptr inbounds i32, ptr %A, i64 %idxprom_3
109 store i32 %i.0, ptr %arrayidx_3, align 4
113 %add_4 = add i32 %i.0, %tmp_4
114 %idxprom_4 = sext i32 %add_4 to i64
115 %arrayidx_4 = getelementptr inbounds i32, ptr %A, i64 %idxprom_4
116 store i32 %i.0, ptr %arrayidx_4, align 4
120 %add_5 = add i32 %i.0, %tmp_5
121 %idxprom_5 = sext i32 %add_5 to i64
122 %arrayidx_5 = getelementptr inbounds i32, ptr %A, i64 %idxprom_5
123 store i32 %i.0, ptr %arrayidx_5, align 4
127 %add_6 = add i32 %i.0, %tmp_6
128 %idxprom_6 = sext i32 %add_6 to i64
129 %arrayidx_6 = getelementptr inbounds i32, ptr %A, i64 %idxprom_6
130 store i32 %i.0, ptr %arrayidx_6, align 4
134 %add_7 = add i32 %i.0, %tmp_7
135 %idxprom_7 = sext i32 %add_7 to i64
136 %arrayidx_7 = getelementptr inbounds i32, ptr %A, i64 %idxprom_7
137 store i32 %i.0, ptr %arrayidx_7, align 4
141 %add_8 = add i32 %i.0, %tmp_8
142 %idxprom_8 = sext i32 %add_8 to i64
143 %arrayidx_8 = getelementptr inbounds i32, ptr %A, i64 %idxprom_8
144 store i32 %i.0, ptr %arrayidx_8, align 4
148 %add_9 = add i32 %i.0, %tmp_9
149 %idxprom_9 = sext i32 %add_9 to i64
150 %arrayidx_9 = getelementptr inbounds i32, ptr %A, i64 %idxprom_9
151 store i32 %i.0, ptr %arrayidx_9, align 4
152 br label %for.body_10
155 %add_10 = add i32 %i.0, %tmp_10
156 %idxprom_10 = sext i32 %add_10 to i64
157 %arrayidx_10 = getelementptr inbounds i32, ptr %A, i64 %idxprom_10
158 store i32 %i.0, ptr %arrayidx_10, align 4
159 br label %for.body_11
162 %add_11 = add i32 %i.0, %tmp_11
163 %idxprom_11 = sext i32 %add_11 to i64
164 %arrayidx_11 = getelementptr inbounds i32, ptr %A, i64 %idxprom_11
165 store i32 %i.0, ptr %arrayidx_11, align 4
166 br label %for.body_12
169 %add_12 = add i32 %i.0, %tmp_12
170 %idxprom_12 = sext i32 %add_12 to i64
171 %arrayidx_12 = getelementptr inbounds i32, ptr %A, i64 %idxprom_12
172 store i32 %i.0, ptr %arrayidx_12, align 4
173 br label %for.body_13
176 %add_13 = add i32 %i.0, %tmp_13
177 %idxprom_13 = sext i32 %add_13 to i64
178 %arrayidx_13 = getelementptr inbounds i32, ptr %A, i64 %idxprom_13
179 store i32 %i.0, ptr %arrayidx_13, align 4
180 br label %for.body_14
183 %add_14 = add i32 %i.0, %tmp_14
184 %idxprom_14 = sext i32 %add_14 to i64
185 %arrayidx_14 = getelementptr inbounds i32, ptr %A, i64 %idxprom_14
186 store i32 %i.0, ptr %arrayidx_14, align 4
187 br label %for.body_15
190 %add_15 = add i32 %i.0, %tmp_15
191 %idxprom_15 = sext i32 %add_15 to i64
192 %arrayidx_15 = getelementptr inbounds i32, ptr %A, i64 %idxprom_15
193 store i32 %i.0, ptr %arrayidx_15, align 4
194 br label %for.body_end
200 %inc = add nsw i32 %i.0, 1
203 for.end: ; preds = %for.cond
207 !0 = !{ i32 256, i32 0 }