Landing: c392d64098cc

Project / Subsystem

gcc / tree-optimization

Date

2026-04-29

Author

Richard Biener

Commit

c392d64098cc675c804ff4f516548d023a4fe29a

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
tree-optimization
patch_id
commit_hash
c392d64098cc675c804ff4f516548d023a4fe29a
source_type
github
headline
SLP: Keep scalar statements for instance roots in externs
tldr
Fixes SLP vectorization to prevent errors when instance roots are mentioned in externs of other instances.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • vectorization
  • slp
discussion_id_link
bugzilla_pr
date
2026-04-29T00:00:00.000Z

This commit fixes a bug in the SLP (superword level parallelism) vectorization pass that caused incorrect code generation when instance roots were referenced in externs of other instances. The fix ensures that instance root statements are kept scalar if they appear in externs, preventing the vectorization that would lead to errors. A new test case is added to verify the fix.