[llvm-branch-commits] [llvm] [LV] Add ExtNegatedMulAccReduction expression type (PR #160154)
Sam Tebbs via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 26 08:38:47 PDT 2025
================
@@ -2861,12 +2861,17 @@ InstructionCost VPExpressionRecipe::computeCost(ElementCount VF,
return Ctx.TTI.getMulAccReductionCost(false, Opcode, RedTy, SrcVecTy,
Ctx.CostKind);
- case ExpressionTypes::ExtMulAccReduction:
+ case ExpressionTypes::ExtNegatedMulAccReduction:
+ case ExpressionTypes::ExtMulAccReduction: {
+ if (ExpressionType == ExpressionTypes::ExtNegatedMulAccReduction &&
+ Opcode == Instruction::Add)
+ Opcode = Instruction::Sub;
----------------
SamTebbs33 wrote:
Addressed now, thanks!
https://github.com/llvm/llvm-project/pull/160154
More information about the llvm-branch-commits
mailing list