1 ; RUN: opt %loadPolly -polly-pragma-based-opts=1 -polly-print-opt-isl -disable-output < %s | FileCheck %s --match-full-lines
2 ; RUN: opt %loadPolly -polly-pragma-based-opts=0 -polly-print-opt-isl -disable-output < %s | FileCheck %s --check-prefix=OFF --match-full-lines
4 ; Partial unroll by a factor of 4.
6 define void @func(i32 %n, ptr noalias nonnull %A) {
11 %j = phi i32 [0, %entry], [%j.inc, %inc]
12 %j.cmp = icmp slt i32 %j, %n
13 br i1 %j.cmp, label %body, label %exit
16 store double 42.0, ptr %A
20 %j.inc = add nuw nsw i32 %j, 1
21 br label %for, !llvm.loop !2
31 !2 = distinct !{!2, !5}
32 !5 = !{!"llvm.loop.unroll.count", i4 4}
35 ; CHECK-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':
36 ; CHECK: domain: "[n] -> { Stmt_body[i0] : 0 <= i0 < n }"
37 ; CHECK: schedule: "[n] -> [{ Stmt_body[i0] -> [(i0 - (i0) mod 4)] }]"
39 ; CHECK-NEXT: - filter: "[n] -> { Stmt_body[i0] : (i0) mod 4 = 0 }"
40 ; CHECK-NEXT: - filter: "[n] -> { Stmt_body[i0] : (-1 + i0) mod 4 = 0 }"
41 ; CHECK-NEXT: - filter: "[n] -> { Stmt_body[i0] : (2 + i0) mod 4 = 0 }"
42 ; CHECK-NEXT: - filter: "[n] -> { Stmt_body[i0] : (1 + i0) mod 4 = 0 }"
45 ; OFF-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':
46 ; OFF-NEXT: Calculated schedule: