[llvm] [VPlan] Compute scalar cost based on VPlan0 instead of legacy CM. (PR #196845)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 07:35:01 PDT 2026


================
@@ -1114,7 +1114,6 @@ InstructionCost VPRecipeWithIRFlags::getCostForRecipeWithOpcode(
   Type *ResultTy = VF.isVector() ? toVectorTy(ScalarTy, VF) : ScalarTy;
   switch (Opcode) {
   case Instruction::FNeg:
-    return Ctx.TTI.getArithmeticInstrCost(Opcode, ResultTy, Ctx.CostKind);
----------------
david-arm wrote:

Ok thanks, although I can't see Switch/Alloca here? Is that because you're letting them fall through to the default case (cost=0) now?

https://github.com/llvm/llvm-project/pull/196845


More information about the llvm-commits mailing list