[llvm] [LoopVectorize] Ensure fairness when selecting epilogue VFs (PR #116607)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 04:51:28 PST 2024


fhahn wrote:

> e PR https://github.com/llvm/llvm-project/pull/108190 seems to have unintentionally introduced an unfairness in selecting epilogue VFs by making potentially better choices for fixed-width VFs compared to scalable VFs.
IIRC the default behavior was retained for scalable vectors intentionally, due to not having access to HW with scalable vectors and `selectEpilogueVectorizationFactor` not supporting scalable vectors in code that was needed to avoid regressions with fixed vectors.

To avoid regression with fixed vectors, we rely code that checks the number of remaining iterations, which currently doesn't support scalable vectors (look for // TODO: extend to support scalable VFs), which probably should be fixed first.

Would be good to collect performance numbers to make sure this has the desired effect on HW with scalable vectors.

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


More information about the llvm-commits mailing list