[PATCH] D145732: [SLP][NFC]Initial merge of gather/buildvector code in the createBuildVector function.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 10:24:44 PST 2023


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9495-9496
+      SinglePos = I;
+      Value *OrigV = V;
+      V = PoisonValue::get(ScalarTy);
       if (IsSplat) {
----------------
vdmitrie wrote:
> ABataev wrote:
> > vdmitrie wrote:
> > > I do not see the poison V used till the end of the loop. 
> > V is the reference, so it updates the value of V in-place
> it is not quite obvious. Can we make it more explicit?
I'll replace it with `GatheredScalars[I] = ...`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145732/new/

https://reviews.llvm.org/D145732



More information about the llvm-commits mailing list