Without prior masking for alignment support, any misaligned uncounted
loop was automatically handled via peeling for alignment.

The preceding changes extend the partial-vector loop-control
machinery to support this approach without relying on a known
iteration count.

Therefore, with the introduction of masking for alignment, we relax
this restriction allowing masking for alignment.

gcc/ChangeLog:

        * tree-vect-loop.cc (vect_analyze_loop_2): Do not disable
        partial vectors for uncounted loops.
---
 gcc/tree-vect-loop.cc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index c71fbf590c0..bb5259bb73f 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -2274,10 +2274,6 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, int 
masked_p, bool &fatal,
     orig_loop_vinfo = loop_vinfo;
   gcc_assert (orig_loop_vinfo);
 
-  /* We can't mask on niters for uncounted loops due to unknown upper bound.  
*/
-  if (LOOP_VINFO_NITERS_UNCOUNTED_P (loop_vinfo))
-    LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;
-
   /* The first group of checks is independent of the vector size.  */
   fatal = true;
 
-- 
2.43.0

Reply via email to