[PATCH] D44983: [LoopUnroll] Only peel if a predicate becomes known in the loop body.

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 02:44:53 PDT 2018


mkazantsev added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:220
+    // the loop body after peeling.
+    if (SE.isKnownPredicate(ICmpInst::getInversePredicate(Pred), IterVal,
+                            RightSCEV))
----------------
Check that `DesiredPeelCount != NewPeelCount` before asking SCEV, this will save us some compile time in most cases.


https://reviews.llvm.org/D44983





More information about the llvm-commits mailing list