[llvm] [LoadStoreVectorizer] Fill gaps in load/store chains to enable vectorization (PR #159388)
Drew Kersnar via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 06:55:32 PST 2025
================
@@ -633,7 +692,8 @@ std::vector<Chain> Vectorizer::splitChainByContiguity(Chain &C) {
unsigned SzBits = DL.getTypeSizeInBits(getLoadStoreType(&*Prev.Inst));
assert(SzBits % 8 == 0 && "Non-byte sizes should have been filtered out by "
"collectEquivalenceClass");
- APInt PrevReadEnd = Prev.OffsetFromLeader + SzBits / 8;
+ APInt PrevSzBytes = APInt(ASPtrBits, SzBits / 8);
----------------
dakersnar wrote:
> Not just the Prev element, all elements in the chain have the same size.
Technically not true, all elements in the chain have the same underlying scalar size, but an element can be a vector. For example, a chain could have one element that is a `load <2 x i32>` and another element that is a `load i32` (or even a `load f32`).
https://github.com/llvm/llvm-project/pull/159388
More information about the llvm-commits
mailing list