[llvm] [LV][AArch64] Prefer Fixed over Scalable if cost-model is equal (Neoverse V2) (PR #95819)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 02:59:45 PDT 2024


sjoerdmeijer wrote:

I have added `LoopVectorizationPlanner::preferFixedOverScalableIfEqualCost`. As I wrote in the comments there, the initial  idea here is that if the cost-model is a tie, and gathers/scatters or predication is required, then SVE is probably more efficient so favour SVE in these cases. The way I look at it this function is that it provides a little framework to come up with something better in the future, it should be general enough to allow this. I spent some time on creating a test case for the code-path "cost model is a tie, but there are gather/scatters, so let's favour SVE",  but failed within the time I spent on this, but again, I hope the framework is enough. Let me know what you think @david-arm , @paulwalker-arm 

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


More information about the llvm-commits mailing list