[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
Tue Feb 4 23:29:15 PST 2025


Mel-Chen wrote:

> > But if that's the case, wouldn't it be sufficient to just modify computeCost, keep load + reverse, and convert it into strided accesses in CodeGenPrepare?
> 
> I guess it depends on what we want the canonical form for a reversed load to be, i.e. a vp intrinsic or load + reverse. My preference would be the former since it's easier to pattern match.
> 
> Although I didn't realise this would be unprofitable on x280, in that case I think its reasonable if we want to check the cost of `getStridedMemoryOpCost` vs `getMemoryOpCost + getShuffleCost` and choose the cheaper lowering option as @arcbbb suggested earlier. That way the cost for the recipe would just be the minimum of the 2.

Sounds good :)


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


More information about the llvm-commits mailing list