Landing: d528b3e5314f

Project / Subsystem

gcc / gcc/tree-optimization

Date

2026-07-23

Author

Richard Biener

Commit

d528b3e5314fde594080406c95ac39c77881c770

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-optimization
patch_id
—
commit_hash
d528b3e5314fde594080406c95ac39c77881c770
source_type
github
headline
Enhance SLP tree construction for better BB vectorization
tldr
Improved SLP tree construction allows for multiple isomorphic groups and distinguishes fatal failures from unvectorizable statements.
author
Richard Biener
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • vectorization
  • • optimization
  • • SLP
discussion_id_link
—
bugzilla_pr
—
date
2026-07-23T00:00:00.000Z

This commit refactors vect_build_slp_tree_1 in GCC’s SLP (Superword-Level Parallelism) vectorizer to compute multiple sets of matching instructions. It changes the matches[] representation to distinguish between unvectorizable statements and fatal failures, and to retain knowledge about isomorphic tails even when BB unrolling fails. This allows for more robust BB vectorization by enabling operand swapping to isolate unvectorizable code.