Landing: a8db0601be31
Project / Subsystem
gcc / gcc
Date
2026-09-21
Author
Eric Botcazou
Commit
a8db0601be315849a70358333013ef7dffa7a800
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- a8db0601be315849a70358333013ef7dffa7a800
- source_type
- github
- headline
- Fix incorrect optimization of non-byte-aligned array components
- tldr
- Loop distribution optimization now correctly handles non-byte-aligned array components, preventing incorrect memcpy generation.
- author
- Eric Botcazou
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc
- • optimization
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-21T00:00:00.000Z
The -ftree-loop-distribute-patterns optimization pass could incorrectly generate memcpy calls for non-byte-aligned array components. This happened because the pass would consider partitions containing such data references as addressable, leading to erroneous loop distribution. This commit modifies the loop_distribution::classify_partition function to disqualify partitions containing non-addressable data references, ensuring correct optimization.