49 lines · plain
1; RUN: opt %loadNPMPolly -polly-optree-max-ops=1 '-passes=polly-custom<optree>' -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines2; RUN: opt %loadNPMPolly -polly-optree-max-ops=1 '-passes=polly-custom<optree>' -disable-output -stats < %s 2>&1 | FileCheck %s -match-full-lines -check-prefix=STATS3; REQUIRES: asserts4;5; for (int j = 0; j < n; j += 1) {6; bodyA:7; double val = B[j];8;9; bodyB:10; A[j] = val;11; }12;13define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {14entry:15 br label %for16 17for:18 %j = phi i32 [0, %entry], [%j.inc, %inc]19 %j.cmp = icmp slt i32 %j, %n20 br i1 %j.cmp, label %bodyA, label %exit21 22 bodyA:23 %B_idx = getelementptr inbounds double, ptr %B, i32 %j24 %val = load double, ptr %B_idx25 br label %bodyB26 27 bodyB:28 %A_idx = getelementptr inbounds double, ptr %A, i32 %j29 store double %val, ptr %A_idx30 br label %inc31 32inc:33 %j.inc = add nuw nsw i32 %j, 134 br label %for35 36exit:37 br label %return38 39return:40 ret void41}42 43 44; CHECK: ForwardOpTree executed, but did not modify anything45 46; STATS-NOT: IMPLEMENTATION ERROR: Unhandled error state47; STATS: 1 polly-optree - Analyses aborted because max_operations was reached48; STATS-NOT: IMPLEMENTATION ERROR: Unhandled error state49