Landing: 83a74295038a
Project / Subsystem
gcc / avr
Date
2026-05-21
Author
Georg-Johann Lay
Commit
83a74295038a8319dc547f8ca3f9ca26a0b85187
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- avr
- patch_id
- —
- commit_hash
- 83a74295038a8319dc547f8ca3f9ca26a0b85187
- source_type
- github
- headline
- AVR: Overhaul CLZ, CTZ and FFS instructions with hard-reg constraints.
- tldr
- Improves CLZ, CTZ, and FFS instruction handling for AVR by using hard-reg constraints and code iterators.
- author
- Georg-Johann Lay
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • avr
- • code generation
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-21T00:00:00.000Z
This patch overhauls the CLZ, CTZ, and FFS instructions for the AVR architecture. It replaces explicit hard registers with hard-reg constraints to model the register footprint of their libgcc asm implementations. Additionally, the patch introduces code iterators to factor out commonalities, simplifying the code and making it more maintainable. These changes improve the code generation process for these instructions without relying on instruction combining.