[PATCH] D90560: [VPlan] Use VPDef for VPWidenSelectRecipe.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 01:52:11 PST 2020


fhahn updated this revision to Diff 311843.
fhahn added a comment.

In D90560#2454074 <https://reviews.llvm.org/D90560#2454074>, @gilr wrote:

> How is the new test related to this change?

It exposed a crash in an earlier revision of the patches, but that has been fixed a while ago. I committed the test separately in 8a7e770638f0 <https://reviews.llvm.org/rG8a7e770638f00c5c8657044b44ca34f471d29511>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90560/new/

https://reviews.llvm.org/D90560

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


Index: llvm/lib/Transforms/Vectorize/VPlan.h
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlan.h
+++ llvm/lib/Transforms/Vectorize/VPlan.h
@@ -885,7 +885,10 @@
 };
 
 /// 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 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90560.311843.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201215/e3be0f55/attachment.bin>


More information about the llvm-commits mailing list