49 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -S < %s | FileCheck %s2;3; llvm.org/PR254384; After loop versioning, a dominance check of a non-affine subregion's exit node5; causes the dominance check to always fail any block in the scop. The6; subregion's exit block has become polly_merge_new_and_old, which also receives7; the control flow of the generated code. This would cause that any value for8; implicit stores is assumed to be not from the scop.9;10; This checks that the stored value is indeed from the generated code.11;12; CHECK-LABEL: polly.stmt.do.body.entry:13; CHECK: a.phiops.reload = load i32, ptr %a.phiops14;15; CHECK-LABEL: polly.stmt.polly.merge_new_and_old.exit:16; CHECK: store i32 %polly.a, ptr %a.s2a17 18define void @func() {19entry:20 br label %while.body21 22while.body:23 br label %do.body24 25do.body:26 %a = phi i32 [ undef, %while.body ], [ %b, %end_b ]27 %cond = or i1 undef, undef28 br i1 %cond, label %end_a, label %if_a29 30if_a:31 br label %end_a32 33end_a:34 br i1 undef, label %if_b, label %end_b35 36if_b:37 br label %end_b38 39end_b:40 %b = phi i32 [ undef, %if_b ], [ %a, %end_a ]41 br i1 false, label %do.body, label %do.end42 43do.end:44 br label %return45 46return:47 ret void48}49