brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 7ae7d8e Raw
60 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; void f(int *sums) {4;   int i, j;5;   for (i = 0; i < 1024; i++) {6;     for (j = 0; j < 1024; j++) {7;       sums[i] += 5;8;       sums[i+10] *= 5;9;     }10;   }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 void @f(ptr %sums) {18entry:19  br label %for.cond20 21for.cond:                                         ; preds = %for.inc6, %entry22  %i.0 = phi i32 [ 0, %entry ], [ %inc7, %for.inc6 ]23  %exitcond1 = icmp ne i32 %i.0, 102424  br i1 %exitcond1, label %for.body, label %for.end825 26for.body:                                         ; preds = %for.cond27  br label %for.cond128 29for.cond1:                                        ; preds = %for.inc, %for.body30  %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]31  %exitcond = icmp ne i32 %j.0, 102432  br i1 %exitcond, label %for.body3, label %for.end33 34for.body3:                                        ; preds = %for.cond135  %arrayidx = getelementptr inbounds i32, ptr %sums, i32 %i.036  %tmp = load i32, ptr %arrayidx, align 437  %add = add nsw i32 %tmp, 538  store i32 %add, ptr %arrayidx, align 439  %add4 = add nsw i32 %i.0, 1040  %arrayidx5 = getelementptr inbounds i32, ptr %sums, i32 %add441  %tmp2 = load i32, ptr %arrayidx5, align 442  %mul = mul nsw i32 %tmp2, 543  store i32 %mul, ptr %arrayidx5, align 444  br label %for.inc45 46for.inc:                                          ; preds = %for.body347  %inc = add nsw i32 %j.0, 148  br label %for.cond149 50for.end:                                          ; preds = %for.cond151  br label %for.inc652 53for.inc6:                                         ; preds = %for.end54  %inc7 = add nsw i32 %i.0, 155  br label %for.cond56 57for.end8:                                         ; preds = %for.cond58  ret void59}60