1 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
2 ; RUN: -da-disable-delinearization-checks | FileCheck %s
3 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
4 ; RUN: | FileCheck --check-prefix=LIN %s
6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
7 target triple = "x86_64-apple-macosx10.6.0"
9 ;; for (long int i = 0; i < n; i++) {
10 ;; for (long int j = 0; j < n; j++) {
11 ;; for (long int k = 0; k < n; k++) {
14 ;; for (long int k = 0; k < n; k++) {
15 ;; *B++ = A[i + 3][j + 2][k + 1];
17 define void @p2(i64 %n, ptr %A, ptr %B) nounwind uwtable ssp {
19 %cmp10 = icmp sgt i64 %n, 0
20 br i1 %cmp10, label %for.cond1.preheader.preheader, label %for.end26
23 ; CHECK: da analyze - none!
24 ; CHECK: da analyze - flow [-3 -2]!
25 ; CHECK: da analyze - confused!
26 ; CHECK: da analyze - none!
27 ; CHECK: da analyze - confused!
28 ; CHECK: da analyze - output [* * *]!
31 ; LIN: da analyze - output [* * *]!
32 ; LIN: da analyze - flow [* *|<]!
33 ; LIN: da analyze - confused!
34 ; LIN: da analyze - input [* * *]!
35 ; LIN: da analyze - confused!
36 ; LIN: da analyze - output [* * *]!
38 for.cond1.preheader.preheader: ; preds = %entry
39 br label %for.cond1.preheader
41 for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc24
42 %B.addr.012 = phi ptr [ %B.addr.1.lcssa, %for.inc24 ], [ %B, %for.cond1.preheader.preheader ]
43 %i.011 = phi i64 [ %inc25, %for.inc24 ], [ 0, %for.cond1.preheader.preheader ]
44 %cmp26 = icmp sgt i64 %n, 0
45 br i1 %cmp26, label %for.cond4.preheader.preheader, label %for.inc24
47 for.cond4.preheader.preheader: ; preds = %for.cond1.preheader
48 br label %for.cond4.preheader
50 for.cond4.preheader: ; preds = %for.cond4.preheader.preheader, %for.inc21
51 %B.addr.18 = phi ptr [ %B.addr.2.lcssa, %for.inc21 ], [ %B.addr.012, %for.cond4.preheader.preheader ]
52 %j.07 = phi i64 [ %inc22, %for.inc21 ], [ 0, %for.cond4.preheader.preheader ]
53 %cmp51 = icmp sgt i64 %n, 0
54 br i1 %cmp51, label %for.body6.preheader, label %for.cond10.loopexit
56 for.body6.preheader: ; preds = %for.cond4.preheader
59 for.body6: ; preds = %for.body6.preheader, %for.body6
60 %k.02 = phi i64 [ %inc, %for.body6 ], [ 0, %for.body6.preheader ]
61 %arrayidx8 = getelementptr inbounds [100 x [100 x i64]], ptr %A, i64 %i.011, i64 %j.07, i64 %k.02
62 store i64 %i.011, ptr %arrayidx8, align 8
63 %inc = add nsw i64 %k.02, 1
64 %exitcond13 = icmp ne i64 %inc, %n
65 br i1 %exitcond13, label %for.body6, label %for.cond10.loopexit.loopexit
67 for.cond10.loopexit.loopexit: ; preds = %for.body6
68 br label %for.cond10.loopexit
70 for.cond10.loopexit: ; preds = %for.cond10.loopexit.loopexit, %for.cond4.preheader
71 %cmp113 = icmp sgt i64 %n, 0
72 br i1 %cmp113, label %for.body12.preheader, label %for.inc21
74 for.body12.preheader: ; preds = %for.cond10.loopexit
77 for.body12: ; preds = %for.body12.preheader, %for.body12
78 %k9.05 = phi i64 [ %inc19, %for.body12 ], [ 0, %for.body12.preheader ]
79 %B.addr.24 = phi ptr [ %incdec.ptr, %for.body12 ], [ %B.addr.18, %for.body12.preheader ]
80 %add = add nsw i64 %k9.05, 1
81 %add13 = add nsw i64 %j.07, 2
82 %add14 = add nsw i64 %i.011, 3
83 %arrayidx17 = getelementptr inbounds [100 x [100 x i64]], ptr %A, i64 %add14, i64 %add13, i64 %add
84 %0 = load i64, ptr %arrayidx17, align 8
85 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.24, i64 1
86 store i64 %0, ptr %B.addr.24, align 8
87 %inc19 = add nsw i64 %k9.05, 1
88 %exitcond = icmp ne i64 %inc19, %n
89 br i1 %exitcond, label %for.body12, label %for.inc21.loopexit
91 for.inc21.loopexit: ; preds = %for.body12
92 %scevgep = getelementptr i64, ptr %B.addr.18, i64 %n
95 for.inc21: ; preds = %for.inc21.loopexit, %for.cond10.loopexit
96 %B.addr.2.lcssa = phi ptr [ %B.addr.18, %for.cond10.loopexit ], [ %scevgep, %for.inc21.loopexit ]
97 %inc22 = add nsw i64 %j.07, 1
98 %exitcond14 = icmp ne i64 %inc22, %n
99 br i1 %exitcond14, label %for.cond4.preheader, label %for.inc24.loopexit
101 for.inc24.loopexit: ; preds = %for.inc21
102 %B.addr.2.lcssa.lcssa = phi ptr [ %B.addr.2.lcssa, %for.inc21 ]
105 for.inc24: ; preds = %for.inc24.loopexit, %for.cond1.preheader
106 %B.addr.1.lcssa = phi ptr [ %B.addr.012, %for.cond1.preheader ], [ %B.addr.2.lcssa.lcssa, %for.inc24.loopexit ]
107 %inc25 = add nsw i64 %i.011, 1
108 %exitcond15 = icmp ne i64 %inc25, %n
109 br i1 %exitcond15, label %for.cond1.preheader, label %for.end26.loopexit
111 for.end26.loopexit: ; preds = %for.inc24
114 for.end26: ; preds = %for.end26.loopexit, %entry