Landing: 9056e455be6a

Project / Subsystem

gcc / avr

Date

2026-08-15

Author

Georg-Johann Lay

Commit

9056e455be6aae7936899ae03cf5b07beff0162b

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
avr
patch_id
—
commit_hash
9056e455be6aae7936899ae03cf5b07beff0162b
source_type
github
headline
AVR: Optimize register comparisons with constants divisible by 256
tldr
Reduces AVR compare instruction count when comparing registers to constants.
author
Georg-Johann Lay
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • avr
  • • optimization
  • • code size
discussion_id_link
—
bugzilla_pr
—
date
2026-08-15T00:00:00.000Z

This patch optimizes comparisons of AVR registers against constants. When the constant is a multiple of 256, the compiler now uses a more efficient instruction sequence for equality (EQ) and inequality (NE) checks. This change reduces the generated code size by one instruction in such cases, improving performance and code density for specific AVR targets.