1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; void f(int *A, int c, int N) {
5 ; for (int i = 0; i < N; i++) {
15 ; CHECK-NEXT: Stmt_bb6
16 ; CHECK-NEXT: Domain :=
17 ; CHECK-NEXT: [N, c] -> { Stmt_bb6[i0] : i0 > c and 0 <= i0 < N };
18 ; CHECK-NEXT: Schedule :=
19 ; CHECK-NEXT: [N, c] -> { Stmt_bb6[i0] -> [i0, 1] };
20 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
21 ; CHECK-NEXT: [N, c] -> { Stmt_bb6[i0] -> MemRef_tmp_0__phi[] };
22 ; CHECK-NEXT: Stmt_bb7
23 ; CHECK-NEXT: Domain :=
24 ; CHECK-NEXT: [N, c] -> { Stmt_bb7[i0] : 0 <= i0 <= c and i0 < N };
25 ; CHECK-NEXT: Schedule :=
26 ; CHECK-NEXT: [N, c] -> { Stmt_bb7[i0] -> [i0, 0] };
27 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
28 ; CHECK-NEXT: [N, c] -> { Stmt_bb7[i0] -> MemRef_tmp_0__phi[] };
29 ; CHECK-NEXT: Stmt_bb8
30 ; CHECK-NEXT: Domain :=
31 ; CHECK-NEXT: [N, c] -> { Stmt_bb8[i0] : 0 <= i0 < N };
32 ; CHECK-NEXT: Schedule :=
33 ; CHECK-NEXT: [N, c] -> { Stmt_bb8[i0] -> [i0, 2] };
34 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
35 ; CHECK-NEXT: [N, c] -> { Stmt_bb8[i0] -> MemRef_tmp_0__phi[] };
36 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
37 ; CHECK-NEXT: [N, c] -> { Stmt_bb8[i0] -> MemRef_tmp_0[] };
38 ; CHECK-NEXT: Stmt_bb8b
39 ; CHECK-NEXT: Domain :=
40 ; CHECK-NEXT: [N, c] -> { Stmt_bb8b[i0] : 0 <= i0 < N };
41 ; CHECK-NEXT: Schedule :=
42 ; CHECK-NEXT: [N, c] -> { Stmt_bb8b[i0] -> [i0, 3] };
43 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
44 ; CHECK-NEXT: [N, c] -> { Stmt_bb8b[i0] -> MemRef_A[i0] };
45 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
46 ; CHECK-NEXT: [N, c] -> { Stmt_bb8b[i0] -> MemRef_tmp_0[] };
49 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
51 define void @f(ptr %A, i32 %c, i32 %N) {
53 %tmp = sext i32 %N to i64
54 %tmp1 = sext i32 %c to i64
57 bb2: ; preds = %bb10, %bb
58 %indvars.iv = phi i64 [ %indvars.iv.next, %bb10 ], [ 0, %bb ]
59 %tmp3 = icmp slt i64 %indvars.iv, %tmp
60 br i1 %tmp3, label %bb4, label %bb11
63 %tmp5 = icmp sgt i64 %indvars.iv, %tmp1
64 br i1 %tmp5, label %bb6, label %bb7
72 bb8: ; preds = %bb7, %bb6
73 %tmp.0 = phi i32 [ 3, %bb6 ], [ 5, %bb7 ]
77 %tmp9 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
78 store i32 %tmp.0, ptr %tmp9, align 4
82 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1