[llvm] [LV][EVL] Generate negative strided load/store for reversed load/store (PR #123608)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 23:22:00 PST 2025


Mel-Chen wrote:

> For current vectorizer framework, I think it is not easy to implement choosing lowering methods based on cost. 

No, the current framework can handle this. This decision is made by `LoopVectorizationCostModel::setCostBasedWideningDecision` based on cost.

Additionally, replacing reverse memory accesses with strided memory accesses using a stride of -1 is beneficial not only when tail folding by EVL is enabled but also for other tail folding styles. It may even provide benefits for fixed VF. I believe this optimization should not be restricted to EVL vectorization.



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


More information about the llvm-commits mailing list