43 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; CHECK: Context:4; CHECK-NEXT: [n] -> { : -9223372036854775808 <= n <= 100 }5;6; void foo(float A[][100], long n) {7; for (long i = 0; i < n; i++)8; A[42][i] = 42.0;9; }10;11target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"12 13@.src = private unnamed_addr constant [12 x i8] c"/tmp/test.c\00", align 114@0 = private unnamed_addr constant { i16, i16, [14 x i8] } { i16 -1, i16 0, [14 x i8] c"'float [100]'\00" }15@1 = private unnamed_addr constant { i16, i16, [7 x i8] } { i16 0, i16 13, [7 x i8] c"'long'\00" }16 17define void @foo(ptr %A, i64 %n) {18entry:19 br label %for.cond20 21for.cond: ; preds = %for.inc, %entry22 %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]23 %cmp = icmp slt i64 %i.0, %n24 br i1 %cmp, label %for.body, label %for.end25 26for.body: ; preds = %for.cond27 %tmp = icmp slt i64 %i.0, 10028 call void @llvm.assume(i1 %tmp)29 %arrayidx1 = getelementptr inbounds [100 x float], ptr %A, i64 42, i64 %i.030 store float 4.200000e+01, ptr %arrayidx1, align 431 br label %for.inc32 33for.inc: ; preds = %for.body34 %inc = add nuw nsw i64 %i.0, 135 br label %for.cond36 37for.end: ; preds = %for.cond38 ret void39}40 41declare void @llvm.assume(i1) #142 43