Landing: 9394c71d3698

Project / Subsystem

gcc / rtl-optimization

Date

2026-08-25

Author

Kyrylo Tkachov

Commit

9394c71d36980a0abf1502be26608d6055893ed6

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
rtl-optimization
patch_id
—
commit_hash
9394c71d36980a0abf1502be26608d6055893ed6
source_type
github
headline
lra: Canonicalize whole-address reloads
tldr
Ensures correct instruction selection for addresses involving multiplications in the AArch64 reloader.
author
Kyrylo Tkachov
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • rtl-optimization
  • • aarch64
  • • lra
discussion_id_link
—
bugzilla_pr
—
date
2026-08-25T00:00:00.000Z

GCC’s instruction reloader (LRA) on AArch64 had issues recognizing addresses that involved a multiplication by a power of two, especially when this multiplication was part of a larger address calculation. The reloader would incorrectly generate a SET instruction for this part of the address, which didn’t match any available instruction, causing LRA to fail. This commit introduces a call to canonicalize_reload_addr to convert such multiplications into a canonical left-shift form (AShIFT), which LRA can then correctly recognize and emit the appropriate instruction. This fixes PR127056.