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