[llvm] [LV]: Add costs to VPInstruction (PR #125008)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 03:01:29 PST 2025
================
@@ -1315,6 +1315,9 @@ class VPInstruction : public VPRecipeWithIRFlags,
InstructionCost computeCost(ElementCount VF,
VPCostContext &Ctx) const override {
// TODO: Compute accurate cost after retiring the legacy cost model.
+ // Use legacy cost model for now.
+ if (auto *I = dyn_cast_or_null<Instruction>(getUnderlyingValue()))
----------------
hassnaaHamdi wrote:
The original instruction was 'or disjoint' and it got replaced by the VPlanTransforms to Add instruction wrapped in VPInstruction.
https://github.com/llvm/llvm-project/pull/125008
More information about the llvm-commits
mailing list