]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Dump niter assumption versioning when vectorizing
authorRichard Biener <rguenther@suse.de>
Thu, 28 Aug 2025 13:15:53 +0000 (15:15 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 28 Aug 2025 14:25:32 +0000 (16:25 +0200)
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.

gcc/tree-vect-loop.cc

index 24cff6fa8702c2a4e962e79749a5572582f1fce1..fafd24c132eaade782bef5fd74cde8cb385d58a3 100644 (file)
@@ -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 ();
 }