1; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s 2; 3; void f(int *A, int c, int N) { 4; int tmp; 5; for (int i = 0; i < N; i++) { 6; if (i > c) 7; tmp = 3; 8; else 9; tmp = 5; 10; A[i] = tmp; 11; } 12; } 13; 14; CHECK: Statements { 15; CHECK-LABEL: Stmt_bb6 16; CHECK-NOT: Access 17; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1] 18; CHECK: [N, c] -> { Stmt_bb6[i0] -> MemRef_tmp_0__phi[] }; 19; CHECK-NOT: Access 20; CHECK-LABEL: Stmt_bb7 21; CHECK-NOT: Access 22; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1] 23; CHECK: [N, c] -> { Stmt_bb7[i0] -> MemRef_tmp_0__phi[] }; 24; CHECK-NOT: Access 25; CHECK-LABEL: Stmt_bb8 26; CHECK-NOT: Access 27; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 1] 28; CHECK: [N, c] -> { Stmt_bb8[i0] -> MemRef_tmp_0__phi[] }; 29; CHECK-NOT: Access 30; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 31; CHECK: [N, c] -> { Stmt_bb8[i0] -> MemRef_A[i0] }; 32; CHECK-NOT: Access 33; CHECK: } 34 35target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 36 37define void @f(i32* %A, i32 %c, i32 %N) { 38bb: 39 %tmp = sext i32 %N to i64 40 %tmp1 = sext i32 %c to i64 41 br label %bb2 42 43bb2: ; preds = %bb10, %bb 44 %indvars.iv = phi i64 [ %indvars.iv.next, %bb10 ], [ 0, %bb ] 45 %tmp3 = icmp slt i64 %indvars.iv, %tmp 46 br i1 %tmp3, label %bb4, label %bb11 47 48bb4: ; preds = %bb2 49 %tmp5 = icmp sgt i64 %indvars.iv, %tmp1 50 br i1 %tmp5, label %bb6, label %bb7 51 52bb6: ; preds = %bb4 53 br label %bb8 54 55bb7: ; preds = %bb4 56 br label %bb8 57 58bb8: ; preds = %bb7, %bb6 59 %tmp.0 = phi i32 [ 3, %bb6 ], [ 5, %bb7 ] 60 %tmp9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv 61 store i32 %tmp.0, i32* %tmp9, align 4 62 br label %bb10 63 64bb10: ; preds = %bb8 65 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 66 br label %bb2 67 68bb11: ; preds = %bb2 69 ret void 70} 71