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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 10:12:33 PDT 2024


paulwalker-arm wrote:

> I could think about a more narrow heuristic: if the kernel is small, there are no masked loads/stores, the cost-model is a tie, favour fixed, something along those lines. But I am afraid you're not going to like that either because you just like to see SVE code here.

Please don't think me an SVE zealot here.  I'd just rather see the compiler make decisions based on data from the IR rather than implement a switch that effectively means "ignore the data".  I appreciate this might not always be clean, for example take a look at `AArch64TTIImpl::preferPredicateOverEpilogue`.  This comes under the same "micro-architectural reasons that we cannot fully represent" but at least that's showing a decision based on the input IR that's concrete (i.e. we think predication is bad for small loops) that can be evolved over time.

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


More information about the llvm-commits mailing list