Landing: 455658cadf15
Project / Subsystem
gcc / aarch64
Date
2026-08-09
Author
Kyrylo Tkachov
Commit
455658cadf15cc5adb94df9852524fe0b49a3e89
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- aarch64
- patch_id
- —
- commit_hash
- 455658cadf15cc5adb94df9852524fe0b49a3e89
- source_type
- github
- headline
- aarch64: let the negated 64-bit compare take a zero in the general registers
- tldr
- Aarch64's 64-bit comparison optimization now correctly handles comparisons against zero using general-purpose registers, avoiding inefficient vector register m…
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • aarch64
- • optimization
- • performance
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-09T00:00:00.000Z
This commit improves the aarch64 backend by allowing the negated 64-bit comparison instruction (aarch64_cm<optab>di) to accept a zero operand directly in general-purpose registers. Previously, comparing against zero required moving the value through a vector register, which was less efficient. This change optimizes code like -(long) (x == 0) by using a general register comparison, reducing cross-register-file moves and improving performance.