[llvm] [VPlan] Return Max from computeCost without underlying instrs. (PR #109708)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 6 06:03:52 PDT 2024
================
@@ -315,7 +311,9 @@ InstructionCost VPRecipeBase::computeCost(ElementCount VF,
// transform, avoid computing their cost multiple times for now.
Ctx.SkipCostComputation.insert(UI);
}
- return UI ? Ctx.getLegacyCost(UI, VF) : 0;
+ // Max cost is used as a sentinel value to detect recipes without underlying
+ // instructions for which no forced target instruction cost should be applied.
+ return UI ? Ctx.getLegacyCost(UI, VF) : InstructionCost::getMax();
----------------
fhahn wrote:
<Move the comment above to update the existing comment, thanks!
https://github.com/llvm/llvm-project/pull/109708
More information about the llvm-commits
mailing list