[llvm] [TTI] Support scalable offsets in getScalingFactorCost (PR #88113)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 05:07:14 PDT 2024


paulwalker-arm wrote:

I agree, but my formula is "BaseGV + StackOffset + BaseReg + Scale*ScaleReg", which results in common code that matches the other instances where an offset has fixed and scalable parts.  StackOffset is not like TypeSize being it represents both fixed and scalable offsets independently and thus any backend can simply ignore the scalable side the same as they'd ignore ScalableOffset.

I'm not hugely familiar with this code so I don't know if we truly need such independence, but if we don't then I'd still prefer the use of a common type rather than say, passing an int and bool separately. I just see no reason to treat scalable vectors as a second class citizen.

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


More information about the llvm-commits mailing list