1 ; RUN: opt %loadPolly -polly-scops -analyze < %s \
2 ; RUN: -polly-invariant-load-hoisting \
5 ; Verify that two arrays delinearized with different sizes are not coalesced.
8 ; CHECK-NEXT: Domain :=
9 ; CHECK-NEXT: [m, n] -> { Stmt_body1[i0] : 0 <= i0 <= 1022 };
10 ; CHECK-NEXT: Schedule :=
11 ; CHECK-NEXT: [m, n] -> { Stmt_body1[i0] -> [i0, 0] };
12 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
13 ; CHECK-NEXT: [m, n] -> { Stmt_body1[i0] -> MemRef_baseB[i0, i0] };
14 ; CHECK-NEXT: Stmt_body2
15 ; CHECK-NEXT: Domain :=
16 ; CHECK-NEXT: [m, n] -> { Stmt_body2[i0] : 0 <= i0 <= 1022 };
17 ; CHECK-NEXT: Schedule :=
18 ; CHECK-NEXT: [m, n] -> { Stmt_body2[i0] -> [i0, 1] };
19 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
20 ; CHECK-NEXT: [m, n] -> { Stmt_body2[i0] -> MemRef_baseA[i0, i0] };
23 define void @foo(float** %A, i64 %n, i64 %m) {
28 %indvar = phi i64 [0, %start], [%indvar.next, %latch]
29 %indvar.next = add nsw i64 %indvar, 1
30 %icmp = icmp slt i64 %indvar.next, 1024
31 br i1 %icmp, label %body1, label %exit
34 %baseB = load float*, float** %A
35 %offsetB = mul i64 %indvar, %m
36 %offsetB2 = add i64 %offsetB, %indvar
37 %ptrB = getelementptr float, float* %baseB, i64 %offsetB2
38 store float 42.0, float* %ptrB
42 %baseA = load float*, float** %A
43 %offsetA = mul i64 %indvar, %n
44 %offsetA2 = add i64 %offsetA, %indvar
45 %ptrA = getelementptr float, float* %baseA, i64 %offsetA2
46 store float 42.0, float* %ptrA