1 ; RUN: opt < %s -passes='print<delinearization>' -disable-output 2>&1 | FileCheck %s
3 ; CHECK: AccessFunction: ({0,+,%i2}<%outer.loop> + %unknown)
4 ; CHECK-NEXT: failed to delinearize
6 ; void foo(char A[], long i2, bool c) {
7 ; for (long i = 0; ; ++i) {
8 ; char *tmp = &A[i * i2];
11 ; *((float*)&tmp[arg << arg]) = 0;
15 define void @foo(ptr %A, i64 %i2, i64 %arg, i1 %c) {
20 %outer.iv = phi i64 [ 0, %entry ], [ %outer.iv.next, %outer.latch ]
21 %i414 = mul nsw i64 %outer.iv, %i2
22 %tmp = getelementptr inbounds i8, ptr %A, i64 %i414
23 br i1 %c, label %inner.preheader, label %outer.latch
26 %unknown = shl i64 %arg, %arg
27 %arrayidx = getelementptr inbounds i8, ptr %tmp, i64 %unknown
31 store float 0.000000e+00, ptr %arrayidx, align 4
35 %outer.iv.next = add nuw nsw i64 %outer.iv, 1