1 ; RUN: opt %loadNPMPolly -polly-optree-max-ops=1 '-passes=print<polly-optree>' -disable-output < %s | FileCheck %s -match-full-lines
2 ; RUN: opt %loadNPMPolly -polly-optree-max-ops=1 -passes=polly-optree -disable-output -stats < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=STATS
5 ; for (int j = 0; j < n; j += 1) {
13 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
18 %j = phi i32 [0, %entry], [%j.inc, %inc]
19 %j.cmp = icmp slt i32 %j, %n
20 br i1 %j.cmp, label %bodyA, label %exit
23 %B_idx = getelementptr inbounds double, ptr %B, i32 %j
24 %val = load double, ptr %B_idx
28 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
29 store double %val, ptr %A_idx
33 %j.inc = add nuw nsw i32 %j, 1
44 ; CHECK: ForwardOpTree executed, but did not modify anything
46 ; STATS-NOT: IMPLEMENTATION ERROR: Unhandled error state
47 ; STATS: 1 polly-optree - Analyses aborted because max_operations was reached
48 ; STATS-NOT: IMPLEMENTATION ERROR: Unhandled error state