[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #144908)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 07:35:53 PDT 2025
================
@@ -2861,6 +2886,12 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
VPValue *VecOp = Red->getVecOp();
VPValue *A, *B;
+ // Some chained partial reductions used for complex numbers will have a
+ // negation between the mul and reduction. This extracts the mul from that
+ // pattern to use it for further checking.
+ if (Red->isPartialReduction())
+ match(VecOp,
+ m_Binary<Instruction::Sub>(m_SpecificInt(0), m_VPValue(VecOp)));
----------------
SamTebbs33 wrote:
Yes you're right, thanks. I'll work on fixing that.
https://github.com/llvm/llvm-project/pull/144908
More information about the llvm-commits
mailing list