1 ; RUN: opt %loadPolly -polly-print-ast -disable-basic-aa -disable-output < %s | FileCheck %s --check-prefix=NOAA
2 ; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s --check-prefix=BASI
3 ; RUN: opt %loadPolly -polly-print-ast -disable-basic-aa -tbaa -disable-output < %s | FileCheck %s --check-prefix=TBAA
4 ; RUN: opt %loadPolly -polly-print-ast -disable-basic-aa -scev-aa -disable-output < %s | FileCheck %s --check-prefix=SCEV
5 ; RUN: opt %loadPolly -polly-print-ast -disable-basic-aa -globals-aa -disable-output < %s | FileCheck %s --check-prefix=GLOB
6 ; RUN: opt %loadPolly -polly-print-ast -disable-basic-aa -globals-aa -polly-allow-nonaffine -disable-output < %s | FileCheck %s --check-prefix=NONAFFINE
8 ; int A[1024], B[1024];
12 ; for (int i = 0; i < N; i++)
16 ; NOAA: if (1 && 0 == N <= 0 && (&MemRef_B[N] <= &MemRef_A[0] || &MemRef_A[N] <= &MemRef_B[0]))
17 ; BASI: if (1 && 0 == N <= 0)
18 ; TBAA: if (1 && 0 == N <= 0 && (&MemRef_B[N] <= &MemRef_A[0] || &MemRef_A[N] <= &MemRef_B[0]))
19 ; SCEV: if (1 && 0 == N <= 0 && (&MemRef_B[N] <= &MemRef_A[0] || &MemRef_A[N] <= &MemRef_B[0]))
20 ; GLOB: if (1 && 0 == N <= 0 && (&MemRef_B[N] <= &MemRef_A[0] || &MemRef_A[N] <= &MemRef_B[0]))
21 ; NONAFFINE: if (1 && 0 == N <= 0 && (&MemRef_B[N] <= &MemRef_A[0] || &MemRef_A[N] <= &MemRef_B[0]))
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
25 @A = common global [1024 x i32] zeroinitializer, align 16
26 @B = common global [1024 x i32] zeroinitializer, align 16
28 define void @jd(i32 %N) {
30 %cmp6 = icmp sgt i32 %N, 0
31 br i1 %cmp6, label %for.body.preheader, label %for.end
33 for.body.preheader: ; preds = %entry
36 for.body: ; preds = %for.body.preheader, %for.body
37 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ]
38 %arrayidx = getelementptr inbounds [1024 x i32], ptr @B, i64 0, i64 %indvars.iv
39 %tmp = load i32, ptr %arrayidx, align 4, !tbaa !5
40 %arrayidx2 = getelementptr inbounds [1024 x i32], ptr @A, i64 0, i64 %indvars.iv
41 store i32 %tmp, ptr %arrayidx2, align 4, !tbaa !5
42 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
43 %lftr.wideiv1 = trunc i64 %indvars.iv.next to i32
44 %exitcond2 = icmp eq i32 %lftr.wideiv1, %N
45 br i1 %exitcond2, label %for.end.loopexit, label %for.body
47 for.end.loopexit: ; preds = %for.body
50 for.end: ; preds = %for.end.loopexit, %entry
56 !2 = !{!"float", !3, i64 0}
57 !3 = !{!"omnipotent char", !4, i64 0}
58 !4 = !{!"Simple C/C++ TBAA"}
60 !6 = !{!"int", !3, i64 0}