brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 9e6b3cd Raw
51 lines · plain
1; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; int f() {4;   int i, sum = 0, sth = 0;5;   for (i = 0; i < 1024; i++) {6;     sum += 5;7;     sth = sth + sth * sth + sth;8;     sum *= 5;9;   }10;   return sum + sth;11; }12;13; CHECK-NOT: Reduction Type: +14; CHECK-NOT: Reduction Type: *15target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"16 17define i32 @f() {18entry:19  %sum.0 = alloca i3220  %sth.0 = alloca i3221  br label %entry.split22 23entry.split:                                      ; preds = %entry24  store i32 0, ptr %sum.025  store i32 0, ptr %sth.026  br label %for.cond27 28for.cond:                                         ; preds = %for.cond, %entry.split29  %i.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]30  %sth.0.reload = load i32, ptr %sth.031  %sum.0.reload = load i32, ptr %sum.032  %exitcond = icmp ne i32 %i.0, 102433  %mul = mul nsw i32 %sth.0.reload, %sth.0.reload34  %add1 = add nsw i32 %sth.0.reload, %mul35  %tmp = mul i32 %sum.0.reload, 536  store i32 %tmp, ptr %sum.037  %sum.1.reload = load i32, ptr %sum.038  %mul3 = add i32 %sum.1.reload, 2539  %add2 = add nsw i32 %add1, %sth.0.reload40  %inc = add nsw i32 %i.0, 141  store i32 %mul3, ptr %sum.042  store i32 %add2, ptr %sth.043  br i1 %exitcond, label %for.cond, label %for.end44 45for.end:                                          ; preds = %for.cond46  %sum.0.reload.2 = load i32, ptr %sum.047  %sth.0.reload.2 = load i32, ptr %sth.048  %add4 = add nsw i32 %sum.0.reload.2, %sth.0.reload.249  ret i32 %add450}51