1; RUN: opt < %s -disable-output "-passes=print<da>"                            \
2; RUN: "-aa-pipeline=basic-aa,tbaa" 2>&1 | FileCheck %s
3; RUN: opt < %s -analyze -enable-new-pm=0 -basic-aa -tbaa -da | FileCheck %s
4
5; CHECK:      Src:  %v = load i32, i32* %arrayidx1, align 4 --> Dst:  store i32 %add, i32* %a.lcssa, align 4
6; CHECK-NEXT: da analyze - confused!
7
8define void @f(i32 *%a, i32 %n, i64 %n2) {
9entry:
10  br label %while.body
11
12while.body:
13  %n.addr = phi i32 [ %mul, %while.body ], [ %n, %entry ]
14  %inc.phi = phi i32 [ %inc, %while.body ], [ 0, %entry ]
15  %mul = mul i32 %n.addr, 3
16  %div = udiv i32 %mul, 2
17  %inc = add i32 %inc.phi, 1
18  %incdec.ptr = getelementptr inbounds i32, i32* %a, i32 %inc
19  %cmp.not = icmp eq i32 %div, 1
20  br i1 %cmp.not, label %while.end, label %while.body
21
22while.end:
23  %a.lcssa = phi i32* [ %incdec.ptr, %while.body ]
24  br label %for.body
25
26for.body:
27  %indvars.iv = phi i64 [ 1, %while.end ], [ %indvars.iv.next, %for.body ]
28  %arrayidx1 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
29  %v = load i32, i32* %arrayidx1, align 4
30  %add = add nsw i32 %v, 1
31  store i32 %add, i32* %a.lcssa, align 4
32  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
33  %exitcond.not = icmp eq i64 %indvars.iv.next, %n2
34  br i1 %exitcond.not, label %ret, label %for.body
35
36ret:
37  ret void
38}
39