[llvm] [VPlan] Compute scalar cost based on VPlan0 instead of legacy CM. (PR #196845)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 07:26:40 PDT 2026
================
@@ -1480,15 +1505,39 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
return getCostForRecipeWithOpcode(
getOpcode(),
vputils::onlyFirstLaneUsed(this) ? ElementCount::getFixed(1) : VF, Ctx);
+ case Instruction::ExtractValue:
+ case Instruction::FNeg:
+ case Instruction::Freeze:
+ if (!VF.isScalar() || !getUnderlyingValue())
+ return 0;
----------------
fhahn wrote:
Updated to break and moved the assert outside the switch, so it should still be covered.
https://github.com/llvm/llvm-project/pull/196845
More information about the llvm-commits
mailing list