[llvm] [LoadStoreVectorizer] Support vectorization of mixed-type contiguous accesses (PR #177908)
Anshil Gandhi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 10:53:31 PDT 2026
================
----------------
gandhi56 wrote:
> The reasoning looks right to me.
>
> One alternative I can think of is adding an optional field for ElemTy in each chain. getChainElemTy will only compute ChainElemTy when that optional field is null. ChainElemTy should be decided and fixed by the outermost loop, splitChainByPointerWidth. All the later splitting functions need to carry the decided ChainElemTy.
`ChainElemTy` depends on the `splitChainByContiguity` function and vice-versa. `ElemTy` can be recomputed/updated at the time of splitting the chain by contiguity. I also realize that `getChainElemTy` is being called too many times. Keeping track of this type will make the code more efficient and bug-free.
Unless there is a strong opinion, I will implement the field as suggested by @cmc-rep and update the split functions accordingly.
https://github.com/llvm/llvm-project/pull/177908
More information about the llvm-commits
mailing list