brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · dd2a76e Raw
44 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s | FileCheck %s2;3; void f(int N, int * restrict sums, int * restrict escape) {4;   int i, j;5;   for (i = 0; i < 1024; i++) {6;     sums[i] += 5;7;     escape[i] = sums[i];8;   }9; }10;11; CHECK: Reduction Type: NONE12; CHECK: sums13; CHECK: Reduction Type: NONE14; CHECK: sums15; CHECK: Reduction Type: NONE16; CHECK: escape17target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"18 19define void @f(i32 %N, i32* noalias %sums, i32* noalias %escape) {20entry:21  br label %for.cond22 23for.cond:                                         ; preds = %for.inc, %entry24  %i.0 = phi i32 [ 0, %entry ], [ %inc8, %for.inc ]25  %exitcond1 = icmp ne i32 %i.0, 102426  br i1 %exitcond1, label %for.body, label %for.end27 28for.body:                                         ; preds = %for.cond29  %arrayidx = getelementptr inbounds i32, i32* %sums, i32 030  %tmp = load i32, i32* %arrayidx, align 431  %add = add nsw i32 %tmp, 532  store i32 %add, i32* %arrayidx, align 433  %arrayidx6 = getelementptr inbounds i32, i32* %escape, i32 %i.034  store i32 %add, i32* %arrayidx6, align 435  br label %for.inc36 37for.inc:                                          ; preds = %for.body38  %inc8 = add nsw i32 %i.0, 139  br label %for.cond40 41for.end:                                          ; preds = %for.cond42  ret void43}44