[llvm] fb017a5 - [VPlan] Use load/store opcode for VPWiden(Load|Store)EVLRecipe (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 13:30:33 PDT 2025


Author: Florian Hahn
Date: 2025-05-12T21:30:18+01:00
New Revision: fb017a52e7934e7f287f81e8b6057419b9a82857

URL: https://github.com/llvm/llvm-project/commit/fb017a52e7934e7f287f81e8b6057419b9a82857
DIFF: https://github.com/llvm/llvm-project/commit/fb017a52e7934e7f287f81e8b6057419b9a82857.diff

LOG: [VPlan] Use load/store opcode for VPWiden(Load|Store)EVLRecipe (NFC).

Removes unnecessary uses of Ingredient.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 12fd6280c6fb4..c88fa32655c2c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3010,7 +3010,7 @@ InstructionCost VPWidenLoadEVLRecipe::computeCost(ElementCount VF,
   unsigned AS =
       getLoadStoreAddressSpace(const_cast<Instruction *>(&Ingredient));
   InstructionCost Cost = Ctx.TTI.getMaskedMemoryOpCost(
-      Ingredient.getOpcode(), Ty, Alignment, AS, Ctx.CostKind);
+      Instruction::Load, Ty, Alignment, AS, Ctx.CostKind);
   if (!Reverse)
     return Cost;
 
@@ -3125,7 +3125,7 @@ InstructionCost VPWidenStoreEVLRecipe::computeCost(ElementCount VF,
   unsigned AS =
       getLoadStoreAddressSpace(const_cast<Instruction *>(&Ingredient));
   InstructionCost Cost = Ctx.TTI.getMaskedMemoryOpCost(
-      Ingredient.getOpcode(), Ty, Alignment, AS, Ctx.CostKind);
+      Instruction::Store, Ty, Alignment, AS, Ctx.CostKind);
   if (!Reverse)
     return Cost;
 


        


More information about the llvm-commits mailing list