[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 13:26:48 PST 2024


================
@@ -6987,6 +7024,17 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
     auto *VecTy = FixedVectorType::get(VL.front()->getType(), VL.size());
     InstructionCost GatherCost = 0;
     SmallVector<Value *> Gathers(VL.begin(), VL.end());
+    auto ComputeGatherCost = [&]() {
+      return all_of(Gathers, UndefValue::classof)
+                 ? TTI::TCC_Free
+                 : R.getGatherCost(Gathers, !Root && VL.equals(Gathers));
+    };
----------------
alexey-bataev wrote:

Why do you need this lambda?

https://github.com/llvm/llvm-project/pull/77790


More information about the llvm-commits mailing list