[PATCH] D115713: [LV] Don't apply "TinyTripCountVectorThreshold" for loops with compile time known TC.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 08:33:39 PST 2022
dmgreen added a comment.
> Avoid vectorization if there is reduction/recurrence induced overhead
For some architectures like MVE and AArch64 the reduction cost might well be cheap. Non-zero but also not huge. It can depend on the reduction. Have you considered the cost of constants and splats too, that the vectorizer will currently hoist into the preheader? The costmodel functions might also sometimes return cheaper costs for certain shuffles and gathers under the assumption that loop invariant parts can be hoisted.
I've tried to get an example of the case that is getting worse for MVE in rG662b5f18467e <https://reviews.llvm.org/rG662b5f18467e7e2dee2d07358efecee349c4b2e7>. It might be a bit over-reduced, but hopefully it still shows the same problems. The original I can't share, I'm afraid.
@fhahn did you have an example of cases where you had seen AArch64 getting worse? Is it covered by reductions or is it more general?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115713/new/
https://reviews.llvm.org/D115713
More information about the llvm-commits
mailing list