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-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[] }; 47; CHECK-NEXT: } 48 49target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 50 51define void @f(i32* %A, i32 %c, i32 %N) { 52bb: 53 %tmp = sext i32 %N to i64 54 %tmp1 = sext i32 %c to i64 55 br label %bb2 56 57bb2: ; 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 61 62bb4: ; preds = %bb2 63 %tmp5 = icmp sgt i64 %indvars.iv, %tmp1 64 br i1 %tmp5, label %bb6, label %bb7 65 66bb6: ; preds = %bb4 67 br label %bb8 68 69bb7: ; preds = %bb4 70 br label %bb8 71 72bb8: ; preds = %bb7, %bb6 73 %tmp.0 = phi i32 [ 3, %bb6 ], [ 5, %bb7 ] 74 br label %bb8b 75 76bb8b: 77 %tmp9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv 78 store i32 %tmp.0, i32* %tmp9, align 4 79 br label %bb10 80 81bb10: ; preds = %bb8 82 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 83 br label %bb2 84 85bb11: ; preds = %bb2 86 ret void 87} 88