1; RUN: opt %loadPolly -basic-aa -loop-rotate -indvars -polly-prepare -polly-scops -analyze < %s | FileCheck %s 2; RUN: opt %loadPolly -basic-aa -loop-rotate -indvars -licm -polly-prepare -polly-scops -analyze < %s | FileCheck %s 3; 4; XFAIL: * 5; 6; void test(int n, double B[static const restrict n], int j) { 7; for (int i = 0; i < n; i += 1) { 8; B[j] += i; 9; } 10; } 11; 12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 13 14define void @test(i32 %n, double* noalias nonnull %B, i32 %j) { 15entry: 16 br label %for.cond 17 18for.cond: ; preds = %for.inc, %entry 19 %i.0 = phi i32 [ 0, %entry ], [ %add1, %for.inc ] 20 %cmp = icmp slt i32 %i.0, %n 21 br i1 %cmp, label %for.body, label %for.end 22 23for.body: ; preds = %for.cond 24 %conv = sitofp i32 %i.0 to double 25 %idxprom = sext i32 %j to i64 26 %arrayidx = getelementptr inbounds double, double* %B, i64 %idxprom 27 %tmp = load double, double* %arrayidx, align 8 28 %add = fadd double %tmp, %conv 29 store double %add, double* %arrayidx, align 8 30 br label %for.inc 31 32for.inc: ; preds = %for.body 33 %add1 = add nuw nsw i32 %i.0, 1 34 br label %for.cond 35 36for.end: ; preds = %for.cond 37 ret void 38} 39 40 41; CHECK: Statements { 42; CHECK: Stmt_for_body 43; CHECK-DAG: ReadAccess := [Reduction Type: NONE] [Scalar: 0] 44; CHECK-NEXT: [n, j] -> { Stmt_for_body[i0] -> MemRef_B[j] }; 45; CHECK-DAG: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 46; CHECK-NEXT: [n, j] -> { Stmt_for_body[i0] -> MemRef_B[j] }; 47; CHECK: } 48