[PATCH] D127119: [SLP]Fix undef handling in gather function.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 12:02:27 PDT 2022


vporpo added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9008
+                      .getKnownMinValue();
+    auto &&GetVecElem = [VF](Value *&VecOp, int Idx, Value *RootOp) -> Value * {
+      unsigned EVF = VF;
----------------
Please add a comment describing the lambda.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9069-9072
+                     std::distance(
+                         SI2->operands().begin(),
+                         find_if(SI2->operands(),
+                                 [VecOp2](Value *Op) { return Op = VecOp2; })) *
----------------
This also repeats in line 9054. Perhaps move it to a lambda like `getOperandIndex(SI2, VecOp2)` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127119



More information about the llvm-commits mailing list