1 ; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
3 ; Check whether %newval is identified as escaping value, even though it is used
4 ; in a phi that is in the region. Non-affine subregion case.
6 ; CHECK-LABEL: subregion_entry.region_entering:
7 ; CHECK: %loop_carried.ph = phi float [ %newval.merge, %backedge ], [ undef, %entry ]
9 ; CHECK-LABEL: polly.merge_new_and_old:
10 ; CHECK: %newval.merge = phi float [ %newval.final_reload, %polly.exiting ], [ %newval, %subregion_exit.region_exiting ]
12 ; CHECK-LABEL: polly.start:
13 ; CHECK: store float %loop_carried.ph, ptr %loop_carried.phiops
15 ; CHECK-LABEL: polly.stmt.subregion_entry.entry:
16 ; CHECK: %loop_carried.phiops.reload = load float, ptr %loop_carried.phiops
18 ; CHECK-LABEL: polly.stmt.subregion_entry:
19 ; CHECK: %polly.loop_carried = phi float [ %loop_carried.phiops.reload, %polly.stmt.subregion_entry.entry ]
20 ; CHECK: %p_newval = fadd float %polly.loop_carried, 1.000000e+00
22 ; CHECK-LABEL: polly.stmt.polly.merge_new_and_old.exit:
23 ; CHECK: %newval.final_reload = load float, ptr %newval.s2a
27 br label %subregion_entry
30 %loop_carried = phi float [ undef, %entry ], [ %newval, %backedge ]
31 %indvar = phi i32 [ 1, %entry ], [ %indvar_next, %backedge ]
32 %newval = fadd float %loop_carried, 1.0
33 %cmp = fcmp ogt float undef, undef
34 br i1 %cmp, label %subregion_if, label %subregion_exit
37 br label %subregion_exit
40 br i1 undef, label %if_then, label %if_else
49 %indvar_next = add nuw nsw i32 %indvar, 1
50 br i1 false, label %subregion_entry, label %exit