1 ; RUN: opt %loadNPMPolly '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 \
2 ; RUN: -polly-invariant-load-hoisting \
5 ; Verify that a delinearized and a not delinearized access are not
9 ; CHECK-NEXT: Domain :=
10 ; CHECK-NEXT: [n] -> { Stmt_body1[i0] : 0 <= i0 <= 1022 };
11 ; CHECK-NEXT: Schedule :=
12 ; CHECK-NEXT: [n] -> { Stmt_body1[i0] -> [i0, 0] };
13 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
14 ; CHECK-NEXT: [n] -> { Stmt_body1[i0] -> MemRef_baseB[0] };
15 ; CHECK-NEXT: Stmt_body2
16 ; CHECK-NEXT: Domain :=
17 ; CHECK-NEXT: [n] -> { Stmt_body2[i0] : 0 <= i0 <= 1022 };
18 ; CHECK-NEXT: Schedule :=
19 ; CHECK-NEXT: [n] -> { Stmt_body2[i0] -> [i0, 1] };
20 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
21 ; CHECK-NEXT: [n] -> { Stmt_body2[i0] -> MemRef_baseA[i0, i0] };
25 define void @foo(ptr %A, i64 %n, i64 %m) {
30 %indvar = phi i64 [0, %start], [%indvar.next, %latch]
31 %indvar.next = add nsw i64 %indvar, 1
32 %icmp = icmp slt i64 %indvar.next, 1024
33 br i1 %icmp, label %body1, label %exit
36 %baseB = load ptr, ptr %A
37 store float 42.0, ptr %baseB
41 %baseA = load ptr, ptr %A
42 %offsetA = mul i64 %indvar, %n
43 %offsetA2 = add i64 %offsetA, %indvar
44 %ptrA = getelementptr float, ptr %baseA, i64 %offsetA2
45 store float 42.0, ptr %ptrA