[llvm] [VPlan] Don't apply predication discount to non-originally-predicated blocks (PR #160449)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 05:44:09 PDT 2025
================
@@ -855,7 +855,9 @@ InstructionCost VPRegionBlock::cost(ElementCount VF, VPCostContext &Ctx) {
// For the scalar case, we may not always execute the original predicated
// block, Thus, scale the block's cost by the probability of executing it.
if (VF.isScalar())
- return ThenCost / getPredBlockCostDivisor(Ctx.CostKind);
+ if (auto *VPIRBB = dyn_cast<VPIRBasicBlock>(Then))
----------------
david-arm wrote:
OK, so just waiting for this PR to rebase then before approving.
https://github.com/llvm/llvm-project/pull/160449
More information about the llvm-commits
mailing list