brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 4f049a3 Raw
38 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s | FileCheck %s2;3; Should not be identified as reduction as there are different operations4; involved on sum (multiplication followed by addition)5; CHECK: Reduction Type: NONE6;7;    void f(int *restrict sum) {8;      for (int i = 0; i < 1024; i++) {9;        *sum = (*sum * 5) + 25;10;      }11;    }12;13target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"14 15define void @f(i32* noalias %sum) {16entry:17  br label %for.cond18 19for.cond:                                         ; preds = %for.inc, %entry20  %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]21  %exitcond = icmp ne i32 %i.0, 102422  br i1 %exitcond, label %for.body, label %for.end23 24for.body:                                         ; preds = %for.cond25  %tmp = load i32, i32* %sum, align 426  %tmp1 = mul i32 %tmp, 527  %mul = add i32 %tmp1, 2528  store i32 %mul, i32* %sum, align 429  br label %for.inc30 31for.inc:                                          ; preds = %for.body32  %inc = add nsw i32 %i.0, 133  br label %for.cond34 35for.end:                                          ; preds = %for.cond36  ret void37}38