[llvm] [LoopVectorize] Ensure fairness when selecting epilogue VFs (PR #116607)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 05:20:01 PST 2024
david-arm wrote:
> > e PR #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.
In that case I think there should be a TODO or FIXME in the code here too to get rid of this discrepancy in future because right now the logic is confusing and it's not immediately obvious to the reader why we're favouring less epilogue vectorisation for scalable VFs. I'll do that as part of PR #116247 and it will at least unblock that patch for now.
https://github.com/llvm/llvm-project/pull/116607
More information about the llvm-commits
mailing list