brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 35a503c Raw
58 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -polly-ast-detect-parallel -disable-output < %s | FileCheck %s2;3; The minimal dependence distance of the innermost loop should be 1 instead of 250.4; CHECK:    #pragma minimal dependence distance: 15; CHECK:    for (int c0 = 0; c0 <= 499; c0 += 1)6; CHECK:      #pragma minimal dependence distance: 17; CHECK:      for (int c1 = 0; c1 <= 998; c1 += 1) {8; CHECK:        Stmt_bb9(c0, c1);9; CHECK:        Stmt_bb9_b(c0, c1);10;11;    void foo (int *A, int *B) {12;      for (int i=0; i < 500; i++) {13;        for (int j=0; j < 1000; j++) {14;          B[i] = B[i] + 1;15;          A[j] += A[j % 250];16;        }17;      }18;    }19;20target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"21 22define void @foo(ptr nocapture %arg, ptr nocapture %arg1) {23bb:24  br label %bb225 26bb2:                                              ; preds = %bb27  br label %bb428 29bb3:                                              ; preds = %bb630  ret void31 32bb4:                                              ; preds = %bb6, %bb233  %tmp = phi i32 [ 0, %bb2 ], [ %tmp7, %bb6 ]34  %tmp5 = getelementptr inbounds i32, ptr %arg1, i32 %tmp35  br label %bb936 37bb6:                                              ; preds = %bb938  %tmp7 = add nuw nsw i32 %tmp, 139  %tmp8 = icmp eq i32 %tmp7, 50040  br i1 %tmp8, label %bb3, label %bb441 42bb9:                                              ; preds = %bb9, %bb443  %tmp10 = phi i32 [ 1, %bb4 ], [ %tmp19, %bb9 ]44  %tmp11 = load i32, ptr %tmp5, align 445  %tmp12 = add nsw i32 %tmp11, 146  store i32 %tmp12, ptr %tmp5, align 447  %tmp13 = urem i32 %tmp10, 25048  %tmp14 = getelementptr inbounds i32, ptr %arg, i32 %tmp1349  %tmp15 = load i32, ptr %tmp14, align 450  %tmp16 = getelementptr inbounds i32, ptr %arg, i32 %tmp1051  %tmp17 = load i32, ptr %tmp16, align 452  %tmp18 = add nsw i32 %tmp17, %tmp1553  store i32 %tmp18, ptr %tmp16, align 454  %tmp19 = add nuw nsw i32 %tmp10, 155  %tmp20 = icmp eq i32 %tmp19, 100056  br i1 %tmp20, label %bb6, label %bb957}58