1 ; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
3 ; CHECK: polly.merge_new_and_old:
4 ; CHECK: %result.ph.merge = phi float [ %result.ph.final_reload, %polly.exiting ], [ %result.ph, %next.region_exiting ]
5 ; CHECK: br label %next
8 ; CHECK: %result = phi float [ %result.ph.merge, %polly.merge_new_and_old ]
9 ; CHECK: ret float %result
11 define float @foo(ptr %A, i64 %param) {
16 %branchcond = icmp slt i64 %param, 64
17 br i1 %branchcond, label %loopA, label %loopB
20 %indvarA = phi i64 [0, %entry.split], [%indvar.nextA, %loopA]
21 %indvar.nextA = add i64 %indvarA, 1
22 %valA = load float, ptr %A
23 %sumA = fadd float %valA, %valA
24 store float %valA, ptr %A
25 %cndA = icmp eq i64 %indvar.nextA, 100
26 br i1 %cndA, label %next, label %loopA
29 %indvarB = phi i64 [0, %entry.split], [%indvar.nextB, %loopB]
30 %indvar.nextB = add i64 %indvarB, 1
31 %valB = load float, ptr %A
32 %sumB = fadd float %valB, %valB
33 store float %valB, ptr %A
34 %cndB = icmp eq i64 %indvar.nextB, 100
35 br i1 %cndB, label %next, label %loopB
38 %result = phi float [%sumA, %loopA], [%sumB, %loopB]