80 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<delicm>' -polly-print-delicm -pass-remarks-analysis=polly-delicm -polly-delicm-max-ops=1 -disable-output < %s 2>&1 | FileCheck %s2; RUN: opt %loadNPMPolly '-passes=polly-custom<deps;delicm>' -polly-print-deps -polly-delicm-max-ops=1 -polly-dependences-computeout=0 -disable-output < %s | FileCheck %s -check-prefix=DEP3;4; void func(double *A) {5; for (int j = 0; j < 2; j += 1) { /* outer */6; double phi = 0.0;7; for (int i = 0; i < 4; i += 1) /* reduction */8; phi += 4.2;9; A[j] = phi;10; }11; }12;13define void @func(ptr noalias nonnull %A) {14entry:15 br label %outer.preheader16 17outer.preheader:18 br label %outer.for19 20outer.for:21 %j = phi i32 [0, %outer.preheader], [%j.inc, %outer.inc]22 %j.cmp = icmp slt i32 %j, 223 br i1 %j.cmp, label %reduction.preheader, label %outer.exit24 25 26 reduction.preheader:27 br label %reduction.for28 29 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, 433 br i1 %i.cmp, label %body, label %reduction.exit34 35 36 37 body:38 %add = fadd double %phi, 4.239 br label %reduction.inc40 41 42 43 reduction.inc:44 %i.inc = add nuw nsw i32 %i, 145 br label %reduction.for46 47 reduction.exit:48 %A_idx = getelementptr inbounds double, ptr %A, i32 %j49 store double %phi, ptr %A_idx50 br label %outer.inc51 52 53 54outer.inc:55 %j.inc = add nuw nsw i32 %j, 156 br label %outer.for57 58outer.exit:59 br label %return60 61return:62 ret void63}64 65 66; CHECK: maximal number of operations exceeded during zone analysis67 68; Check that even if the quota was exceeded in DeLICM, DependenceInfo is still69; successful since it uses a different operations counter.70;71; DEP: RAW dependences:72; DEP-NOT: n/a73; DEP: WAR dependences:74; DEP-NOT: n/a75; DEP: WAW dependences:76; DEP-NOT: n/a77; DEP: Reduction dependences:78; DEP-NOT: n/a79; DEP: Transitive closure of reduction dependences:80