]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: Remove innacturate comment and logic for data ref alignment
authorAlfie Richards <alfie.richards@arm.com>
Tue, 10 Feb 2026 10:01:20 +0000 (10:01 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Tue, 10 Feb 2026 13:12:13 +0000 (13:12 +0000)
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
gcc/tree-vect-loop.cc
gcc/tree-vectorizer.h

index e1facc7e9574491f46f5220a3e1c77510d8616e9..4977e425e81b23f4f449ae41ceb3f95f51bb7cb9 100644 (file)
@@ -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 ();
 }
 
 
index a7daeb72a5c737c7497063d4bc90bf78bfed80b6..7d3151128e7a49a689d82cb57e276cb419862916 100644 (file)
@@ -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,
index 5c700535ed26b2309a27e545117b7ad92646c5f5..bde164301a846454fa3b3bcc447bf464502d9b57 100644 (file)
@@ -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);