We're using VMAT_INVARIANT as default, but we should simply have
an uninitialized state.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

        * tree-vectorizer.h (VMAT_UNINITIALIZED): New
        vect_memory_access_type.
        * tree-vect-slp.cc (_slp_tree::_slp_tree): Use it.
---
 gcc/tree-vect-slp.cc  | 2 +-
 gcc/tree-vectorizer.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 4038fe84e87..ca14a2deed2 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -124,7 +124,7 @@ _slp_tree::_slp_tree ()
   this->avoid_stlf_fail = false;
   SLP_TREE_VECTYPE (this) = NULL_TREE;
   SLP_TREE_REPRESENTATIVE (this) = NULL;
-  SLP_TREE_MEMORY_ACCESS_TYPE (this) = VMAT_INVARIANT;
+  SLP_TREE_MEMORY_ACCESS_TYPE (this) = VMAT_UNINITIALIZED;
   SLP_TREE_REF_COUNT (this) = 1;
   this->failed = NULL;
   this->max_nunits = 1;
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 0a48b491dac..c334d2f051e 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -173,6 +173,8 @@ struct vect_scalar_ops_slice_hash : 
typed_noop_remove<vect_scalar_ops_slice>
 /* Describes how we're going to vectorize an individual load or store,
    or a group of loads or stores.  */
 enum vect_memory_access_type {
+  VMAT_UNINITIALIZED,
+
   /* An access to an invariant address.  This is used only for loads.  */
   VMAT_INVARIANT,
 
-- 
2.43.0

Reply via email to