[llvm] [LV]Initial support for safe distance in predicated DataWithEVL vectorization mode. (PR #102897)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 06:33:20 PDT 2024
================
@@ -3903,9 +3919,14 @@ FixedScalableVFPair LoopVectorizationCostModel::computeFeasibleMaxVF(
// dependence distance).
unsigned MaxSafeElements =
llvm::bit_floor(Legal->getMaxSafeVectorWidthInBits() / WidestType);
+ unsigned MaxScalableSafeElements = MaxSafeElements;
+ if (foldTailWithEVL() && !Legal->isSafeForAnyVectorWidth()) {
+ MaxScalableSafeElements = std::numeric_limits<unsigned>::max();
----------------
alexey-bataev wrote:
I thought about this and at first I thought it might be good to use max here. But after some thoughts, I think next-power-of-2 is good here
https://github.com/llvm/llvm-project/pull/102897
More information about the llvm-commits
mailing list