[llvm] [VPlan] Use VPInstructionWithType for uniform casts. (PR #140623)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 08:07:17 PDT 2026
================
@@ -1643,6 +1643,15 @@ void VPInstructionWithType::execute(VPTransformState &State) {
}
}
+InstructionCost VPInstructionWithType::computeCost(ElementCount VF,
+ VPCostContext &Ctx) const {
+ // TODO: Compute cost for VPInstructions without underlying values.
+ if (!getUnderlyingValue())
+ return 0;
+ return getCostForRecipeWithOpcode(getOpcode(), ElementCount::getFixed(1),
----------------
fhahn wrote:
Yep, currently the only case we have underlying values is casts, added an assert.
https://github.com/llvm/llvm-project/pull/140623
More information about the llvm-commits
mailing list