1; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false -polly-prune-unprofitable -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s 2; REQUIRES: asserts 3; 4; Skip this SCoP for having scalar dependencies between all statements, 5; but only after ScopInfo (because optimization passes using ScopInfo such 6; 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, double* noalias nonnull %A, double* noalias nonnull %B) { 17entry: 18 br label %outer.for 19 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, %n 24 br i1 %i.cmp, label %inner.for, label %outer.exit 25 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, %m 30 br i1 %j.cmp, label %body, label %inner.exit 31 32 body: 33 store double %inner.phi, double* %B 34 %load = load double, double* %A 35 br label %inner.inc 36 37 inner.inc: 38 %j.inc = add nuw nsw i32 %j, 1 39 br label %inner.for 40 41 inner.exit: 42 br label %outer.inc 43 44outer.inc: 45 %i.inc = add nuw nsw i32 %i, 1 46 br label %outer.for 47 48outer.exit: 49 br label %return 50 51return: 52 ret double %outer.phi 53} 54 55 56; CHECK: 1 polly-prune-unprofitable - Number of pruned SCoPs because it they cannot be optimized in a significant way 57