Landing: 76466425366d
Project / Subsystem
gcc / match-sat-alu.pd
Date
2026-07-30
Author
Kyrylo Tkachov
Commit
76466425366d0f30effcdc1cfe729be28db4b88e
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match-sat-alu.pd
- patch_id
- —
- commit_hash
- 76466425366d0f30effcdc1cfe729be28db4b88e
- source_type
- github
- headline
- AArch64 recognizes unsigned saturating addition pattern.
- tldr
- Optimizes unsigned saturating addition on AArch64, reducing instruction count.
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • aarch64
- • saturating arithmetic
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-30T00:00:00.000Z
This commit enables GCC to recognize a specific pattern for unsigned saturating addition on AArch64: X + MIN(~X, Y). This pattern is mathematically equivalent to X + Y with saturation. The optimization transforms a sequence of four instructions into two, improving code density and performance. A test case ensures the pattern is correctly applied only when the MIN operation has a single use.