[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 06:50:36 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;
----------------
huntergr-arm wrote:
You can make this a SmallSet of `User *`, avoiding the cast later.
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list