Landing: 9f8409f2e2c2
Project / Subsystem
gcc / vect
Date
2026-06-03
Author
Zhongyao Chen
Commit
9f8409f2e2c28f64bf6a584bc81afcae0f084785
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- vect
- patch_id
- —
- commit_hash
- 9f8409f2e2c28f64bf6a584bc81afcae0f084785
- source_type
- github
- headline
- SLP vectorizer improves error recovery by prioritizing operand swaps.
- tldr
- The SLP vectorizer in GCC now prioritizes attempting operand swaps during child discovery to prevent premature scalar fallback and improve vectorization succes…
- author
- Zhongyao Chen
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • vectorization
- • slp
- • performance
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-03T00:00:00.000Z
GCC’s SLP vectorizer now includes an improved strategy for handling failed child operand discovery. Previously, failures could lead to an immediate fallback to scalar operations, even if swapping operands might have resolved the issue. The compiler now tracks the distance to potential swap opportunities, ensuring that a retry with swapped operands is attempted before resorting to less efficient scalar code generation. This change enhances the vectorizer’s ability to optimize commutative operations within basic blocks, potentially leading to more vectorized code.