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

Record (de-)composition type in ls_type for VMAT_STRIDED_SLP accesses.

This commit records vector decomposition information for strided SLP accesses, which will help in target-specific cost modeling.

This commit enhances vectorization by recording the vector (de-)composition type for VMAT_STRIDED_SLP (vectorizable memory access type, strided, Super-word Level Parallelism) loads and stores. This information is stored in the ls_type field of the load/store data, making it available during target costing. This allows the compiler to make more informed decisions about the cost and effectiveness of vectorization for specific target architectures.

In Details

This change modifies tree-vect-stmts.cc to record the decomposition type for VMAT_STRIDED_SLP accesses in the ls_type field. This information can then be used during target costing, which helps estimate the performance impact of vectorization on different architectures. The surrounding code deals with SLP vectorization, a technique for combining scalar operations into vector ones.

For Context

Vectorization is a compiler optimization that allows multiple operations to be performed simultaneously using vector instructions. When accessing memory in a vectorized loop, the compiler needs to understand how the data is arranged in memory (the "decomposition type"). This commit improves the compiler's ability to analyze strided memory accesses in vectorized code, allowing it to better estimate the performance impact of vectorization on different processors. This leads to more efficient code generation.

Filed Under: vectorizationoptimizationslp