brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · e069cca Raw
55 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s 2>&1 | FileCheck %s2;3; Check whether %newval is identified as escaping value, even though it is used4; in a phi that is in the region. Non-affine subregion case.5;6; CHECK-LABEL: subregion_entry.region_entering:7; CHECK:         %loop_carried.ph = phi float [ %newval.merge, %backedge ], [ undef, %entry ]8;9; CHECK-LABEL: polly.merge_new_and_old:10; CHECK:         %newval.merge = phi float [ %newval.final_reload, %polly.exiting ], [ %newval, %subregion_exit.region_exiting ]11;12; CHECK-LABEL: polly.start:13; CHECK:         store float %loop_carried.ph, ptr %loop_carried.phiops14;15; CHECK-LABEL: polly.stmt.subregion_entry.entry:16; CHECK:         %loop_carried.phiops.reload = load float, ptr %loop_carried.phiops17;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+0021;22; CHECK-LABEL: polly.stmt.polly.merge_new_and_old.exit:23; CHECK:         %newval.final_reload = load float, ptr %newval.s2a24 25define void @func() {26entry:27  br label %subregion_entry28 29subregion_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.033  %cmp = fcmp ogt float undef, undef34  br i1 %cmp, label %subregion_if, label %subregion_exit35 36subregion_if:37  br label %subregion_exit38 39subregion_exit:40  br i1 undef, label %if_then, label %if_else41 42if_then:43  br label %backedge44 45if_else:46  br label %backedge47 48backedge:49  %indvar_next = add nuw nsw i32 %indvar, 150  br i1 false, label %subregion_entry, label %exit51 52exit:53  ret void54}55