[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 06:54:14 PDT 2024


================
@@ -308,6 +308,75 @@ InstructionCost VPRecipeBase::computeCost(ElementCount VF,
   return UI ? Ctx.getLegacyCost(UI, VF) : 0;
 }
 
+void VPPartialReductionRecipe::execute(VPTransformState &State) {
+  State.setDebugLocFrom(getDebugLoc());
+  auto &Builder = State.Builder;
+
+  switch (Opcode) {
----------------
SamTebbs33 wrote:

Changed to an assertion which can be edited when we add new partial reduction intrinsics.

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


More information about the llvm-commits mailing list