1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Verify that we allow scops containing uniform branch conditions, where all
4 ; but one incoming block comes from an error condition.
8 ; CHECK-NEXT: Domain :=
9 ; CHECK-NEXT: [p] -> { Stmt_A[] };
10 ; CHECK-NEXT: Schedule :=
11 ; CHECK-NEXT: [p] -> { Stmt_A[] -> [1, 0] };
12 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
13 ; CHECK-NEXT: [p] -> { Stmt_A[] -> MemRef_X[0] };
14 ; CHECK-NEXT: Stmt_loop
15 ; CHECK-NEXT: Domain :=
16 ; CHECK-NEXT: [p] -> { Stmt_loop[i0] : p >= 13 and 0 <= i0 <= 1025 };
17 ; CHECK-NEXT: Schedule :=
18 ; CHECK-NEXT: [p] -> { Stmt_loop[i0] -> [0, i0] };
19 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
20 ; CHECK-NEXT: [p] -> { Stmt_loop[i0] -> MemRef_X[0] };
21 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
22 ; CHECK-NEXT: [p] -> { Stmt_loop[i0] -> MemRef_phi__phi[] };
27 define void @foo(ptr %X, i64 %p) {
32 %cmp1 = icmp sle i64 %p, 12
33 br i1 %cmp1, label %A, label %br2
36 %cmp3 = icmp sle i64 %p, 12
37 br i1 %cmp3, label %cond, label %loop
40 %indvar = phi i64 [0, %br2], [%indvar.next, %loop]
41 %indvar.next = add nsw i64 %indvar, 1
42 store float 41.0, ptr %X
43 %cmp2 = icmp sle i64 %indvar, 1024
44 br i1 %cmp2, label %loop, label %merge
54 %phi = phi i1 [false, %cond2], [true, %loop]
55 br i1 %phi, label %A, label %B
58 store float 42.0, ptr %X
63 store float 41.0, ptr %X