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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 02:44:54 PDT 2025


================
@@ -2752,10 +2762,10 @@ void VPWidenLoadRecipe::execute(VPTransformState &State) {
     NewLI = Builder.CreateAlignedLoad(DataTy, Addr, Alignment, "wide.load");
   }
   // Add metadata to the load, but setVectorValue to the reverse shuffle.
-  State.addMetadata(NewLI, LI);
-  if (Reverse)
-    NewLI = Builder.CreateVectorReverse(NewLI, "reverse");
-  State.set(this, NewLI);
+  State.addNewMetadata(NewLI, LI);
+  applyMetadata(*NewLI);
+  State.set(this,
+            Reverse ? Builder.CreateVectorReverse(NewLI, "reverse") : NewLI);
----------------
fhahn wrote:

restored thanks

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


More information about the llvm-commits mailing list