[llvm] [VPlan][NFC] Add cost for `VPWidenMemoryRecipe`. (PR #105614)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 13:09:36 PDT 2024
================
@@ -271,6 +271,12 @@ static Instruction *getInstructionForCost(const VPRecipeBase *R) {
return dyn_cast_or_null<Instruction>(S->getUnderlyingValue());
if (auto *IG = dyn_cast<VPInterleaveRecipe>(R))
return IG->getInsertPos();
+ // Currently the legacy cost model only calculates the instruction cost with
+ // underlying instruction. Removing the WidenMem here will prevent
+ // force-target-instruction-cost overwriting the cost of recipe with
+ // underlying instruction which is inconsistent with the legacy model.
+ // TODO: Remove WidenMem from this function when we don't need to compare to
+ // the latecy model.
----------------
fhahn wrote:
```suggestion
// the legacy model.
```
?
https://github.com/llvm/llvm-project/pull/105614
More information about the llvm-commits
mailing list