xref: /llvm-project/polly/test/ScheduleOptimizer/ManualOptimization/unroll_full.ll (revision e1f056f692d869708c1898d9d65a69ac5584a0ed)
1; RUN: opt %loadNPMPolly '-passes=print<polly-opt-isl>' -disable-output < %s | FileCheck %s --match-full-lines
2;
3; Full unroll of a loop with 5 iterations.
4;
5define void @func(ptr noalias nonnull %A) {
6entry:
7  br label %for
8
9for:
10  %j = phi i32 [0, %entry], [%j.inc, %inc]
11  %j.cmp = icmp slt i32 %j, 5
12  br i1 %j.cmp, label %body, label %exit
13
14    body:
15      store double 42.0, ptr %A
16      br label %inc
17
18inc:
19  %j.inc = add nuw nsw i32 %j, 1
20  br label %for, !llvm.loop !2
21
22exit:
23  br label %return
24
25return:
26  ret void
27}
28
29
30!2 = distinct !{!2, !5}
31!5 = !{!"llvm.loop.unroll.full"}
32
33
34; CHECK-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':
35; CHECK:       domain: "{ Stmt_body[i0] : 0 <= i0 <= 4 }"
36; CHECK:         sequence:
37; CHECK-NEXT:      - filter: "{ Stmt_body[0] }"
38; CHECK-NEXT:      - filter: "{ Stmt_body[1] }"
39; CHECK-NEXT:      - filter: "{ Stmt_body[2] }"
40; CHECK-NEXT:      - filter: "{ Stmt_body[3] }"
41; CHECK-NEXT:      - filter: "{ Stmt_body[4] }"
42