[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
Wed Jun 19 03:09:19 PDT 2024


paulwalker-arm wrote:

Thanks all, sounds like we have a way forward.  Ultimately I think we should transition the cost modelling to be tree based rather than instruction based because that's where much of the frailty comes from.  That's very much long term work though so not specifically relevant to this immediate goal.

Whilst I look forward to the results I do want to emphasise the "is inc/dec VL" bad for Neoverse V2 point.  That feels like something we should get to the bottom of asap and just add the necessary feature flag.

I have a final `preferFixedIfEqualToScalable` query though.  Whilst I'm not against its use in this new context I do wonder if instead you could just use `getVScaleForTuning()` which will be set to 1 for Neoverse V2.  My assumption here is that you basically want to ask "if we're tuning based on the assumption the SVE registers are no bigger than the Neon ones".

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


More information about the llvm-commits mailing list