https://gcc.gnu.org/g:48ef4af2274a0a1ad945ac14217806c1c1d8ccb2

commit r16-3440-g48ef4af2274a0a1ad945ac14217806c1c1d8ccb2
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Aug 28 15:15:53 2025 +0200

    Dump niter assumption versioning when vectorizing
    
    The following emits the assumption that is used for versioning from
    niter analysis.
    
            * tree-vect-loop.cc (vect_analyze_loop_form): Dump
            niter assumption used for versioning.

Diff:
---
 gcc/tree-vect-loop.cc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 24cff6fa8702..fafd24c132ea 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -1729,6 +1729,17 @@ vect_analyze_loop_form (class loop *loop, gimple 
*loop_vectorized_call,
        }
     }
 
+  if (!integer_onep (info->assumptions))
+    {
+      if (dump_enabled_p ())
+       {
+         dump_printf_loc (MSG_NOTE, vect_location,
+                          "Loop to be versioned with niter assumption ");
+         dump_generic_expr (MSG_NOTE, TDF_SLIM, info->assumptions);
+         dump_printf (MSG_NOTE, "\n");
+       }
+    }
+
   return opt_result::success ();
 }

Reply via email to