================ @@ -2432,12 +2437,40 @@ static void tryToCreateAbstractReductionRecipe(VPReductionRecipe *Red, Red->replaceAllUsesWith(AbstractR); } +/// This function tries to create an abstract recipe from a partial reduction to +/// hide its mul and extends from cost estimation. +static void +tryToCreateAbstractPartialReductionRecipe(VPPartialReductionRecipe *PRed) { + if (PRed->getOpcode() != Instruction::Add) + return; + + VPRecipeBase *BinOpR = PRed->getBinOp()->getDefiningRecipe(); + auto *BinOp = dyn_cast<VPWidenRecipe>(BinOpR); + if (!BinOp || BinOp->getOpcode() != Instruction::Mul) + return; ---------------- SamTebbs33 wrote:
Done :+1: . https://github.com/llvm/llvm-project/pull/136173 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits