1 ; RUN: opt %loadNPMPolly -S -passes=polly-codegen < %s | FileCheck %s
3 ; float f(float *A, int N) {
5 ; for (int i = 0; i < N; i++)
10 ; CHECK-NOT: %tmp7{{[.*]}} = alloca float
11 ; CHECK-DAG: %tmp.0.s2a = alloca float
12 ; CHECK-NOT: %tmp7{{[.*]}} = alloca float
13 ; CHECK-DAG: %tmp.0.phiops = alloca float
14 ; CHECK-NOT: %tmp7{{[.*]}} = alloca float
19 ; CHECK-LABEL: polly.start:
20 ; CHECK-NEXT: store float 0.000000e+00, ptr %tmp.0.phiops
23 ; CHECK-LABEL: polly.exiting:
24 ; CHECK-NEXT: br label %polly.merge_new_and_old
26 ; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
27 ; CHECK-NEXT: %tmp.0.phiops.reload[[R1:[0-9]*]] = load float, ptr %tmp.0.phiops
28 ; CHECK: store float %tmp.0.phiops.reload[[R1]], ptr %tmp.0.s2a
30 ; CHECK-LABEL: polly.stmt.bb4:
31 ; CHECK: %tmp.0.s2a.reload[[R3:[0-9]*]] = load float, ptr %tmp.0.s2a
32 ; CHECK: %tmp[[R5:[0-9]*]]_p_scalar_ = load float, ptr %scevgep, align 4, !alias.scope !0, !noalias !3
33 ; CHECK: %p_tmp[[R4:[0-9]*]] = fadd float %tmp.0.s2a.reload[[R3]], %tmp[[R5]]_p_scalar_
34 ; CHECK: store float %p_tmp[[R4]], ptr %tmp.0.phiops
36 ; CHECK-LABEL: polly.stmt.bb1{{[0-9]*}}:
37 ; CHECK-NEXT: %tmp.0.phiops.reload[[R2:[0-9]*]] = load float, ptr %tmp.0.phiops
38 ; CHECK: store float %tmp.0.phiops.reload[[R2]], ptr %tmp.0.s2a
40 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
42 define void @f(ptr %A, i32 %N) {
44 %tmp = sext i32 %N to i64
47 bb1: ; preds = %bb4, %bb
48 %indvars.iv = phi i64 [ %indvars.iv.next, %bb4 ], [ 0, %bb ]
49 %tmp.0 = phi float [ 0.000000e+00, %bb ], [ %tmp7, %bb4 ]
50 %tmp2 = icmp slt i64 %indvars.iv, %tmp
51 br i1 %tmp2, label %bb3, label %bb8
57 %tmp5 = getelementptr inbounds float, ptr %A, i64 %indvars.iv
58 %tmp6 = load float, ptr %tmp5, align 4
59 %tmp7 = fadd float %tmp.0, %tmp6
60 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1