1 ; RUN: opt %loadPolly -polly-print-scops -pass-remarks-analysis="polly-scops" \
2 ; RUN: -polly-allow-differing-element-types \
3 ; RUN: -disable-output < %s 2>&1 | FileCheck %s
6 ; void foo(long n, long m, char A[][m]) {
7 ; for (long i = 0; i < n; i++)
8 ; for (long j = 0; j < m / 4; j++)
9 ; *(float *)&A[i][4 * j] = A[i][j];
12 ; We do not yet correctly handle multi-dimensional arrays which are accessed
13 ; through different base types. Verify that we correctly bail out.
15 ; CHECK: Delinearization assumption: { : false }
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 define void @foo(i64 %n, i64 %m, ptr %A) {
23 bb1: ; preds = %bb20, %bb
24 %i.0 = phi i64 [ 0, %bb ], [ %tmp21, %bb20 ]
25 %tmp = icmp slt i64 %i.0, %n
26 br i1 %tmp, label %bb2, label %bb22
31 bb3: ; preds = %bb17, %bb2
32 %j.0 = phi i64 [ 0, %bb2 ], [ %tmp18, %bb17 ]
33 %tmp4 = sdiv i64 %m, 4
34 %tmp5 = icmp slt i64 %j.0, %tmp4
35 br i1 %tmp5, label %bb6, label %bb19
38 %tmp7 = mul nsw i64 %i.0, %m
39 %tmp8 = getelementptr inbounds i8, ptr %A, i64 %tmp7
40 %tmp9 = getelementptr inbounds i8, ptr %tmp8, i64 %j.0
41 %tmp10 = load i8, ptr %tmp9, align 1
42 %tmp11 = sitofp i8 %tmp10 to float
43 %tmp12 = shl nsw i64 %j.0, 2
44 %tmp13 = mul nsw i64 %i.0, %m
45 %tmp14 = getelementptr inbounds i8, ptr %A, i64 %tmp13
46 %tmp15 = getelementptr inbounds i8, ptr %tmp14, i64 %tmp12
47 store float %tmp11, ptr %tmp15, align 4
51 %tmp18 = add nuw nsw i64 %j.0, 1
58 %tmp21 = add nuw nsw i64 %i.0, 1