https://gcc.gnu.org/g:75b4e997414d415fe61016fff963a3f5dbc49ce6

commit r17-6151-g75b4e997414d415fe61016fff963a3f5dbc49ce6
Author: Michal Jires <[email protected]>
Date:   Thu Oct 1 18:01:59 2026 +0200

    vectorizer: fix dump_printf_loc without dump_enabled_p
    
    dump_printf_loc has to be guarded by dump_enabled_p.
    asserted by VERIFY_DUMP_ENABLED_P
    
    Bootstrapped/regtested on x86_64-linux, commiting to trunk as trivial.
    
    gcc/ChangeLog:
    
            * tree-vect-stmts.cc (get_load_store_type): guard dump_printf_loc

Diff:
---
 gcc/tree-vect-stmts.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index cd5462f0363b..cd2300cd30dc 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -2318,9 +2318,10 @@ get_load_store_type (vec_info  *vinfo, stmt_vec_info 
stmt_info,
                   && *memory_access_type != VMAT_ELEMENTWISE);
       if (overrun_p && vls_type != VLS_LOAD)
        {
-         dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-                          "Grouped store with gaps requires"
-                          " non-consecutive accesses\n");
+         if (dump_enabled_p ())
+           dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+                            "Grouped store with gaps requires"
+                            " non-consecutive accesses\n");
          return false;
        }

Reply via email to