59 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -aa-pipeline= -disable-output < %s | FileCheck %s --check-prefix=NOAA2; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -aa-pipeline=basic-aa -disable-output < %s | FileCheck %s --check-prefix=BASI3; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -aa-pipeline=tbaa -disable-output < %s | FileCheck %s --check-prefix=TBAA4; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -aa-pipeline=scev-aa -disable-output < %s | FileCheck %s --check-prefix=SCEV5; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -aa-pipeline=globals-aa -disable-output < %s | FileCheck %s --check-prefix=GLOB6;7; int A[1024];8;9;10; void jd(float *B, int N) {11; for (int i = 0; i < N; i++)12; A[i] = B[i];13; }14;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]))20;21target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"22 23@A = common global [1024 x i32] zeroinitializer, align 1624 25define void @jd(ptr nocapture readonly %B, i32 %N) {26entry:27 %cmp6 = icmp sgt i32 %N, 028 br i1 %cmp6, label %for.body.preheader, label %for.end29 30for.body.preheader: ; preds = %entry31 br label %for.body32 33for.body: ; preds = %for.body.preheader, %for.body34 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ]35 %arrayidx = getelementptr inbounds float, ptr %B, i64 %indvars.iv36 %tmp = load float, ptr %arrayidx, align 4, !tbaa !137 %conv = fptosi float %tmp to i3238 %arrayidx2 = getelementptr inbounds [1024 x i32], ptr @A, i64 0, i64 %indvars.iv39 store i32 %conv, ptr %arrayidx2, align 4, !tbaa !540 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 141 %lftr.wideiv1 = trunc i64 %indvars.iv.next to i3242 %exitcond2 = icmp eq i32 %lftr.wideiv1, %N43 br i1 %exitcond2, label %for.end.loopexit, label %for.body44 45for.end.loopexit: ; preds = %for.body46 br label %for.end47 48for.end: ; preds = %for.end.loopexit, %entry49 ret void50}51 52!0 = !{!""}53!1 = !{!2, !2, i64 0}54!2 = !{!"float", !3, i64 0}55!3 = !{!"omnipotent char", !4, i64 0}56!4 = !{!"Simple C/C++ TBAA"}57!5 = !{!6, !6, i64 0}58!6 = !{!"int", !3, i64 0}59