[llvm] [LoadStoreVectorizer] Fix one-element vector handling (PR #169671)
Drew Kersnar via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 08:44:09 PST 2025
================
@@ -953,15 +953,15 @@ bool Vectorizer::vectorizeChain(Chain &C) {
unsigned EOffset =
(E.OffsetFromLeader - C[0].OffsetFromLeader).getZExtValue();
unsigned VecIdx = 8 * EOffset / DL.getTypeSizeInBits(VecElemTy);
- if (auto *VT = dyn_cast<FixedVectorType>(T)) {
+ if (VecTy == VecElemTy) {
----------------
dakersnar wrote:
`VecElemTy` comes from `getChainElemTy` which has to return a scalar type, right? So for the special case we are handling here where NumElem == 1, VecElemTy and therefore VecTy should always be a scalar type.
https://github.com/llvm/llvm-project/pull/169671
More information about the llvm-commits
mailing list