1; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s 2 3; Verify that we allow scops containing uniform branch conditions, where all 4; but one incoming block comes from an error condition. 5 6; CHECK: Statements { 7; CHECK-NEXT: Stmt_A 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[] }; 23; CHECK-NEXT: } 24 25declare void @bar() 26 27define void @foo(float* %X, i64 %p) { 28entry: 29 br label %br 30 31br: 32 %cmp1 = icmp sle i64 %p, 12 33 br i1 %cmp1, label %A, label %br2 34 35br2: 36 %cmp3 = icmp sle i64 %p, 12 37 br i1 %cmp3, label %cond, label %loop 38 39loop: 40 %indvar = phi i64 [0, %br2], [%indvar.next, %loop] 41 %indvar.next = add nsw i64 %indvar, 1 42 store float 41.0, float* %X 43 %cmp2 = icmp sle i64 %indvar, 1024 44 br i1 %cmp2, label %loop, label %merge 45 46cond: 47 br label %cond2 48 49cond2: 50 call void @bar() 51 br label %merge 52 53merge: 54 %phi = phi i1 [false, %cond2], [true, %loop] 55 br i1 %phi, label %A, label %B 56 57A: 58 store float 42.0, float* %X 59 br label %exit 60 61B: 62 call void @bar() 63 store float 41.0, float* %X 64 br label %exit 65 66exit: 67 ret void 68} 69