1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2; 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. 6; 7; CHECK: Context: 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)) } 34; 35; void jd(int *A, int *p /* in [256, 0) */) { 36; for (int i = 0; i < 1024; i++) 37; A[i + *p] = i; 38; } 39; 40target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 41 42define void @jd(i32* %A, 43 i32* %p_0, 44 i32* %p_1, 45 i32* %p_2, 46 i32* %p_3, 47 i32* %p_4, 48 i32* %p_5, 49 i32* %p_6, 50 i32* %p_7, 51 i32* %p_8, 52 i32* %p_9, 53 i32* %p_10, 54 i32* %p_11, 55 i32* %p_12, 56 i32* %p_13, 57 i32* %p_14, 58 i32* %p_15 59 ) { 60entry: 61 %tmp_0 = load i32, i32* %p_0, !range !0 62 %tmp_1 = load i32, i32* %p_1, !range !0 63 %tmp_2 = load i32, i32* %p_2, !range !0 64 %tmp_3 = load i32, i32* %p_3, !range !0 65 %tmp_4 = load i32, i32* %p_4, !range !0 66 %tmp_5 = load i32, i32* %p_5, !range !0 67 %tmp_6 = load i32, i32* %p_6, !range !0 68 %tmp_7 = load i32, i32* %p_7, !range !0 69 %tmp_8 = load i32, i32* %p_8, !range !0 70 %tmp_9 = load i32, i32* %p_9, !range !0 71 %tmp_10 = load i32, i32* %p_10, !range !0 72 %tmp_11 = load i32, i32* %p_11, !range !0 73 %tmp_12 = load i32, i32* %p_12, !range !0 74 %tmp_13 = load i32, i32* %p_13, !range !0 75 %tmp_14 = load i32, i32* %p_14, !range !0 76 %tmp_15 = load i32, i32* %p_15, !range !0 77 br label %for.cond 78 79for.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 83 84for.body_0: 85 %add_0 = add i32 %i.0, %tmp_0 86 %idxprom_0 = sext i32 %add_0 to i64 87 %arrayidx_0 = getelementptr inbounds i32, i32* %A, i64 %idxprom_0 88 store i32 %i.0, i32* %arrayidx_0, align 4 89 br label %for.body_1 90 91for.body_1: 92 %add_1 = add i32 %i.0, %tmp_1 93 %idxprom_1 = sext i32 %add_1 to i64 94 %arrayidx_1 = getelementptr inbounds i32, i32* %A, i64 %idxprom_1 95 store i32 %i.0, i32* %arrayidx_1, align 4 96 br label %for.body_2 97 98for.body_2: 99 %add_2 = add i32 %i.0, %tmp_2 100 %idxprom_2 = sext i32 %add_2 to i64 101 %arrayidx_2 = getelementptr inbounds i32, i32* %A, i64 %idxprom_2 102 store i32 %i.0, i32* %arrayidx_2, align 4 103 br label %for.body_3 104 105for.body_3: 106 %add_3 = add i32 %i.0, %tmp_3 107 %idxprom_3 = sext i32 %add_3 to i64 108 %arrayidx_3 = getelementptr inbounds i32, i32* %A, i64 %idxprom_3 109 store i32 %i.0, i32* %arrayidx_3, align 4 110 br label %for.body_4 111 112for.body_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, i32* %A, i64 %idxprom_4 116 store i32 %i.0, i32* %arrayidx_4, align 4 117 br label %for.body_5 118 119for.body_5: 120 %add_5 = add i32 %i.0, %tmp_5 121 %idxprom_5 = sext i32 %add_5 to i64 122 %arrayidx_5 = getelementptr inbounds i32, i32* %A, i64 %idxprom_5 123 store i32 %i.0, i32* %arrayidx_5, align 4 124 br label %for.body_6 125 126for.body_6: 127 %add_6 = add i32 %i.0, %tmp_6 128 %idxprom_6 = sext i32 %add_6 to i64 129 %arrayidx_6 = getelementptr inbounds i32, i32* %A, i64 %idxprom_6 130 store i32 %i.0, i32* %arrayidx_6, align 4 131 br label %for.body_7 132 133for.body_7: 134 %add_7 = add i32 %i.0, %tmp_7 135 %idxprom_7 = sext i32 %add_7 to i64 136 %arrayidx_7 = getelementptr inbounds i32, i32* %A, i64 %idxprom_7 137 store i32 %i.0, i32* %arrayidx_7, align 4 138 br label %for.body_8 139 140for.body_8: 141 %add_8 = add i32 %i.0, %tmp_8 142 %idxprom_8 = sext i32 %add_8 to i64 143 %arrayidx_8 = getelementptr inbounds i32, i32* %A, i64 %idxprom_8 144 store i32 %i.0, i32* %arrayidx_8, align 4 145 br label %for.body_9 146 147for.body_9: 148 %add_9 = add i32 %i.0, %tmp_9 149 %idxprom_9 = sext i32 %add_9 to i64 150 %arrayidx_9 = getelementptr inbounds i32, i32* %A, i64 %idxprom_9 151 store i32 %i.0, i32* %arrayidx_9, align 4 152 br label %for.body_10 153 154for.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, i32* %A, i64 %idxprom_10 158 store i32 %i.0, i32* %arrayidx_10, align 4 159 br label %for.body_11 160 161for.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, i32* %A, i64 %idxprom_11 165 store i32 %i.0, i32* %arrayidx_11, align 4 166 br label %for.body_12 167 168for.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, i32* %A, i64 %idxprom_12 172 store i32 %i.0, i32* %arrayidx_12, align 4 173 br label %for.body_13 174 175for.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, i32* %A, i64 %idxprom_13 179 store i32 %i.0, i32* %arrayidx_13, align 4 180 br label %for.body_14 181 182for.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, i32* %A, i64 %idxprom_14 186 store i32 %i.0, i32* %arrayidx_14, align 4 187 br label %for.body_15 188 189for.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, i32* %A, i64 %idxprom_15 193 store i32 %i.0, i32* %arrayidx_15, align 4 194 br label %for.body_end 195 196for.body_end: 197 br label %for.inc 198 199for.inc: 200 %inc = add nsw i32 %i.0, 1 201 br label %for.cond 202 203for.end: ; preds = %for.cond 204 ret void 205} 206 207!0 = !{ i32 256, i32 0 } 208