1 ; RUN: opt %loadNPMPolly '-passes=print<polly-delicm>' -pass-remarks-analysis=polly-delicm -polly-delicm-max-ops=1 -disable-output < %s 2>&1 | FileCheck %s
2 ; RUN: opt %loadNPMPolly '-passes=polly-delicm,print<polly-dependences>' -polly-delicm-max-ops=1 -polly-dependences-computeout=0 -disable-output < %s | FileCheck %s -check-prefix=DEP
4 ; void func(double *A) {
5 ; for (int j = 0; j < 2; j += 1) { /* outer */
7 ; for (int i = 0; i < 4; i += 1) /* reduction */
13 define void @func(ptr noalias nonnull %A) {
15 br label %outer.preheader
21 %j = phi i32 [0, %outer.preheader], [%j.inc, %outer.inc]
22 %j.cmp = icmp slt i32 %j, 2
23 br i1 %j.cmp, label %reduction.preheader, label %outer.exit
27 br label %reduction.for
30 %i = phi i32 [0, %reduction.preheader], [%i.inc, %reduction.inc]
31 %phi = phi double [0.0, %reduction.preheader], [%add, %reduction.inc]
32 %i.cmp = icmp slt i32 %i, 4
33 br i1 %i.cmp, label %body, label %reduction.exit
38 %add = fadd double %phi, 4.2
39 br label %reduction.inc
44 %i.inc = add nuw nsw i32 %i, 1
45 br label %reduction.for
48 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
49 store double %phi, ptr %A_idx
55 %j.inc = add nuw nsw i32 %j, 1
66 ; CHECK: maximal number of operations exceeded during zone analysis
68 ; Check that even if the quota was exceeded in DeLICM, DependenceInfo is still
69 ; successfull since it uses a different operations counter.
71 ; DEP: RAW dependences:
73 ; DEP: WAR dependences:
75 ; DEP: WAW dependences:
77 ; DEP: Reduction dependences:
79 ; DEP: Transitive closure of reduction dependences: