Landing: e2f3007f4d58

Project / Subsystem

gcc / combine

Date

2026-08-15

Author

Kyrylo Tkachov

Commit

e2f3007f4d58dbf09b18f360895c5ca48f8503bb

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
combine
patch_id
—
commit_hash
e2f3007f4d58dbf09b18f360895c5ca48f8503bb
source_type
github
headline
aarch64: Treat PREFETCH addresses like MEM addresses
tldr
Improves aarch64 code generation by ensuring PREFETCH instructions are handled similarly to memory accesses.
author
Kyrylo Tkachov
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • aarch64
  • • optimization
  • • prefetch
  • • code generation
discussion_id_link
—
bugzilla_pr
—
date
2026-08-15T00:00:00.000Z

This commit enhances the combine pass on aarch64 to treat PREFETCH instruction addresses with the same simplification logic as MEM addresses. Previously, address computations rewritten by combine for MEM accesses were not applied to PREFETCH, causing issues with 32-bit indices. This fix ensures that address calculations, such as zero-extends on 32-bit values, are correctly preserved for PREFETCH, leading to more efficient code generation and saving dynamic instructions, particularly for functions like __builtin_prefetch.