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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 08:23:08 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));
+    };
----------------
fhahn wrote:

Should have been used below as well, updated.

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


More information about the llvm-commits mailing list