[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 1 12:17:23 PST 2024
================
@@ -7145,7 +7185,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(VL.size() - I, size_t(VF))), Root);
----------------
fhahn wrote:
Adjusted, thanks!
https://github.com/llvm/llvm-project/pull/77790
More information about the llvm-commits
mailing list