1 ; RUN: opt %loadPolly -basicaa -loop-rotate -indvars -polly-prepare -polly-scops -analyze < %s | FileCheck %s
2 ; RUN: opt %loadPolly -basicaa -loop-rotate -indvars -licm -polly-prepare -polly-scops -analyze < %s | FileCheck %s
6 ; void foo(float *restrict A, float *restrict B, long j) {
7 ; for (long i = 0; i < 100; i++)
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 define void @foo(float* noalias %A, float* noalias %B, i64 %j) {
17 for.cond: ; preds = %for.inc, %entry
18 %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]
19 %exitcond = icmp ne i64 %i.0, 100
20 br i1 %exitcond, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 %arrayidx = getelementptr inbounds float, float* %B, i64 %i.0
24 %tmp = bitcast float* %arrayidx to i32*
25 %tmp1 = load i32, i32* %tmp, align 4
26 %arrayidx1 = getelementptr inbounds float, float* %A, i64 %j
27 %tmp2 = bitcast float* %arrayidx1 to i32*
28 store i32 %tmp1, i32* %tmp2, align 4
31 for.inc: ; preds = %for.body
32 %inc = add nuw nsw i64 %i.0, 1
35 for.end: ; preds = %for.cond
40 ; CHECK: Stmt_for_body
41 ; CHECK-DAG: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
42 ; CHECK-NEXT: [j] -> { Stmt_for_body[i0] -> MemRef_B[i0] };
43 ; CHECK-DAG: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
44 ; CHECK-NEXT: [j] -> { Stmt_for_body[i0] -> MemRef_A[j] };