[PATCH] D83779: [SLP] Fix order of `insertelement`/`insertvalue` seed operands

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 07:48:28 PDT 2020


anton-afanasyev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7078
 
+static unsigned int getAggregateSize(Instruction *InsertInst) {
+  return 2;
----------------
ABataev wrote:
> Why need a parameter here? Why always return `2`?
Fixed, it was temporary dummy.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7087-7088
+      return CI->getZExtValue();
+    else
+      return 0;
+  } else {
----------------
ABataev wrote:
> Just `return 0;`, no need for `else`
Fixed, thanks.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7094
+    Type *CurrentType = IV->getType();
+    for (auto i : IV->indices()) {
+      AggregateType->getElementType(i);
----------------
ABataev wrote:
> Use actual type and `i`->`I`
Fixed, thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83779





More information about the llvm-commits mailing list