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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 05:11:01 PDT 2020


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7087
 
+static bool getAggregateSize(Instruction *InsertInst,
+                             unsigned int &AggregateSize) {
----------------
Maybe better to return `Optional<unsigned>` here rather than return `bool` and have `AggregateSize` return param/


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7119-7120
+
+static bool getOperandIndex(Instruction *InsertInst,
+                            unsigned int &OperandIndex) {
+  auto *IE = dyn_cast<InsertElementInst>(InsertInst);
----------------
Same, `Optional<unsigned>`


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