1 ; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-codegen \
3 ; RUN: -S < %s | FileCheck %s
4 ; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-codegen \
6 ; RUN: -S < %s | FileCheck %s -check-prefix=SCALAR
10 ; SCALAR-LABEL: entry:
11 ; SCALAR-NEXT: %scalar.s2a = alloca float
13 ; SCALAR-LABEL: polly.start:
14 ; SCALAR-NEXT: store float %scalar, ptr %scalar.s2a
16 ; SCALAR-LABEL: polly.stmt.stmt1:
17 ; SCALAR-NEXT: %scalar.s2a.reload = load float, ptr %scalar.s2a
18 ; SCALAR-NEXT: %val_p_scalar_ = load float, ptr %A,
19 ; SCALAR-NEXT: %p_sum = fadd float %val_p_scalar_, %scalar.s2a.reload
21 define void @foo(ptr noalias %A, float %scalar) {
26 %indvar = phi i64 [0, %entry], [%indvar.next, %loop.backedge]
30 %val = load float, ptr %A
31 %sum = fadd float %val, %scalar
32 store float %sum, ptr %A
33 br label %loop.backedge
36 %indvar.next = add i64 %indvar, 1
37 %cond = icmp sle i64 %indvar, 100
38 br i1 %cond, label %loop, label %exit