1 ; RUN: opt %loadNPMPolly -pass-remarks-analysis="polly-scops" '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s --check-prefix=REMARK
2 ; RUN: opt %loadNPMPolly '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s
4 ; REMARK: remark: <unknown>:0:0: SCoP begins here.
5 ; REMARK-NEXT: remark: <unknown>:0:0: Use user assumption: [n] -> { : n <= 100 }
6 ; REMARK-NEXT: remark: <unknown>:0:0: Signed-unsigned restriction: [n] -> { : n < 0 }
7 ; REMARK-NEXT: remark: <unknown>:0:0: SCoP ends here.
10 ; CHECK-NEXT: [n] -> { : -9223372036854775808 <= n <= 100 }
12 ; void foo(float A[][100], long n) {
13 ; for (long i = 0; i < n; i++)
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 @.src = private unnamed_addr constant [12 x i8] c"/tmp/test.c\00", align 1
20 @0 = private unnamed_addr constant { i16, i16, [14 x i8] } { i16 -1, i16 0, [14 x i8] c"'float [100]'\00" }
21 @1 = private unnamed_addr constant { i16, i16, [7 x i8] } { i16 0, i16 13, [7 x i8] c"'long'\00" }
23 define void @foo(ptr %A, i64 %n) {
27 for.cond: ; preds = %for.inc, %entry
28 %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]
29 %cmp = icmp ult i64 %i.0, %n
30 br i1 %cmp, label %for.body, label %for.end
32 for.body: ; preds = %for.cond
33 %tmp = icmp slt i64 %i.0, 100
34 call void @llvm.assume(i1 %tmp)
35 %arrayidx1 = getelementptr inbounds [100 x float], ptr %A, i64 42, i64 %i.0
36 store float 4.200000e+01, ptr %arrayidx1, align 4
39 for.inc: ; preds = %for.body
40 %inc = add nuw nsw i64 %i.0, 1
43 for.end: ; preds = %for.cond
47 declare void @llvm.assume(i1) #1