1 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-loops -polly-detect '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s
3 ; The SCoP contains a loop with multiple exit blocks (BBs after leaving
4 ; the loop). The current implementation of deriving their domain derives
5 ; only a common domain for all of the exit blocks. We disabled loops with
6 ; multiple exit blocks until this is fixed.
9 ; The BasicBlock "guaranteed" is always executed inside the non-affine subregion
10 ; region_entry->region_exit. As such, writes accesses in blocks that always
11 ; execute are MustWriteAccesses. Before Polly commit r255473, we only assumed
12 ; that the subregion's entry block is guaranteed to execute.
14 ; CHECK-NOT: MayWriteAccess
15 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
16 ; CHECK-NEXT: { Stmt_region_entry__TO__region_exit[i0] -> MemRef_A[0] };
17 ; CHECK-NOT: MayWriteAccess
19 define void @f(ptr %A, ptr %B, ptr %C, float %b) {
24 %indvar = phi i32 [ %indvar.next, %for.inc ], [ 0, %entry ]
25 %exitcond = icmp ne i32 %indvar, 1024
26 br i1 %exitcond, label %region_entry, label %return
38 %ptr = getelementptr i32, ptr %B, i32 %indvar
39 %val = load i32, ptr %ptr
40 %cmp = icmp eq i32 %val, 0
42 br i1 %cmp, label %bb5, label %bb6
48 %ptr2 = getelementptr i32, ptr %C, i32 %indvar
49 %val2 = load i32, ptr %ptr2
50 %cmp2 = icmp eq i32 %val2, 0
51 br i1 %cmp2, label %region_exit, label %region_entry
57 %indvar.next = add i32 %indvar, 1