[gcc r17-2818] Do not allocate stmt_vec_info for labels
Richard Biener via Gcc-cvs <[email protected]> Thu, 30 Jul 2026 09:07:34 +0000 (GMT)
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:17ab71c1aa6d6d9f2fdcde61dfea8af478a9936d commit r17-2818-g17ab71c1aa6d6d9f2fdcde61dfea8af478a9936d Author: Richard Biener <[email protected]> Date: Thu Jul 23 09:34:16 2026 +0200 Do not allocate stmt_vec_info for labels 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. Diff: --- gcc/tree-vect-data-refs.cc | 2 +- gcc/tree-vect-loop.cc | 2 +- gcc/tree-vect-slp.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 0e0754769ae4..16808ab53be1 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -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); diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index aff02a9ccae9..8cda9da7f1ac 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -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 diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index e350d8040f5e..510e8daeec66 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -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); }