[llvm] [VPlan] Fix opcode in LoadStore EVL recipe (PR #170594)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 18:22:01 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-vectorizers
Author: Shih-Po Hung (arcbbb)
<details>
<summary>Changes</summary>
After #<!-- -->169885 lands, vp_load/vp_store are handled by getMemIntrinsicInstrCost, so we can use the correct opcode here.
---
Full diff: https://github.com/llvm/llvm-project/pull/170594.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp (+2-6)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 4d46478aa7373..7b159b3a9c5eb 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3606,10 +3606,8 @@ InstructionCost VPWidenLoadEVLRecipe::computeCost(ElementCount VF,
Type *Ty = toVectorTy(getLoadStoreType(&Ingredient), VF);
unsigned AS = cast<PointerType>(Ctx.Types.inferScalarType(getAddr()))
->getAddressSpace();
- // FIXME: getMaskedMemoryOpCost assumes masked_* intrinsics.
- // After migrating to getMemIntrinsicInstrCost, switch this to vp_load.
InstructionCost Cost = Ctx.TTI.getMemIntrinsicInstrCost(
- MemIntrinsicCostAttributes(Intrinsic::masked_load, Ty, Alignment, AS),
+ MemIntrinsicCostAttributes(Intrinsic::vp_load, Ty, Alignment, AS),
Ctx.CostKind);
if (!Reverse)
return Cost;
@@ -3718,10 +3716,8 @@ InstructionCost VPWidenStoreEVLRecipe::computeCost(ElementCount VF,
Type *Ty = toVectorTy(getLoadStoreType(&Ingredient), VF);
unsigned AS = cast<PointerType>(Ctx.Types.inferScalarType(getAddr()))
->getAddressSpace();
- // FIXME: getMaskedMemoryOpCost assumes masked_* intrinsics.
- // After migrating to getMemIntrinsicInstrCost, switch this to vp_store.
InstructionCost Cost = Ctx.TTI.getMemIntrinsicInstrCost(
- MemIntrinsicCostAttributes(Intrinsic::masked_store, Ty, Alignment, AS),
+ MemIntrinsicCostAttributes(Intrinsic::vp_store, Ty, Alignment, AS),
Ctx.CostKind);
if (!Reverse)
return Cost;
``````````
</details>
https://github.com/llvm/llvm-project/pull/170594
More information about the llvm-commits
mailing list