fhahn wrote: I put up an alternative version with most of the logic moved the ::computeCost functions in VPlan, VPBasicBlock, VPRegionBlock in https://github.com/llvm/llvm-project/pull/92555 https://github.com/llvm/llvm-project/pull/67934