1 ; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
4 ; After loop versioning, a dominance check of a non-affine subregion's exit node
5 ; causes the dominance check to always fail any block in the scop. The
6 ; subregion's exit block has become polly_merge_new_and_old, which also receives
7 ; the control flow of the generated code. This would cause that any value for
8 ; implicit stores is assumed to be not from the scop.
10 ; This checks that the stored value is indeed from the generated code.
12 ; CHECK-LABEL: polly.stmt.do.body.entry:
13 ; CHECK: a.phiops.reload = load i32, ptr %a.phiops
15 ; CHECK-LABEL: polly.stmt.polly.merge_new_and_old.exit:
16 ; CHECK: store i32 %polly.a, ptr %a.s2a
26 %a = phi i32 [ undef, %while.body ], [ %b, %end_b ]
27 %cond = or i1 undef, undef
28 br i1 %cond, label %end_a, label %if_a
34 br i1 undef, label %if_b, label %end_b
40 %b = phi i32 [ undef, %if_b ], [ %a, %end_a ]
41 br i1 false, label %do.body, label %do.end