[llvm] 9490d58 - Revert "[VPlan] Compute cost of scalar (U|S)Div, (U|S)Rem in computeCost (NFCI)."
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 13 15:33:19 PDT 2025
Author: Aiden Grossman
Date: 2025-09-13T22:32:48Z
New Revision: 9490d58fa92bb338db96af331194c9ba26eb0201
URL: https://github.com/llvm/llvm-project/commit/9490d58fa92bb338db96af331194c9ba26eb0201
DIFF: https://github.com/llvm/llvm-project/commit/9490d58fa92bb338db96af331194c9ba26eb0201.diff
LOG: Revert "[VPlan] Compute cost of scalar (U|S)Div, (U|S)Rem in computeCost (NFCI)."
This reverts commit de7e3a589525179f3b02b84b194aac6cf581425c.
This broke quite a few upstream buildbots and premerge. Reverting for now to
get things back to green.
https://lab.llvm.org/buildbot/#/builders/137/builds/25467
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index f5c8cf106d8b5..c6273074778d1 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3151,23 +3151,9 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
case Instruction::Xor:
case Instruction::ICmp:
case Instruction::FCmp:
- case Instruction::Select:
return *getCostForRecipeWithOpcode(getOpcode(), ElementCount::getFixed(1),
Ctx) *
(isSingleScalar() ? 1 : VF.getFixedValue());
- case Instruction::SDiv:
- case Instruction::UDiv:
- case Instruction::SRem:
- case Instruction::URem: {
- InstructionCost ScalarCost = *getCostForRecipeWithOpcode(
- getOpcode(), ElementCount::getFixed(1), Ctx);
- if (isSingleScalar())
- return ScalarCost;
-
- return ScalarCost * VF.getFixedValue() +
- Ctx.getScalarizationOverhead(Ctx.Types.inferScalarType(this),
- to_vector(operands()), VF);
- }
case Instruction::Load:
case Instruction::Store: {
if (isSingleScalar()) {
More information about the llvm-commits
mailing list