57 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false '-passes=polly-custom<prune>' -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s2; REQUIRES: asserts3;4; Skip this SCoP for having scalar dependencies between all statements,5; but only after ScopInfo (because optimization passes using ScopInfo such6; as DeLICM might remove these scalar dependencies).7;8; double x = 0;9; for (int i = 0; i < n; i += 1)10; for (int j = 0; j < m; j += 1) {11; B[0] = x;12; x = A[0];13; }14; return x;15;16define double @func(i32 %n, i32 %m, ptr noalias nonnull %A, ptr noalias nonnull %B) {17entry:18 br label %outer.for19 20outer.for:21 %outer.phi = phi double [0.0, %entry], [%inner.phi, %outer.inc]22 %i = phi i32 [0, %entry], [%i.inc, %outer.inc]23 %i.cmp = icmp slt i32 %i, %n24 br i1 %i.cmp, label %inner.for, label %outer.exit25 26 inner.for:27 %inner.phi = phi double [%outer.phi, %outer.for], [%load, %inner.inc]28 %j = phi i32 [0, %outer.for], [%j.inc, %inner.inc]29 %j.cmp = icmp slt i32 %j, %m30 br i1 %j.cmp, label %body, label %inner.exit31 32 body:33 store double %inner.phi, ptr %B34 %load = load double, ptr %A35 br label %inner.inc36 37 inner.inc:38 %j.inc = add nuw nsw i32 %j, 139 br label %inner.for40 41 inner.exit:42 br label %outer.inc43 44outer.inc:45 %i.inc = add nuw nsw i32 %i, 146 br label %outer.for47 48outer.exit:49 br label %return50 51return:52 ret double %outer.phi53}54 55 56; CHECK: 1 polly-prune-unprofitable - Number of pruned SCoPs because it they cannot be optimized in a significant way57