Landing: 7c7c6626410c
Project / Subsystem
gcc / vectorizer
Date
2026-07-26
Author
H.J. Lu
Commit
7c7c6626410c261d188a96d9b2a15d3781d0dcfb
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- vectorizer
- patch_id
- —
- commit_hash
- 7c7c6626410c261d188a96d9b2a15d3781d0dcfb
- source_type
- github
- headline
- vectorizer: Correctly commit base alignment in costing
- tldr
- Fixes a bug in the vectorizer where base alignment was incorrectly enlarged during costing, leading to suboptimal alignment choices.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • vectorizer
- • optimization
- • alignment
- • bugfix
- • i386
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-26T00:00:00.000Z
The vectorizer had a bug where it erroneously committed an enlarged base alignment during the costing phase, stemming from a recent refactoring. This meant that alignment decisions were based on potentially larger vector types than ultimately used, leading to incorrect alignment computations. This commit corrects the logic to only commit the recorded base alignment when the transformation is actually applied, ensuring more accurate alignment for vectorized loads and stores and fixing PR middle-end/126410.