GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
tree-optimization

Vector placement improved for live lane extracts

Vectorizer pre-computes insertion points for SLP nodes, improving feasibility checks for live scalar lane extractions.

This commit improves the vectorizer’s ability to determine the feasibility of placing lane extractions for live scalar values. It achieves this by pre-computing an insertion place for all SLP nodes, which is then used to refine the feasibility computation. While re-using this computation for actual insertion is currently problematic due to potential scalar statement elision, this pre-computation validates earlier scheduling decisions and enhances the accuracy of live lane extract placement.

In Details

This commit refactors tree-vect-slp.cc to improve the calculation of live lane extraction feasibility. It introduces pre-scheduling of SLP nodes to determine a more accurate insertion point, which is then used in vect_bb_slp_mark_live_stmts to refine the vector statement placement constraint. This addresses conservative assumptions made previously. The challenges with re-using this pre-schedule for actual insertion, such as iterator invalidation due to statement elision, are noted. The new _slp_tree::si member stores the pre-computed insertion point.

For Context
SLP
Superword Level Parallelism, a compiler optimization technique that finds instructions operating on scalars that can be vectorized to operate on multiple data elements simultaneously.
lane extraction
The process of extracting a single data element from a vector register.
vector statement placement
Determining the optimal location within the code to insert vectorized instructions.
GIMPLE
GNU Intermediate Representation, a three-address code form used by GCC after initial parsing and before final machine code generation.
Filed Under: vectorizationoptimizationSLP