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