1 ; RUN: opt %loadPolly -polly-print-scops -disable-output \
2 ; RUN: -polly-invariant-load-hoisting < %s | FileCheck %s
4 ; CHECK: Invariant Accesses: {
5 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
6 ; CHECK-NEXT: [val] -> { Stmt_next[] -> MemRef_ptr[0] };
7 ; CHECK-NEXT: Execution Context: [val] -> { : }
12 ; CHECK-NEXT: Domain :=
13 ; CHECK-NEXT: [val] -> { Stmt_a[] : val = -1 };
14 ; CHECK-NEXT: Schedule :=
15 ; CHECK-NEXT: [val] -> { Stmt_a[] -> [1, 0] };
16 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
17 ; CHECK-NEXT: [val] -> { Stmt_a[] -> MemRef_X[0] };
18 ; CHECK-NEXT: Stmt_loop
19 ; CHECK-NEXT: Domain :=
20 ; CHECK-NEXT: [val] -> { Stmt_loop[i0] : val = 0 and 0 <= i0 <= 1025 };
21 ; CHECK-NEXT: Schedule :=
22 ; CHECK-NEXT: [val] -> { Stmt_loop[i0] -> [0, i0] };
23 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
24 ; CHECK-NEXT: [val] -> { Stmt_loop[i0] -> MemRef_X[0] };
27 define void @foo(ptr %ptr, ptr %X) {
32 %val = load i1, ptr %ptr
33 br i1 %val, label %a, label %loop
36 store float 1.0, ptr %X
40 %indvar = phi i64 [0, %next], [%indvar.next, %loop]
41 store float 1.0, ptr %X
42 %indvar.next = add nsw i64 %indvar, 1
43 %cmp = icmp sle i64 %indvar, 1024
44 br i1 %cmp, label %loop, label %merge