Landing: 81b7d7b82725
Project / Subsystem
gcc / aarch64
Date
2026-08-10
Author
Kyrylo Tkachov
Commit
81b7d7b827252fd93694812ccc751059b2c0d8e4
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- aarch64
- patch_id
- —
- commit_hash
- 81b7d7b827252fd93694812ccc751059b2c0d8e4
- source_type
- github
- headline
- aarch64: Use register number for SUBS predicate
- tldr
- aarch64 SUBS instruction predicate now checks register numbers directly, fixing issues with SME2 and GENERAL_REGS.
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • aarch64
- • peephole optimization
- • instruction selection
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-10T00:00:00.000Z
The predicate aarch64_general_reg, used to fuse comparison and subtraction into the SUBS instruction, has been modified. Previously, it relied on REGNO_REG_CLASS, which incorrectly reported subclasses for registers x8-x15 when SME2 support was enabled. The predicate now directly tests the register number, ensuring SUBS instructions are correctly generated even when their destination is in these registers, while still rejecting the stack pointer as intended.