[PATCH] D44983: [LoopUnroll] Only peel if a predicate becomes known in the loop body.
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 10:22:27 PDT 2018
junbuml added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:218
+
+ // Only peel the loop if if !Pred becomes known in the first iteration of
+ // the loop body after peeling.
----------------
if Pred or !Pred
================
Comment at: test/Transforms/LoopUnroll/peel-loop-conditions.ll:341
-; Test that we respect MaxPeelCount
+; Test that we only peel off iterations if it simplifies a condition in the
+; loop body.
----------------
I think you should add another test to show the case where MaxPeelCount is respected.
================
Comment at: test/Transforms/LoopUnroll/peel-loop-conditions.ll:447
define void @test6(i32 %k) {
; CHECK-LABEL: @test6(
----------------
Better to add comment here.
https://reviews.llvm.org/D44983
More information about the llvm-commits
mailing list