[llvm] [LV]Initial support for safe distance in predicated DataWithEVL vectorization mode. (PR #102897)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 00:55:15 PDT 2024


================
@@ -4106,15 +4133,11 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
     if (Rem->isZero()) {
       // Accept MaxFixedVF if we do not have a tail.
       LLVM_DEBUG(dbgs() << "LV: No tail will remain for any chosen VF.\n");
+      disableTailFolding();
----------------
fhahn wrote:

This is needed, because we need to first need to compute the max VFs, assuming tail folding, right?

Could we end up in a scenario, where we MaxSafeNumberOfElements is 3, we max scalable VF of 4 is picked and then tail-folding is disabled here and no EVL will be used, vectorizing incorrectly with VF 4?

https://github.com/llvm/llvm-project/pull/102897


More information about the llvm-commits mailing list