This is requried to pushing first faulting reads which not only do a load
but also do a VSET to represent the update to the first fault state.

gcc/ChangeLog:

        * tree-vect-slp.cc (_slp_tree::push_vec_def): Add exclude_virtuals
        argument.
        * tree-vectorizer.h (_slp_tree::push_vec_def): Ditto.
---
 gcc/tree-vect-slp.cc  | 6 ++++--
 gcc/tree-vectorizer.h | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index a5b79d7e608..773040ba46f 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -163,13 +163,15 @@ _slp_tree::~_slp_tree ()
 /* Push the single SSA definition in DEF to the vector of vector defs.  */
 
 void
-_slp_tree::push_vec_def (gimple *def)
+_slp_tree::push_vec_def (gimple *def, bool exclude_virtuals)
 {
   if (gphi *phi = dyn_cast <gphi *> (def))
     vec_defs.quick_push (gimple_phi_result (phi));
   else
     {
-      def_operand_p defop = single_ssa_def_operand (def, SSA_OP_ALL_DEFS);
+      def_operand_p defop = single_ssa_def_operand (def, exclude_virtuals
+                                                        ? SSA_OP_DEF
+                                                        : SSA_OP_ALL_DEFS);
       vec_defs.quick_push (get_def_from_ptr (defop));
     }
 }
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 6495f24a45e..45d0441f53a 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -321,7 +321,7 @@ struct _slp_tree {
   _slp_tree ();
   ~_slp_tree ();
 
-  void push_vec_def (gimple *def);
+  void push_vec_def (gimple *def, bool exclude_virtuals = false);
   void push_vec_def (tree def) { vec_defs.quick_push (def); }
 
   /* Nodes that contain def-stmts of this node statements operands.  */
-- 
2.34.1

Reply via email to