brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 7d34ef9 Raw
89 lines · plain
1; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true '-passes=polly-custom<scops>' -polly-print-detect -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -check-prefix=SCALAR2; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-process-unprofitable=false '-passes=polly-custom<scops>' -polly-print-detect -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -check-prefix=PROFIT3;4; SCALAR:      Function: f5; SCALAR-NEXT: Region: %bb1---%bb136; SCALAR-NEXT: Max Loop Depth:  17; SCALAR-NEXT: Invariant Accesses: {8; SCALAR-NEXT: }9; SCALAR-NEXT: Context:10; SCALAR-NEXT: {  :  }11; SCALAR-NEXT: Assumed Context:12; SCALAR-NEXT: {  :  }13; SCALAR-NEXT: Invalid Context:14; SCALAR-NEXT: {  : false }15; SCALAR:      Arrays {16; SCALAR-NEXT:     i32 MemRef_C[*]; // Element size 417; SCALAR-NEXT:     i32 MemRef_A[*]; // Element size 418; SCALAR-NEXT: }19; SCALAR-NEXT: Arrays (Bounds as pw_affs) {20; SCALAR-NEXT:     i32 MemRef_C[*]; // Element size 421; SCALAR-NEXT:     i32 MemRef_A[*]; // Element size 422; SCALAR-NEXT: }23; SCALAR-NEXT: Alias Groups (0):24; SCALAR-NEXT:     n/a25; SCALAR-NEXT: Statements {26; SCALAR-NEXT:     Stmt_bb3__TO__bb1127; SCALAR-NEXT:         Domain :=28; SCALAR-NEXT:             { Stmt_bb3__TO__bb11[i0] : 0 <= i0 <= 1023 };29; SCALAR-NEXT:         Schedule :=30; SCALAR-NEXT:             { Stmt_bb3__TO__bb11[i0] -> [i0] };31; SCALAR-NEXT:         ReadAccess :=    [Reduction Type: NONE] [Scalar: 0]32; SCALAR-NEXT:             { Stmt_bb3__TO__bb11[i0] -> MemRef_C[i0] };33; SCALAR-NEXT:         ReadAccess :=    [Reduction Type: +] [Scalar: 0]34; SCALAR-NEXT:             { Stmt_bb3__TO__bb11[i0] -> MemRef_A[o0] };35; SCALAR-NEXT:         MayWriteAccess :=    [Reduction Type: +] [Scalar: 0]36; SCALAR-NEXT:             { Stmt_bb3__TO__bb11[i0] -> MemRef_A[o0] };37; SCALAR-NEXT: }38 39; PROFIT-NOT: Statements40;41;    void f(int * restrict A, int * restrict C) {42;      int j;43;      for (int i = 0; i < 1024; i++) {44;        while ((j = C[i++])) {45;          A[j]++;46;          if (true) break;47;        }48;      }49;    }50;51target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"52 53define void @f(ptr noalias %A, ptr noalias %C) {54bb:55  br label %bb156 57bb1:                                              ; preds = %bb12, %bb58  %indvars.iv = phi i64 [ %indvars.iv.next, %bb12 ], [ 0, %bb ]59  %exitcond = icmp ne i64 %indvars.iv, 102460  br i1 %exitcond, label %bb2, label %bb1361 62bb2:                                              ; preds = %bb163  br label %bb364 65bb3:                                              ; preds = %bb6, %bb266  %tmp = getelementptr inbounds i32, ptr %C, i64 %indvars.iv67  %tmp4 = load i32, ptr %tmp, align 468  %tmp5 = icmp eq i32 %tmp4, 069  br i1 %tmp5, label %bb11, label %bb670 71bb6:                                              ; preds = %bb372  %tmp7 = sext i32 %tmp4 to i6473  %tmp8 = getelementptr inbounds i32, ptr %A, i64 %tmp774  %tmp9 = load i32, ptr %tmp8, align 475  %tmp10 = add nsw i32 %tmp9, 176  store i32 %tmp10, ptr %tmp8, align 477  br i1 true, label %bb11, label %bb378 79bb11:                                             ; preds = %bb380  br label %bb1281 82bb12:                                             ; preds = %bb1183  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 184  br label %bb185 86bb13:                                             ; preds = %bb187  ret void88}89