Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Isl / Ast / alias_simple_3.ll
blob58d6553d23b74150777301e47bcf46aa7412c609
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=NOAA
2 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -basicaa < %s | FileCheck %s --check-prefix=BASI
3 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -tbaa < %s | FileCheck %s --check-prefix=TBAA
4 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -scev-aa < %s | FileCheck %s --check-prefix=SCEV
5 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -globalsmodref-aa < %s | FileCheck %s --check-prefix=GLOB
7 ;    int A[1024];
8 ;    float B[1024];
10 ;    void jd(int N) {
11 ;      for (int i = 0; i < N; i++)
12 ;        A[i] = B[i];
13 ;    }
15 ; NOAA: if (N <= 1024 && (&MemRef_A[N] <= &MemRef_B[0] || &MemRef_B[N] <= &MemRef_A[0]))
16 ; BASI: if (N <= 1024)
17 ; TBAA: if (N <= 1024)
18 ; SCEV: if (N <= 1024 && (&MemRef_A[N] <= &MemRef_B[0] || &MemRef_B[N] <= &MemRef_A[0]))
19 ; GLOB: if (N <= 1024 && (&MemRef_A[N] <= &MemRef_B[0] || &MemRef_B[N] <= &MemRef_A[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
24 @B = common global [1024 x float] zeroinitializer, align 16
26 define void @jd(i32 %N) {
27 entry:
28   %cmp6 = icmp sgt i32 %N, 0
29   br i1 %cmp6, label %for.body.preheader, label %for.end
31 for.body.preheader:                               ; preds = %entry
32   br label %for.body
34 for.body:                                         ; preds = %for.body.preheader, %for.body
35   %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ]
36   %arrayidx = getelementptr inbounds  [1024 x float],  [1024 x float]* @B, i64 0, i64 %indvars.iv
37   %tmp = load float* %arrayidx, align 4, !tbaa !1
38   %conv = fptosi float %tmp to i32
39   %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv
40   store i32 %conv, i32* %arrayidx2, align 4, !tbaa !5
41   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
42   %lftr.wideiv1 = trunc i64 %indvars.iv.next to i32
43   %exitcond2 = icmp eq i32 %lftr.wideiv1, %N
44   br i1 %exitcond2, label %for.end.loopexit, label %for.body
46 for.end.loopexit:                                 ; preds = %for.body
47   br label %for.end
49 for.end:                                          ; preds = %for.end.loopexit, %entry
50   ret void
53 !0 = !{!""}
54 !1 = !{!2, !2, i64 0}
55 !2 = !{!"float", !3, i64 0}
56 !3 = !{!"omnipotent char", !4, i64 0}
57 !4 = !{!"Simple C/C++ TBAA"}
58 !5 = !{!6, !6, i64 0}
59 !6 = !{!"int", !3, i64 0}