[llvm] [Transform][LoadStoreVectorizer] allow redundant in Chain (PR #163019)

Gang Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 13:10:57 PDT 2025


cmc-rep wrote:

> > It does sound like it's not a bug, but a feature. Whether vector load is profitable would generally require target-specific knowledge. E.g. on NVPTX, some vector loads may be nearly free, while others costly, if too many loaded elements are unused. LoadStoreVectorizer may be a reasonable place to handle some cases that we determine to be unprofitable. And we may still need to handle even more cases in the back-end.
> 
> But VectorCombine already uses TTI to get target-specific cost information.

I don't feel that VectorCombine is well equiped to understand the cost during "vectorizeLoadInsert". It has TII, however, it only has  a very narrow view of the IR, i.e. it does not look beyond the current load+insertelement. LoadStoreVectorizer is better equipped for this.

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


More information about the llvm-commits mailing list