[llvm] 7186a39 - [VPlan] Use VPDef for VPWidenSelectRecipe.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 06:15:35 PST 2020


Author: Florian Hahn
Date: 2020-12-15T14:15:01Z
New Revision: 7186a3965af20b02d4620a96f078d826b306c63e

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

LOG: [VPlan] Use VPDef for VPWidenSelectRecipe.

This patch turns updates VPWidenSelectRecipe to manage the value
it defines using VPDef.

Reviewed By: gilr

Differential Revision: https://reviews.llvm.org/D90560

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlan.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 2b3808b74b74..02ae60990c63 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -885,7 +885,10 @@ class VPWidenCallRecipe : public VPRecipeBase,
 };
 
 /// A recipe for widening select instructions.
-class VPWidenSelectRecipe : public VPRecipeBase, public VPValue, public VPUser {
+class VPWidenSelectRecipe : public VPRecipeBase,
+                            public VPDef,
+                            public VPUser,
+                            public VPValue {
 
   /// Is the condition of the select loop invariant?
   bool InvariantCond;
@@ -894,8 +897,8 @@ class VPWidenSelectRecipe : public VPRecipeBase, public VPValue, public VPUser {
   template <typename IterT>
   VPWidenSelectRecipe(SelectInst &I, iterator_range<IterT> Operands,
                       bool InvariantCond)
-      : VPRecipeBase(VPRecipeBase::VPWidenSelectSC),
-        VPValue(VPValue::VPVWidenSelectSC, &I), VPUser(Operands),
+      : VPRecipeBase(VPRecipeBase::VPWidenSelectSC), VPUser(Operands),
+        VPValue(VPValue::VPVWidenSelectSC, &I, this),
         InvariantCond(InvariantCond) {}
 
   ~VPWidenSelectRecipe() override = default;


        


More information about the llvm-commits mailing list