Skip to content

Commit ff89558

Browse files
authored
[VPlan] Fix opcode in LoadStore EVL recipe (#170594)
After #169885 lands, vp_load/vp_store are handled by getMemIntrinsicInstrCost, so we can use the correct opcode here.
1 parent 52113cf commit ff89558

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3606,10 +3606,8 @@ InstructionCost VPWidenLoadEVLRecipe::computeCost(ElementCount VF,
36063606
Type *Ty = toVectorTy(getLoadStoreType(&Ingredient), VF);
36073607
unsigned AS = cast<PointerType>(Ctx.Types.inferScalarType(getAddr()))
36083608
->getAddressSpace();
3609-
// FIXME: getMaskedMemoryOpCost assumes masked_* intrinsics.
3610-
// After migrating to getMemIntrinsicInstrCost, switch this to vp_load.
36113609
InstructionCost Cost = Ctx.TTI.getMemIntrinsicInstrCost(
3612-
MemIntrinsicCostAttributes(Intrinsic::masked_load, Ty, Alignment, AS),
3610+
MemIntrinsicCostAttributes(Intrinsic::vp_load, Ty, Alignment, AS),
36133611
Ctx.CostKind);
36143612
if (!Reverse)
36153613
return Cost;
@@ -3718,10 +3716,8 @@ InstructionCost VPWidenStoreEVLRecipe::computeCost(ElementCount VF,
37183716
Type *Ty = toVectorTy(getLoadStoreType(&Ingredient), VF);
37193717
unsigned AS = cast<PointerType>(Ctx.Types.inferScalarType(getAddr()))
37203718
->getAddressSpace();
3721-
// FIXME: getMaskedMemoryOpCost assumes masked_* intrinsics.
3722-
// After migrating to getMemIntrinsicInstrCost, switch this to vp_store.
37233719
InstructionCost Cost = Ctx.TTI.getMemIntrinsicInstrCost(
3724-
MemIntrinsicCostAttributes(Intrinsic::masked_store, Ty, Alignment, AS),
3720+
MemIntrinsicCostAttributes(Intrinsic::vp_store, Ty, Alignment, AS),
37253721
Ctx.CostKind);
37263722
if (!Reverse)
37273723
return Cost;

0 commit comments

Comments
 (0)