1; RUN: opt %loadPolly -polly-scops -analyze < %s \
2; RUN:  -polly-invariant-load-hoisting \
3; RUN:  | FileCheck %s
4
5; Verify that arrays with different element types are not coalesced.
6
7; CHECK:      Statements {
8; CHECK-NEXT: 	Stmt_body1
9; CHECK-NEXT:         Domain :=
10; CHECK-NEXT:             { Stmt_body1[i0] : 0 <= i0 <= 1022 };
11; CHECK-NEXT:         Schedule :=
12; CHECK-NEXT:             { Stmt_body1[i0] -> [i0, 0] };
13; CHECK-NEXT:         MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]
14; CHECK-NEXT:             { Stmt_body1[i0] -> MemRef_baseB[0] };
15; CHECK-NEXT: 	Stmt_body2
16; CHECK-NEXT:         Domain :=
17; CHECK-NEXT:             { Stmt_body2[i0] : 0 <= i0 <= 1022 };
18; CHECK-NEXT:         Schedule :=
19; CHECK-NEXT:             { Stmt_body2[i0] -> [i0, 1] };
20; CHECK-NEXT:         MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]
21; CHECK-NEXT:             { Stmt_body2[i0] -> MemRef_baseA[0] };
22; CHECK-NEXT: }
23
24define void @foo(float** %A, i64 %n, i64 %m) {
25start:
26  br label %loop
27
28loop:
29  %indvar = phi i64 [0, %start], [%indvar.next, %latch]
30  %indvar.next = add nsw i64 %indvar, 1
31  %icmp = icmp slt i64 %indvar.next, 1024
32  br i1 %icmp, label %body1, label %exit
33
34body1:
35  %baseB = load float*, float** %A
36  store float 42.0, float* %baseB
37  br label %body2
38
39body2:
40  %baseA = load float*, float** %A
41  %ptrcast = bitcast float* %baseA to i64*
42  store i64 42, i64* %ptrcast
43  br label %latch
44
45latch:
46  br label %loop
47
48exit:
49  ret void
50
51}
52