1 ; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
4 ; Scalar reloads in the generated entering block were not recognized as
5 ; dominating the subregion blocks when there were multiple entering nodes. This
6 ; resulted in values defined in there (here: %cond used in subregionB_entry) not
7 ; being copied. We check whether it is reusing the reloaded scalar.
9 ; CHECK-LABEL: polly.stmt.subregionB_entry.exit:
10 ; CHECK: store i1 %polly.cond, ptr %cond.s2a
12 ; CHECK-LABEL: polly.stmt.subregionB_entry.entry:
13 ; CHECK: %cond.s2a.reload = load i1, ptr %cond.s2a
15 ; CHECK-LABEL: polly.stmt.subregionB_entry:
16 ; CHECK: br i1 %cond.s2a.reload
18 define void @func(ptr %A) {
20 br label %subregionA_entry
23 %cond = phi i1 [ false, %entry ], [ true, %subregionB_exit ]
24 br i1 %cond, label %subregionA_if, label %subregionA_else
27 br label %subregionB_entry
30 br label %subregionB_entry
34 br i1 %cond, label %subregionB_if, label %subregionB_exit
37 br label %subregionB_exit
40 br i1 false, label %subregionA_entry, label %return