[llvm] [VPlan] Manage instruction medata in VPlan. (PR #135272)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 20 11:48:45 PDT 2025


================
@@ -8599,11 +8599,13 @@ VPRecipeBuilder::tryToWidenMemory(Instruction *I, ArrayRef<VPValue *> Operands,
   }
   if (LoadInst *Load = dyn_cast<LoadInst>(I))
     return new VPWidenLoadRecipe(*Load, Ptr, Mask, Consecutive, Reverse,
+                                 getMetadataToPropagate(Load),
----------------
ayalz wrote:

If passing the metadata relieves the need to pass and store the underlying insn - great!
If the underlying insn is still needed, would it be better to have the constructor extract its metadata (to propagate, thereby reducing the diff), rather than pass both parameters independently, or are there cases where some other metadata is desired - e.g. none, as appears below?

https://github.com/llvm/llvm-project/pull/135272


More information about the llvm-commits mailing list