brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 4578908 Raw
62 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<deps>' -polly-print-deps -disable-output < %s | FileCheck %s2; RUN: opt %loadNPMPolly '-passes=polly-custom<deps>' -polly-print-deps -polly-dependences-analysis-level=reference-wise -disable-output < %s | FileCheck %s3; RUN: opt %loadNPMPolly '-passes=polly-custom<deps>' -polly-print-deps -polly-dependences-analysis-level=access-wise -disable-output < %s | FileCheck %s4;5; CHECK:      RAW dependences:6; CHECK-NEXT:     {  }7; CHECK-NEXT: WAR dependences:8; CHECK-NEXT:     {  }9; CHECK-NEXT: WAW dependences:10; CHECK-NEXT:     {  }11; CHECK-NEXT: Reduction dependences:12; CHECK-NEXT:     { Stmt_for_body3[i0, i1] -> Stmt_for_body3[2 + i0, -1 + i1] : 0 <= i0 <= 97 and 0 < i1 <= 99 }13;14; void f(int *sum) {15;   for (int i = 0; i < 100; i++)16;     for (int j = 0; j < 100; j++)17;       sum[i+j*2] += j * i;18; }19target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"20 21define void @f(ptr %sum) {22entry:23  br label %for.cond24 25for.cond:                                         ; preds = %for.inc6, %entry26  %i.0 = phi i32 [ 0, %entry ], [ %inc7, %for.inc6 ]27  %exitcond1 = icmp ne i32 %i.0, 10028  br i1 %exitcond1, label %for.body, label %for.end829 30for.body:                                         ; preds = %for.cond31  br label %for.cond132 33for.cond1:                                        ; preds = %for.inc, %for.body34  %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]35  %exitcond = icmp ne i32 %j.0, 10036  br i1 %exitcond, label %for.body3, label %for.end37 38for.body3:                                        ; preds = %for.cond139  %mul = mul nsw i32 %j.0, %i.040  %mul4 = shl nsw i32 %j.0, 141  %add = add nsw i32 %i.0, %mul442  %arrayidx = getelementptr inbounds i32, ptr %sum, i32 %add43  %tmp = load i32, ptr %arrayidx, align 444  %add5 = add nsw i32 %tmp, %mul45  store i32 %add5, ptr %arrayidx, align 446  br label %for.inc47 48for.inc:                                          ; preds = %for.body349  %inc = add nsw i32 %j.0, 150  br label %for.cond151 52for.end:                                          ; preds = %for.cond153  br label %for.inc654 55for.inc6:                                         ; preds = %for.end56  %inc7 = add nsw i32 %i.0, 157  br label %for.cond58 59for.end8:                                         ; preds = %for.cond60  ret void61}62