1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-analyze-read-only-scalars=false -polly-print-scops -disable-output < %s | FileCheck %s
2 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-analyze-read-only-scalars=true -polly-print-scops -disable-output < %s | FileCheck %s -check-prefix=SCALARS
4 ; CHECK-NOT: Memref_scalar
6 ; SCALARS: float MemRef_scalar; // Element size 4
8 ; SCALARS: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
9 ; SCALARS: { Stmt_stmt1[i0] -> MemRef_scalar[] };
10 ; SCALARS: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
11 ; SCALARS: { Stmt_stmt1[i0] -> MemRef_scalar2[] };
14 define void @foo(ptr noalias %A, ptr %B, float %scalar, float %scalar2) {
19 %indvar = phi i64 [0, %entry], [%indvar.next, %loop.backedge]
23 %val = load float, ptr %A
24 %sum = fadd float %val, %scalar
25 store float %sum, ptr %A
26 store float %scalar2, ptr %B
27 br label %loop.backedge
30 %indvar.next = add i64 %indvar, 1
31 %cond = icmp sle i64 %indvar, 100
32 br i1 %cond, label %loop, label %exit