[llvm] [LoadStoreVectorizer] Support vectorization of mixed-type contiguous accesses (PR #177908)
Gang Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 12:01:49 PDT 2026
================
----------------
cmc-rep 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.
Also, related to this issue. I feel that, inside splitChainByPointerWidth, the GCD should be computed only based on non-pointer type. Right now, we kind of assume that pointer-type does not determine the GCD. However, on a machine some odd pointer-size, it could. When GCD cannot be determined (==0) because all the chain components are pointer-types. we split chain by pointer-sizes. I can see that we are already doing that.
I feel that my alternative suggestion is easier to understand. However, not sure how it may affect the outcome of LSV.
https://github.com/llvm/llvm-project/pull/177908
More information about the llvm-commits
mailing list