[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 09:37:08 PDT 2024
================
@@ -8671,6 +8754,59 @@ VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
return tryToWiden(Instr, Operands, VPBB);
}
+void VPRecipeBuilder::removeInvalidScaledReductionExitInstrs() {
+ // A partial reduction is invalid if any of its extends are used by
+ // something that isn't another partial reduction. This is because the
+ // extends are intended to be lowered along with the reduction itself.
+
+ // Build up a set of partial reduction bin ops for efficient use checking
+ SmallSet<Instruction *, 4> PartialReductionBinOps;
+ for (auto It : ScaledReductionExitInstrs) {
----------------
SamTebbs33 wrote:
Done.
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list