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