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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 03:27:42 PST 2024


================
@@ -7468,7 +7508,8 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
         for (unsigned I = 0, End = VL.size(); I < End; I += VF) {
           if (VectorizedLoads.contains(VL[I]))
             continue;
-          GatherCost += getBuildVectorCost(VL.slice(I, VF), Root);
+          GatherCost += getBuildVectorCost(
+              VL.slice(I, std::min<unsigned>(VL.size() - I, VF)), Root);
----------------
fhahn wrote:

done, thanks!

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


More information about the llvm-commits mailing list