[llvm] [SLP][Revec] Fix SLP crash when trying to fold trailing scalars into the reduced value (PR #203477)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 20 19:22:37 PDT 2026
================
@@ -30442,11 +30433,8 @@ class HorizontalReduction {
// Emit ordered reduction for the vectorized window.
Builder.SetCurrentDebugLocation(
cast<Instruction>(ReductionRoot)->getDebugLoc());
- if (VectorizedTree)
- VectorizedTree =
- emitReduction(SuccessRoot, Builder, TTI, DestTy, VectorizedTree);
- else
- VectorizedTree = emitReduction(SuccessRoot, Builder, TTI, DestTy);
+ VectorizedTree = createSingleOp(Builder, *TTI, SuccessRoot, 1, false,
+ DestTy, false, VectorizedTree);
----------------
sushgokh wrote:
done
https://github.com/llvm/llvm-project/pull/203477
More information about the llvm-commits
mailing list