From: Richard Biener Date: Thu, 23 Jul 2026 07:34:16 +0000 (+0200) Subject: Do not allocate stmt_vec_info for labels X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ab71c1aa6d6d9f2fdcde61dfea8af478a9936d;p=thirdparty%2Fgcc.git 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 --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 0e0754769ae..16808ab53be 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 (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 aff02a9ccae..8cda9da7f1a 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 (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 e350d8040f5..510e8daeec6 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -8648,7 +8648,7 @@ _bb_vec_info::_bb_vec_info (vec _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 (stmt)) continue; add_stmt (stmt); }