Hi,

Small non-functional change to update a misleading comment.

I'm not certain if leaving this was an intentional choice, if it was
then I'm fine with a NAK.

Regression and bootstrapped on aarch64-linux-gnu.

Okay for master?
Alfie

-- >8 --

vect_analyze_data_refs_alignment clearly cannot return a failure, so
remove the misleading comment and control flow that suggests it might.

gcc/ChangeLog:

        * tree-vect-data-refs.cc (vect_analyze_data_refs_alignment):
        Update signature and comment.
        * tree-vect-loop.cc (vect_analyze_loop_2): Update comment for
        vect_analyze_data_refs_alignment and remove control flow.
        * tree-vectorizer.h (vect_analyze_data_refs_alignment): Update
        signature.
---
 gcc/tree-vect-data-refs.cc |  7 ++-----
 gcc/tree-vect-loop.cc      | 13 ++-----------
 gcc/tree-vectorizer.h      |  2 +-
 3 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index e1facc7e957..4977e425e81 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -3068,10 +3068,9 @@ vect_enhance_data_refs_alignment (loop_vec_info 
loop_vinfo)
 
 /* Function vect_analyze_data_refs_alignment
 
-   Analyze the alignment of the data-references in the loop.
-   Return FALSE if a data reference is found that cannot be vectorized.  */
+   Analyze the alignment of the data-references in the loop.  */
 
-opt_result
+void
 vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo)
 {
   DUMP_VECT_SCOPE ("vect_analyze_data_refs_alignment");
@@ -3094,8 +3093,6 @@ vect_analyze_data_refs_alignment (loop_vec_info 
loop_vinfo)
                                           STMT_VINFO_VECTYPE (dr_info->stmt));
        }
     }
-
-  return opt_result::success ();
 }
 
 
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 0947962fcf2..d58de2fa46c 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -2328,17 +2328,8 @@ start_over:
 
   loop_vinfo->vector_costs = init_cost (loop_vinfo, false);
 
-  /* Analyze the alignment of the data-refs in the loop.
-     Fail if a data reference is found that cannot be vectorized.  */
-
-  ok = vect_analyze_data_refs_alignment (loop_vinfo);
-  if (!ok)
-    {
-      if (dump_enabled_p ())
-       dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-                        "bad data alignment.\n");
-      return ok;
-    }
+  /* Analyze the alignment of the data-refs in the loop.  */
+  vect_analyze_data_refs_alignment (loop_vinfo);
 
   /* Prune the list of ddrs to be tested at run-time by versioning for alias.
      It is important to call pruning after vect_analyze_data_ref_accesses,
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 4849830204d..139ac22cee2 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -2611,7 +2611,7 @@ extern tree vect_get_smallest_scalar_type (stmt_vec_info, 
tree);
 extern opt_result vect_analyze_data_ref_dependences (loop_vec_info, unsigned 
int *);
 extern bool vect_slp_analyze_instance_dependence (vec_info *, slp_instance);
 extern opt_result vect_enhance_data_refs_alignment (loop_vec_info);
-extern opt_result vect_analyze_data_refs_alignment (loop_vec_info);
+extern void vect_analyze_data_refs_alignment (loop_vec_info);
 extern bool vect_slp_analyze_instance_alignment (vec_info *, slp_instance);
 extern opt_result vect_analyze_data_ref_accesses (vec_info *, vec<int> *);
 extern opt_result vect_prune_runtime_alias_test_list (loop_vec_info);
-- 
2.34.1

Reply via email to