[PATCH] D150121: [SLP][NFC]Add missing finalize params in the CostEstimator, NFC.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 13 03:41:01 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7311
+            });
+      return Cost;
+    }
----------------
(style) unnecessary control-flow (please excuse the bad indentation)
```
if (all_of(GatheredScalars, PoisonValue ::classof))
  return Estimator.finalize(E->ReuseShuffleIndices);

return Estimator.finalize(E->ReuseShuffleIndices, E->Scalars.size(),
                                  [&](Value *&Vec, SmallVectorImpl<int> &Mask) {
                                    Vec = Estimator.gather(
                                        GatheredScalars, Constant::getNullValue(FixedVectorType::get(
                                                             GatheredScalars.front()->getType(),
                                                             GatheredScalars.size())));
                                  });
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150121



More information about the llvm-commits mailing list