[PATCH] D67948: [LV] Interleaving should not exceed estimated loop trip count.
Hideki Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 16:40:28 PDT 2019
hsaito added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5213
// Do not interleave loops with a relatively small trip count.
- unsigned TC = PSE.getSE()->getSmallConstantTripCount(TheLoop);
- if (TC > 1 && TC < TinyTripCountInterleaveThreshold)
+ auto BestKnownTC = getSmallBestKnownTC(*PSE.getSE(), TheLoop);
+ if (BestKnownTC && *BestKnownTC < TinyTripCountInterleaveThreshold)
----------------
This assumes constant trip count case is handled well by getSmallConstantMaxTripCount called from getSmallBestKnownTC ---- but if that is not the case, that would be a bug on the SCEV side. I traced a little bit but could not verify it myself as I'm not familiar with SCEV code. As such, I'm just pointing out a different SCEV function will be called as a result of this change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67948/new/
https://reviews.llvm.org/D67948
More information about the llvm-commits
mailing list