1 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1
2 ; RUN: opt < %s -analyze -basicaa -da
3 ;; Check this doesn't crash.
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-unknown-linux-gnu"
12 ;; void dep_constraint_crash_test(int k,int N) {
13 ;; for( int i=0;i<N;i++)
14 ;; for( int j=0;j<N;j++)
15 ;; S.A[0][0] = S.C[0][0][k];
19 %struct.s = type { [10 x [10 x i32]], [10 x [10 x [10 x i32]]] }
21 @S = common global %struct.s zeroinitializer
23 define void @dep_constraint_crash_test(i32 %k, i32 %N) {
25 %cmp12 = icmp sgt i32 %N, 0
26 br i1 %cmp12, label %for.cond1.preheader.lr.ph, label %for.end6
28 for.cond1.preheader.lr.ph:
29 %idxprom = sext i32 %k to i64
30 %arrayidx = getelementptr inbounds %struct.s, %struct.s* @S, i64 0, i32 1, i64 0, i64 0, i64 %idxprom
31 br label %for.body3.preheader
34 %i.013 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc5, %for.inc4 ]
38 %j.011 = phi i32 [ %inc, %for.body3 ], [ 0, %for.body3.preheader ]
39 %0 = load i32, i32* %arrayidx
40 store i32 %0, i32* getelementptr inbounds (%struct.s, %struct.s* @S, i64 0, i32 0, i64 0, i64 0)
41 %inc = add nuw nsw i32 %j.011, 1
42 %exitcond = icmp eq i32 %inc, %N
43 br i1 %exitcond, label %for.inc4, label %for.body3
46 %inc5 = add nuw nsw i32 %i.013, 1
47 %exitcond14 = icmp eq i32 %inc5, %N
48 br i1 %exitcond14, label %for.end6, label %for.body3.preheader