brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · b811d15 Raw
41 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<deps>' -polly-print-deps -disable-output < %s | FileCheck %s2;3; CHECK:      RAW dependences:4; CHECK-NEXT:     {  }5; CHECK-NEXT: WAR dependences:6; CHECK-NEXT:     {  }7; CHECK-NEXT: WAW dependences:8; CHECK-NEXT:     {  }9; CHECK-NEXT: Reduction dependences:10; CHECK-NEXT:     { Stmt_for_cond[i0] -> Stmt_for_cond[1 + i0] : 0 <= i0 <= 99 }11;12; void f(int* sum) {13;   for (int i = 0; i <= 100; i++)14;     sum += i * 3;15; }16target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"17 18define void @f(ptr %sum) {19entry:20  br label %entry.split121 22entry.split1:                                     ; preds = %entry23  br label %entry.split24 25entry.split:                                      ; preds = %entry.split126  br label %for.cond27 28for.cond:                                         ; preds = %for.cond, %entry.split29  %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]30  %sum.reload = load i32, ptr %sum31  %mul = mul nsw i32 %i1.0, 332  %add = add nsw i32 %sum.reload, %mul33  %inc = add nsw i32 %i1.0, 134  store i32 %add, ptr %sum35  %cmp = icmp slt i32 %i1.0, 10036  br i1 %cmp, label %for.cond, label %for.end37 38for.end:                                          ; preds = %for.cond39  ret void40}41