[all-commits] [llvm/llvm-project] eaee47: [LV] Use VScaleForTuning to allow wider epilogue VFs.
sdesmalen-arm via All-commits
all-commits at lists.llvm.org
Thu Feb 3 07:40:56 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eaee477edafed691dae206cea7c0a42893eb2821
https://github.com/llvm/llvm-project/commit/eaee477edafed691dae206cea7c0a42893eb2821
Author: Sander de Smalen <sander.desmalen at arm.com>
Date: 2022-02-03 (Thu, 03 Feb 2022)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect.ll
Log Message:
-----------
[LV] Use VScaleForTuning to allow wider epilogue VFs.
When the main loop is e.g. VF=vscale x 1 and the epilogue VF cannot
be any smaller, the vectorizer should try to estimate how many lanes are
executed at runtime and allow a suitable fixed-width VF to be chosen. It
can use VScaleForTuning to figure out what a suitable fixed-width VF could
be. For the case where the main loop VF is VF=vscale x 1, and VScaleForTuning=8,
it could still choose an epilogue VF upto VF=4.
This was a bit tricky to test, so this patch also introduces a wrapper
function to get 'VScaleForTuning' by also considering vscale_range.
If min and max are equal, then that will be the vscale we compile for.
It makes little sense to tune for a different width if the code
will not be portable for other widths.
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D118709
More information about the All-commits
mailing list