95 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=scalar-indep -polly-print-instructions '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines2 3target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"4 5@b = dso_local local_unnamed_addr global i32 1, align 46@e = dso_local local_unnamed_addr global i32 3, align 47@a = common dso_local local_unnamed_addr global [56 x i32] zeroinitializer, align 168@f = common dso_local local_unnamed_addr global i16 0, align 29@d = common dso_local local_unnamed_addr global i8 0, align 110 11; Function Attrs: nounwind uwtable12define dso_local i32 @func() {13entry:14 br label %entry.split15 16entry.split: ; preds = %entry17 br label %for.body18 19for.body: ; preds = %for.body, %entry.split20 %indvars.iv = phi i64 [ 0, %entry.split ], [ %indvars.iv.next, %for.body ]21 %arrayidx = getelementptr inbounds [56 x i32], ptr @a, i64 0, i64 %indvars.iv22 %0 = trunc i64 %indvars.iv to i3223 store i32 %0, ptr %arrayidx, align 4, !tbaa !024 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 125 %exitcond = icmp eq i64 %indvars.iv.next, 5626 br i1 %exitcond, label %for.end, label %for.body27 28for.end: ; preds = %for.body29 %1 = load i32, ptr @e, align 4, !tbaa !030 store i32 2, ptr @e, align 4, !tbaa !031 %2 = trunc i32 %1 to i1632 %conv = and i16 %2, 133 %tobool = icmp eq i16 %conv, 034 br label %for.body335 36for.body3: ; preds = %for.end, %for.inc1137 %storemerge20 = phi i32 [ 2, %for.end ], [ %dec12, %for.inc11 ]38 %3 = load i8, ptr @d, align 139 %cmp6 = icmp eq i8 %3, 840 %or.cond = or i1 %tobool, %cmp641 br i1 %or.cond, label %for.inc11, label %for.inc11.loopexit42 43for.inc11.loopexit: ; preds = %for.body344 store i32 0, ptr @b, align 4, !tbaa !045 store i8 8, ptr @d, align 1, !tbaa !446 br label %for.inc1147 48for.inc11: ; preds = %for.inc11.loopexit, %for.body349 %dec12 = add nsw i32 %storemerge20, -150 %cmp2 = icmp sgt i32 %storemerge20, -1851 br i1 %cmp2, label %for.body3, label %for.end1352 53for.end13: ; preds = %for.inc1154 store i16 %conv, ptr @f, align 2, !tbaa !555 store i32 -19, ptr @e, align 4, !tbaa !056 %4 = load i32, ptr @b, align 4, !tbaa !057 ret i32 %458}59 60!0 = !{!1, !1, i64 0}61!1 = !{!"int", !2, i64 0}62!2 = !{!"omnipotent char", !3, i64 0}63!3 = !{!"Simple C/C++ TBAA"}64!4 = !{!2, !2, i64 0}65!5 = !{!6, !6, i64 0}66!6 = !{!"short", !2, i64 0}67 68; CHECK: Stmt_for_end_a69; CHECK-NEXT: Domain :=70; CHECK-NEXT: { Stmt_for_end_a[] };71; CHECK-NEXT: Schedule :=72; CHECK-NEXT: { Stmt_for_end_a[] -> [1, 0] };73; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]74; CHECK-NEXT: { Stmt_for_end_a[] -> MemRef_e[0] };75; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]76; CHECK-NEXT: { Stmt_for_end_a[] -> MemRef_tobool[] };77; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]78; CHECK-NEXT: { Stmt_for_end_a[] -> MemRef_conv[] };79; CHECK-NEXT: Instructions {80; CHECK-NEXT: %1 = load i32, ptr @e, align 4, !tbaa !081; CHECK-NEXT: %2 = trunc i32 %1 to i1682; CHECK-NEXT: %conv = and i16 %2, 183; CHECK-NEXT: %tobool = icmp eq i16 %conv, 084; CHECK-NEXT: }85; CHECK-NEXT: Stmt_for_end86; CHECK-NEXT: Domain :=87; CHECK-NEXT: { Stmt_for_end[] };88; CHECK-NEXT: Schedule :=89; CHECK-NEXT: { Stmt_for_end[] -> [2, 0] };90; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]91; CHECK-NEXT: { Stmt_for_end[] -> MemRef_e[0] };92; CHECK-NEXT: Instructions {93; CHECK-NEXT: store i32 2, ptr @e, align 4, !tbaa !094; CHECK-NEXT: }95