1; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \ 2; RUN: -analyze < %s | FileCheck %s 3; 4; void f(float *A) { 5; for (int i = 0; i < 1024; i++) 6; if (A[i] == A[i - 1]) 7; A[i]++; 8; } 9; 10; CHECK: Function: f 11; CHECK-NEXT: Region: %bb1---%bb14 12; CHECK-NEXT: Max Loop Depth: 1 13; CHECK-NEXT: Invariant Accesses: { 14; CHECK-NEXT: } 15; CHECK-NEXT: Context: 16; CHECK-NEXT: { : } 17; CHECK-NEXT: Assumed Context: 18; CHECK-NEXT: { : } 19; CHECK-NEXT: Invalid Context: 20; CHECK-NEXT: { : false } 21; CHECK-NEXT: Arrays { 22; CHECK-NEXT: float MemRef_A[*]; // Element size 4 23; CHECK-NEXT: } 24; CHECK-NEXT: Arrays (Bounds as pw_affs) { 25; CHECK-NEXT: float MemRef_A[*]; // Element size 4 26; CHECK-NEXT: } 27; CHECK-NEXT: Alias Groups (0): 28; CHECK-NEXT: n/a 29; CHECK-NEXT: Statements { 30; CHECK-NEXT: Stmt_bb2__TO__bb12 31; CHECK-NEXT: Domain := 32; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] : 0 <= i0 <= 1023 }; 33; CHECK-NEXT: Schedule := 34; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] -> [i0] }; 35; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] 36; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] -> MemRef_A[i0] }; 37; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] 38; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] -> MemRef_A[-1 + i0] }; 39; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] 40; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] -> MemRef_A[i0] }; 41; CHECK-NEXT: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0] 42; CHECK-NEXT: { Stmt_bb2__TO__bb12[i0] -> MemRef_A[i0] }; 43; CHECK-NEXT: } 44target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 45 46define void @f(float* %A) { 47bb: 48 br label %bb1 49 50bb1: ; preds = %bb13, %bb 51 %indvars.iv = phi i64 [ %indvars.iv.next, %bb13 ], [ 0, %bb ] 52 %exitcond = icmp ne i64 %indvars.iv, 1024 53 br i1 %exitcond, label %bb2, label %bb14 54 55bb2: ; preds = %bb1 56 %tmp = getelementptr inbounds float, float* %A, i64 %indvars.iv 57 %tmp3 = load float, float* %tmp, align 4 58 %tmp4 = add nsw i64 %indvars.iv, -1 59 %tmp5 = getelementptr inbounds float, float* %A, i64 %tmp4 60 %tmp6 = load float, float* %tmp5, align 4 61 %tmp7 = fcmp oeq float %tmp3, %tmp6 62 br i1 %tmp7, label %bb8, label %bb12 63 64bb8: ; preds = %bb2 65 %tmp9 = getelementptr inbounds float, float* %A, i64 %indvars.iv 66 %tmp10 = load float, float* %tmp9, align 4 67 %tmp11 = fadd float %tmp10, 1.000000e+00 68 store float %tmp11, float* %tmp9, align 4 69 br label %bb12 70 71bb12: ; preds = %bb8, %bb2 72 br label %bb13 73 74bb13: ; preds = %bb12 75 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 76 br label %bb1 77 78bb14: ; preds = %bb1 79 ret void 80} 81