[PATCH] D149893: Rewrite LSV to handle longer chains.
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 15:06:56 PDT 2023
jlebar added a comment.
Thank you for the review!
================
Comment at: llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:619-622
+ 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;
----------------
arsenm wrote:
> Why not just use getTypeStoreSize
I want to assert that SzBits % 8 == 0 here. getTypeStoreSize will just round up.
================
Comment at: llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:897
+ getLoadStorePointerOperand(C[0].Inst), VecTy->getPointerTo(AS));
+ VecInst = Builder.CreateAlignedLoad(VecTy, Bitcast, Alignment);
+
----------------
arsenm wrote:
> Are we losing any invariant metadata after vectorization?
There is a propagateMetadata call below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149893/new/
https://reviews.llvm.org/D149893
More information about the llvm-commits
mailing list