brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 06a1968 Raw
73 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<deps>' -polly-print-deps -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=reference-wise -disable-output < %s | FileCheck %s --check-prefix=REF2; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<deps>' -polly-print-deps -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=access-wise -disable-output < %s | FileCheck %s --check-prefix=ACC3 4; REF:      RAW dependences:5; REF-NEXT:     [N] -> { [Stmt_for_body[i0] -> MemRef_b[]] -> [Stmt_for_body[6 + i0] -> MemRef_b[]] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[6 + i0] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[4 + i0] : 0 <= i0 <= -11 + N; [Stmt_for_body[i0] -> MemRef_a[]] -> [Stmt_for_body[4 + i0] -> MemRef_a[]] : 0 <= i0 <= -11 + N }6; REF-NEXT: WAR dependences:7; REF-NEXT:     {  }8; REF-NEXT: WAW dependences:9; REF-NEXT:     {  }10; REF-NEXT: Reduction dependences:11; REF-NEXT:     {  }12 13; ACC:      RAW dependences:14; ACC-NEXT:   [N] -> { [Stmt_for_body[i0] -> Stmt_for_body_Write1[]] -> [Stmt_for_body[4 + i0] -> Stmt_for_body_Read0[]] : 0 <= i0 <= -11 + N; Stmt_for_body[i0] -> Stmt_for_body[6 + i0] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[4 + i0] : 0 <= i0 <= -11 + N; [Stmt_for_body[i0] -> Stmt_for_body_Write3[]] -> [Stmt_for_body[6 + i0] -> Stmt_for_body_Read2[]] : 0 <= i0 <= -13 + N }15 16; ACC-NEXT: WAR dependences:17; ACC-NEXT:   [N] -> {  }18; ACC-NEXT: WAW dependences:19; ACC-NEXT:   [N] -> {  }20; ACC-NEXT: Reduction dependences:21; ACC-NEXT:   [N] -> {  }22 23; void test(char a[], char b[], long N) {24;   for (long i = 6; i < N; ++i) {25;     a[i] = a[i - 4] + i;26;     b[i] = b[i - 6] + i;27;   }28; }29 30target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"31target triple = "x86_64-unknown-linux-gnu"32 33; Function Attrs: nounwind uwtable34define void @test(ptr %a, ptr %b, i64 %N) {35entry:36  br label %for.cond37 38for.cond:                                         ; preds = %for.inc, %entry39  %i.0 = phi i64 [ 6, %entry ], [ %inc, %for.inc ]40  %cmp = icmp slt i64 %i.0, %N41  br i1 %cmp, label %for.body, label %for.end42 43for.body:                                         ; preds = %for.cond44  %sub = sub nsw i64 %i.0, 445  %arrayidx = getelementptr inbounds i8, ptr %a, i64 %sub46  %0 = load i8, ptr %arrayidx, align 147  %conv = sext i8 %0 to i6448  %add = add nsw i64 %conv, %i.049  %conv1 = trunc i64 %add to i850  %arrayidx2 = getelementptr inbounds i8, ptr %a, i64 %i.051  store i8 %conv1, ptr %arrayidx2, align 152  %sub3 = sub nsw i64 %i.0, 653  %arrayidx4 = getelementptr inbounds i8, ptr %b, i64 %sub354  %1 = load i8, ptr %arrayidx4, align 155  %conv5 = sext i8 %1 to i6456  %add6 = add nsw i64 %conv5, %i.057  %conv7 = trunc i64 %add6 to i858  %arrayidx8 = getelementptr inbounds i8, ptr %b, i64 %i.059  store i8 %conv7, ptr %arrayidx8, align 160  br label %for.inc61 62for.inc:                                          ; preds = %for.body63  %inc = add nsw i64 %i.0, 164  br label %for.cond65 66for.end:                                          ; preds = %for.cond67  ret void68}69 70!llvm.ident = !{!0}71 72!0 = !{!"clang version 3.9.0"}73