GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/tree-vect Performance Win

Simplify Scalar Statement Coverage in vect_bb_slp_mark_live_stmts

The compiler now uses full scalar statement coverage to determine live lanes during vectorization more precisely.

This change simplifies the process of marking live statements in basic blocks during SLP vectorization. By utilizing the full scalar statement coverage denoted by SLP_TREE_TYPE, the compiler can more accurately identify which lanes are live for code generation, leading to potential performance improvements.

In Details

This commit simplifies vect_bb_slp_mark_live_stmts by using SLP_TREE_TYPE to determine STMT_VINFO_LIVE_P, which is used for code generation of live lanes. This change removes the vec_slp_has_scalar_use function. The goal is to improve the precision of live lane detection during SLP vectorization.

For Context

SLP vectorization is a compiler optimization that transforms scalar code into vector instructions for increased performance. This optimization identifies sequences of independent scalar operations that can be executed in parallel using vector registers. Determining which scalar statements are still "live" (i.e., their results are needed later) after vectorization is crucial for generating efficient code, this commit improves the precision of determining the liveness of lanes during the vectorization for better code generation.

Filed Under: optimizationvectorizationSLP