[llvm] [LV] Keep duplicate recipes in VPExpressionRecipe (PR #156976)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 03:42:05 PDT 2025


================
@@ -3013,8 +3014,11 @@ class VPExpressionRecipe : public VPSingleDefRecipe {
                            {Ext0, Ext1, Mul, Red}) {}
 
   ~VPExpressionRecipe() override {
-    for (auto *R : reverse(ExpressionRecipes))
-      delete R;
+    SmallSet<VPSingleDefRecipe *, 4> ExpressionRecipesSeen;
+    for (auto *R : reverse(ExpressionRecipes)) {
+      if (ExpressionRecipesSeen.insert(R).second)
----------------
SamTebbs33 wrote:

Sorry, I did add it but must not have staged it.

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


More information about the llvm-commits mailing list