]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not allocate stmt_vec_info for labels
authorRichard Biener <rguenther@suse.de>
Thu, 23 Jul 2026 07:34:16 +0000 (09:34 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 30 Jul 2026 09:07:14 +0000 (11:07 +0200)
The following avoids allocating stmt_vec_info for labels.

* tree-vect-loop.cc (_loop_vec_info::_loop_vec_info): Also
skip labels.
* tree-vect-slp.cc (_bb_vec_info::_bb_vec_info): Likewise.
* tree-vect-data-refs.cc (vect_analyze_early_break_dependences):
Skip labels.

gcc/tree-vect-data-refs.cc
gcc/tree-vect-loop.cc
gcc/tree-vect-slp.cc

index 0e0754769ae441a4d5a505636aa0bb6dbc09ad86..16808ab53be16c3c33591249e8fa1104acc8d1b4 100644 (file)
@@ -729,7 +729,7 @@ vect_analyze_early_break_dependences (loop_vec_info loop_vinfo)
        {
          gimple *stmt = gsi_stmt (gsi);
          gsi_prev (&gsi);
-         if (is_gimple_debug (stmt))
+         if (is_gimple_debug (stmt) || is_a <glabel *> (stmt))
            continue;
 
          stmt_vec_info orig_stmt_vinfo = loop_vinfo->lookup_stmt (stmt);
index aff02a9ccae958ff2daf5d864d00601fc0bcdae5..8cda9da7f1ac34d48730045192d1b990c62dc2db 100644 (file)
@@ -805,7 +805,7 @@ _loop_vec_info::_loop_vec_info (class loop *loop_in, vec_info_shared *shared)
        {
          gimple *stmt = gsi_stmt (si);
          gimple_set_uid (stmt, 0);
-         if (is_gimple_debug (stmt))
+         if (is_gimple_debug (stmt) || is_a <glabel *> (stmt))
            continue;
          add_stmt (stmt);
          /* If .GOMP_SIMD_LANE call for the current loop has 3 arguments, the
index e350d8040f5ec201a8fe5fc5f6c2fa6b465f2978..510e8daeec6680681b6acfb86e4a3e5e5b517d3a 100644 (file)
@@ -8648,7 +8648,7 @@ _bb_vec_info::_bb_vec_info (vec<basic_block> _bbs, vec_info_shared *shared)
        {
          gimple *stmt = gsi_stmt (gsi);
          gimple_set_uid (stmt, 0);
-         if (is_gimple_debug (stmt))
+         if (is_gimple_debug (stmt) || is_a <glabel *> (stmt))
            continue;
          add_stmt (stmt);
        }