208 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; Check that the context is built fast and does not explode due to us4; combining a large number of non-convex ranges. Instead, after a certain5; 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 and11; CHECK: -2147483648 <= tmp_1 <= 2147483647 and12; CHECK: -2147483648 <= tmp_2 <= 2147483647 and13; CHECK: -2147483648 <= tmp_3 <= 2147483647 and14; CHECK: -2147483648 <= tmp_4 <= 2147483647 and15; CHECK: -2147483648 <= tmp_5 <= 2147483647 and16; CHECK: -2147483648 <= tmp_6 <= 2147483647 and17; CHECK: -2147483648 <= tmp_7 <= 2147483647 and18; CHECK: -2147483648 <= tmp_8 <= 2147483647 and19; CHECK: -2147483648 <= tmp_9 <= 2147483647 and20; CHECK: -2147483648 <= tmp_10 <= 2147483647 and21; CHECK: -2147483648 <= tmp_11 <= 2147483647 and22; CHECK: -2147483648 <= tmp_12 <= 2147483647 and23; CHECK: -2147483648 <= tmp_13 <= 2147483647 and24; CHECK: -2147483648 <= tmp_14 <= 2147483647 and25; CHECK: -2147483648 <= tmp_15 <= 2147483647 and26; CHECK: ((tmp_0 >= 256 and tmp_1 >= 256 and tmp_2 >= 256) or27; CHECK: (tmp_0 >= 256 and tmp_1 >= 256 and tmp_2 < 0) or28; CHECK: (tmp_0 >= 256 and tmp_1 < 0 and tmp_2 >= 256) or29; CHECK: (tmp_0 >= 256 and tmp_1 < 0 and tmp_2 < 0) or30; CHECK: (tmp_0 < 0 and tmp_1 >= 256 and tmp_2 >= 256) or31; CHECK: (tmp_0 < 0 and tmp_1 >= 256 and tmp_2 < 0) or32; CHECK: (tmp_0 < 0 and tmp_1 < 0 and tmp_2 >= 256) or33; 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(ptr %A,43 ptr %p_0,44 ptr %p_1,45 ptr %p_2,46 ptr %p_3,47 ptr %p_4,48 ptr %p_5,49 ptr %p_6,50 ptr %p_7,51 ptr %p_8,52 ptr %p_9,53 ptr %p_10,54 ptr %p_11,55 ptr %p_12,56 ptr %p_13,57 ptr %p_14,58 ptr %p_1559 ) {60entry:61 %tmp_0 = load i32, ptr %p_0, !range !062 %tmp_1 = load i32, ptr %p_1, !range !063 %tmp_2 = load i32, ptr %p_2, !range !064 %tmp_3 = load i32, ptr %p_3, !range !065 %tmp_4 = load i32, ptr %p_4, !range !066 %tmp_5 = load i32, ptr %p_5, !range !067 %tmp_6 = load i32, ptr %p_6, !range !068 %tmp_7 = load i32, ptr %p_7, !range !069 %tmp_8 = load i32, ptr %p_8, !range !070 %tmp_9 = load i32, ptr %p_9, !range !071 %tmp_10 = load i32, ptr %p_10, !range !072 %tmp_11 = load i32, ptr %p_11, !range !073 %tmp_12 = load i32, ptr %p_12, !range !074 %tmp_13 = load i32, ptr %p_13, !range !075 %tmp_14 = load i32, ptr %p_14, !range !076 %tmp_15 = load i32, ptr %p_15, !range !077 br label %for.cond78 79for.cond: ; preds = %for.inc, %entry80 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]81 %exitcond = icmp ne i32 %i.0, 102482 br i1 %exitcond, label %for.body_0, label %for.end83 84for.body_0:85 %add_0 = add i32 %i.0, %tmp_086 %idxprom_0 = sext i32 %add_0 to i6487 %arrayidx_0 = getelementptr inbounds i32, ptr %A, i64 %idxprom_088 store i32 %i.0, ptr %arrayidx_0, align 489 br label %for.body_190 91for.body_1:92 %add_1 = add i32 %i.0, %tmp_193 %idxprom_1 = sext i32 %add_1 to i6494 %arrayidx_1 = getelementptr inbounds i32, ptr %A, i64 %idxprom_195 store i32 %i.0, ptr %arrayidx_1, align 496 br label %for.body_297 98for.body_2:99 %add_2 = add i32 %i.0, %tmp_2100 %idxprom_2 = sext i32 %add_2 to i64101 %arrayidx_2 = getelementptr inbounds i32, ptr %A, i64 %idxprom_2102 store i32 %i.0, ptr %arrayidx_2, align 4103 br label %for.body_3104 105for.body_3:106 %add_3 = add i32 %i.0, %tmp_3107 %idxprom_3 = sext i32 %add_3 to i64108 %arrayidx_3 = getelementptr inbounds i32, ptr %A, i64 %idxprom_3109 store i32 %i.0, ptr %arrayidx_3, align 4110 br label %for.body_4111 112for.body_4:113 %add_4 = add i32 %i.0, %tmp_4114 %idxprom_4 = sext i32 %add_4 to i64115 %arrayidx_4 = getelementptr inbounds i32, ptr %A, i64 %idxprom_4116 store i32 %i.0, ptr %arrayidx_4, align 4117 br label %for.body_5118 119for.body_5:120 %add_5 = add i32 %i.0, %tmp_5121 %idxprom_5 = sext i32 %add_5 to i64122 %arrayidx_5 = getelementptr inbounds i32, ptr %A, i64 %idxprom_5123 store i32 %i.0, ptr %arrayidx_5, align 4124 br label %for.body_6125 126for.body_6:127 %add_6 = add i32 %i.0, %tmp_6128 %idxprom_6 = sext i32 %add_6 to i64129 %arrayidx_6 = getelementptr inbounds i32, ptr %A, i64 %idxprom_6130 store i32 %i.0, ptr %arrayidx_6, align 4131 br label %for.body_7132 133for.body_7:134 %add_7 = add i32 %i.0, %tmp_7135 %idxprom_7 = sext i32 %add_7 to i64136 %arrayidx_7 = getelementptr inbounds i32, ptr %A, i64 %idxprom_7137 store i32 %i.0, ptr %arrayidx_7, align 4138 br label %for.body_8139 140for.body_8:141 %add_8 = add i32 %i.0, %tmp_8142 %idxprom_8 = sext i32 %add_8 to i64143 %arrayidx_8 = getelementptr inbounds i32, ptr %A, i64 %idxprom_8144 store i32 %i.0, ptr %arrayidx_8, align 4145 br label %for.body_9146 147for.body_9:148 %add_9 = add i32 %i.0, %tmp_9149 %idxprom_9 = sext i32 %add_9 to i64150 %arrayidx_9 = getelementptr inbounds i32, ptr %A, i64 %idxprom_9151 store i32 %i.0, ptr %arrayidx_9, align 4152 br label %for.body_10153 154for.body_10:155 %add_10 = add i32 %i.0, %tmp_10156 %idxprom_10 = sext i32 %add_10 to i64157 %arrayidx_10 = getelementptr inbounds i32, ptr %A, i64 %idxprom_10158 store i32 %i.0, ptr %arrayidx_10, align 4159 br label %for.body_11160 161for.body_11:162 %add_11 = add i32 %i.0, %tmp_11163 %idxprom_11 = sext i32 %add_11 to i64164 %arrayidx_11 = getelementptr inbounds i32, ptr %A, i64 %idxprom_11165 store i32 %i.0, ptr %arrayidx_11, align 4166 br label %for.body_12167 168for.body_12:169 %add_12 = add i32 %i.0, %tmp_12170 %idxprom_12 = sext i32 %add_12 to i64171 %arrayidx_12 = getelementptr inbounds i32, ptr %A, i64 %idxprom_12172 store i32 %i.0, ptr %arrayidx_12, align 4173 br label %for.body_13174 175for.body_13:176 %add_13 = add i32 %i.0, %tmp_13177 %idxprom_13 = sext i32 %add_13 to i64178 %arrayidx_13 = getelementptr inbounds i32, ptr %A, i64 %idxprom_13179 store i32 %i.0, ptr %arrayidx_13, align 4180 br label %for.body_14181 182for.body_14:183 %add_14 = add i32 %i.0, %tmp_14184 %idxprom_14 = sext i32 %add_14 to i64185 %arrayidx_14 = getelementptr inbounds i32, ptr %A, i64 %idxprom_14186 store i32 %i.0, ptr %arrayidx_14, align 4187 br label %for.body_15188 189for.body_15:190 %add_15 = add i32 %i.0, %tmp_15191 %idxprom_15 = sext i32 %add_15 to i64192 %arrayidx_15 = getelementptr inbounds i32, ptr %A, i64 %idxprom_15193 store i32 %i.0, ptr %arrayidx_15, align 4194 br label %for.body_end195 196for.body_end:197 br label %for.inc198 199for.inc:200 %inc = add nsw i32 %i.0, 1201 br label %for.cond202 203for.end: ; preds = %for.cond204 ret void205}206 207!0 = !{ i32 256, i32 0 }208