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 ; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false "-passes=scop(polly-prune-unprofitable)" -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s
5 ; Skip this SCoP for having scalar dependencies between all statements,
6 ; but only after ScopInfo (because optimization passes using ScopInfo such
7 ; as DeLICM might remove these scalar dependencies).
10 ; for (int i = 0; i < n; i += 1)
11 ; for (int j = 0; j < m; j += 1) {
17 define double @func(i32 %n, i32 %m, ptr noalias nonnull %A, ptr noalias nonnull %B) {
22 %outer.phi = phi double [0.0, %entry], [%inner.phi, %outer.inc]
23 %i = phi i32 [0, %entry], [%i.inc, %outer.inc]
24 %i.cmp = icmp slt i32 %i, %n
25 br i1 %i.cmp, label %inner.for, label %outer.exit
28 %inner.phi = phi double [%outer.phi, %outer.for], [%load, %inner.inc]
29 %j = phi i32 [0, %outer.for], [%j.inc, %inner.inc]
30 %j.cmp = icmp slt i32 %j, %m
31 br i1 %j.cmp, label %body, label %inner.exit
34 store double %inner.phi, ptr %B
35 %load = load double, ptr %A
39 %j.inc = add nuw nsw i32 %j, 1
46 %i.inc = add nuw nsw i32 %i, 1
57 ; CHECK: 1 polly-prune-unprofitable - Number of pruned SCoPs because it they cannot be optimized in a significant way