1 ; RUN: opt %loadPolly -polly-detect-unprofitable -analyze -polly-scops -disable-polly-intra-scop-scalar-to-array -polly-model-phi-nodes < %s | FileCheck %s
3 ; void f(int *A, int c, int N) {
5 ; for (int i = 0; i < N; i++) {
16 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
17 ; CHECK: [N, c] -> { Stmt_bb6[i0] -> MemRef_tmp_0[] };
19 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
20 ; CHECK: [N, c] -> { Stmt_bb7[i0] -> MemRef_tmp_0[] };
22 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
23 ; CHECK: [N, c] -> { Stmt_bb8[i0] -> MemRef_tmp_0[] };
24 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
25 ; CHECK: [N, c] -> { Stmt_bb8[i0] -> MemRef_tmp_0[] };
27 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
28 ; CHECK: [N, c] -> { Stmt_bb8b[i0] -> MemRef_tmp_0[] };
29 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
30 ; CHECK: [N, c] -> { Stmt_bb8b[i0] -> MemRef_A[i0] };
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
35 define void @f(i32* %A, i32 %c, i32 %N) {
37 %tmp = sext i32 %N to i64
38 %tmp1 = sext i32 %c to i64
41 bb2: ; preds = %bb10, %bb
42 %indvars.iv = phi i64 [ %indvars.iv.next, %bb10 ], [ 0, %bb ]
43 %tmp3 = icmp slt i64 %indvars.iv, %tmp
44 br i1 %tmp3, label %bb4, label %bb11
47 %tmp5 = icmp sgt i64 %indvars.iv, %tmp1
48 br i1 %tmp5, label %bb6, label %bb7
56 bb8: ; preds = %bb7, %bb6
57 %tmp.0 = phi i32 [ 3, %bb6 ], [ 5, %bb7 ]
61 %tmp9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
62 store i32 %tmp.0, i32* %tmp9, align 4
66 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1