1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Verfy that we do not use the GetElementPtr information to delinearize A
4 ; because of the cast in-between. Use the single-dimensional modeling instead.
6 ; void f(short A[][2]) {
7 ; for (int i = 0; i < 100; i++)
8 ; *((long *)&A[4 * i][0]) = 0;
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 define void @f(ptr %A) {
17 for.cond: ; preds = %for.inc, %entry
18 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
19 %exitcond = icmp ne i64 %indvars.iv, 100
20 br i1 %exitcond, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 %tmp = shl nsw i64 %indvars.iv, 2
24 %arrayidx1 = getelementptr inbounds [2 x i16], ptr %A, i64 %tmp, i64 0
25 store i64 0, ptr %arrayidx1, align 8
28 for.inc: ; preds = %for.body
29 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
32 for.end: ; preds = %for.cond
38 ; CHECK-NEXT: i64 MemRef_A[*]; // Element size 8
41 ; CHECK-NEXT: Stmt_for_body
42 ; CHECK-NEXT: Domain :=
43 ; CHECK-NEXT: { Stmt_for_body[i0] : 0 <= i0 <= 99 };
44 ; CHECK-NEXT: Schedule :=
45 ; CHECK-NEXT: { Stmt_for_body[i0] -> [i0] };
46 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
47 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef_A[2i0] };