[PATCH] D44880: [Hexagon] peel loops with runtime small trip counts

Ikhlas Ajbar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 26 21:04:29 PDT 2018


iajbar added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:803
+    // default value 0.
+    computePeelCount(L, LoopSize, UP, TripCount, SE);
   if (UP.PeelCount) {
----------------
mkazantsev wrote:
> I don't think it is correct. `computePeelCount` will set PeelCount to 0 if the loop is unpeelable, and you are forcing it to some value without checking this fact.
There is another call to canPeel() in peelLoop().  In the case of a target sets the peel count to Non zero, then the loop won’t get peel if it’s invalid to be peeled.


https://reviews.llvm.org/D44880





More information about the llvm-commits mailing list