Landing: d7f4fc514a7f

Project / Subsystem

gcc / match-sat-alu.pd

Date

2026-07-30

Author

Kyrylo Tkachov

Commit

d7f4fc514a7f5d951e9738fb3c23a14cf49bfd8d

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
match-sat-alu.pd
patch_id
—
commit_hash
d7f4fc514a7f5d951e9738fb3c23a14cf49bfd8d
source_type
github
headline
AArch64 recognizes unsigned saturating subtraction.
tldr
Optimizes unsigned saturating subtraction 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
  • • vector
discussion_id_link
—
bugzilla_pr
—
date
2026-07-30T00:00:00.000Z

GCC can now recognize patterns for unsigned saturating subtraction on AArch64, such as R = X - Y; R > X ? 0 : R. This optimization replaces sequences of three instructions with a single uqsub (unsigned saturating subtract) instruction. The change also removes several expected-failure test cases for these patterns.