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

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:09:54 PST 2025


wangpc-pp wrote:

> > I am not so familiar with current LV infrastructure, how should I check the legality and cost model here?
> 
> In `VPWidenLoadEVLRecipe::computeCost` you can remove the getShuffleCost bit and use TTI.getStridedMemOpCost.
> 
> If it's not supported then the cost should return illegal which should prevent the plan from being selected I think

Thanks! I think I have followed your suggestion and ported the new cost model. But it seems that the legacy cost model and VPlan-based cost model have different decisions of best factor. I debugged it and I don't think there is anything wrong.

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


More information about the llvm-commits mailing list