brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ce22813 Raw
48 lines · plain
1; RUN: opt %loadNPMPolly -polly-pragma-based-opts=1 '-passes=polly-custom<opt-isl>' -polly-print-opt-isl -disable-output < %s | FileCheck %s --match-full-lines2; RUN: opt %loadNPMPolly -polly-pragma-based-opts=0 '-passes=polly-custom<opt-isl>' -polly-print-opt-isl -disable-output < %s | FileCheck %s --check-prefix=OFF --match-full-lines3;4; Partial unroll by a factor of 4.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 %body, label %exit14 15    body:16      store double 42.0, ptr %A17      br label %inc18 19inc:20  %j.inc = add nuw nsw i32 %j, 121  br label %for, !llvm.loop !222 23exit:24  br label %return25 26return:27  ret void28}29 30 31!2 = distinct !{!2, !5}32!5 = !{!"llvm.loop.unroll.count", i4 4}33 34 35; CHECK-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':36; CHECK:       domain: "[n] -> { Stmt_body[i0] : 0 <= i0 < n }"37; CHECK:         schedule: "[n] -> [{ Stmt_body[i0] -> [(i0 - (i0) mod 4)] }]"38; CHECK:           sequence:39; CHECK-NEXT:      - filter: "[n] -> { Stmt_body[i0] : (i0) mod 4 = 0 }"40; CHECK-NEXT:      - filter: "[n] -> { Stmt_body[i0] : (-1 + i0) mod 4 = 0 }"41; CHECK-NEXT:      - filter: "[n] -> { Stmt_body[i0] : (2 + i0) mod 4 = 0 }"42; CHECK-NEXT:      - filter: "[n] -> { Stmt_body[i0] : (1 + i0) mod 4 = 0 }"43 44 45; OFF-LABEL: Printing analysis 'Polly - Optimize schedule of SCoP' for region: 'for => return' in function 'func':46; OFF-NEXT:  Calculated schedule:47; OFF-NEXT:    n/a48