59 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<opt-isl>' -polly-print-opt-isl -disable-output < %s | FileCheck %s -match-full-lines2;3; Check that the disable_nonforced metadata is honored; optimization4; heuristics/rescheduling must not be applied.5;6define void @func(i32 %n, ptr noalias nonnull %A) {7entry:8 br label %for9 10for:11 %j = phi i32 [0, %entry], [%j.inc, %inc]12 %j.cmp = icmp slt i32 %j, %n13 br i1 %j.cmp, label %inner.for, label %exit14 15 16 inner.for:17 %i = phi i32 [0, %for], [%i.inc, %inner.inc]18 br label %bodyA19 20 21 bodyA:22 %mul = mul nuw nsw i32 %j, 12823 %add = add nuw nsw i32 %mul, %i24 %A_idx = getelementptr inbounds double, ptr %A, i32 %add25 store double 0.0, ptr %A_idx26 br label %inner.inc27 28 29 inner.inc:30 %i.inc = add nuw nsw i32 %i, 131 %i.cmp = icmp slt i32 %i.inc, 12832 br i1 %i.cmp, label %inner.for, label %inner.exit33 34 inner.exit:35 br label %inc, !llvm.loop !236 37 38inc:39 %j.inc = add nuw nsw i32 %j, 140 br label %for, !llvm.loop !241 42exit:43 br label %return44 45return:46 ret void47}48 49 50!2 = distinct !{!2, !3}51!3 = !{!"llvm.loop.disable_nonforced"}52 53 54; n/a indicates no new schedule was computed55;56; CHECK-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':57; CHECK-NEXT: Calculated schedule:58; CHECK-NEXT: n/a59