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

tree-optimization: Refine PR127811 fix for extern vector defs

Improves handling of external vector definitions in SLP vectorization.

This commit refines the fix for PR127811 by moving the handling of extern vector definitions within internal permute nodes to a more appropriate location in the SLP (Short for ‘Superword-Level Parallelism’) vectorization process. It also addresses a failing statement-based dominance check identified in PR128347, ensuring more robust vectorization.

In Details

The vect_schedule_slp_node function in tree-vect-slp.cc is modified to relocate the fixup logic for extern vector definitions. This change aims to integrate it more correctly within the SLP vectorization pass, particularly concerning internal permute nodes. Additionally, this commit ensures that a statement-based dominance check, which failed in the test case for PR128347, is now correctly handled, preventing incorrect vectorization decisions.

For Context
SLP vectorization
Superword-Level Parallelism vectorization, a compiler optimization that identifies opportunities to perform the same operation on multiple data items simultaneously using SIMD instructions.
dominance check
In compiler theory, a check to determine if one part of the code always executes before another part.
permute node
An internal representation in the compiler's intermediate language that signifies a data reordering or permutation operation, often used in vectorization.
extern vector def
A definition related to external vector types or variables within the compiler's internal representation.
Filed Under: tree-optimizationvectorizationSLPGCC