https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127760
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org
--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Thanks Gabriel. I can confirm the first test (u_sat) regresses with:
commit 28f6899c51c456302943d549ab78d9bb022f36d8
Author: Kyrylo Tkachov <[email protected]>
Date: Sat Sep 5 12:55:03 2026 +0200
match-sat-alu.pd: Recognize complement tests for unsigned saturating
addition
For an unsigned type, MAX - Y is ~Y. An overflow test can therefore use
X > ~Y ? MAX : X + Y
Recognize strict and non-strict comparisons with either operand or result
arm order. Equality is safe because both arms produce MAX. Also recognize
ADD_OVERFLOW forms that select a separate X + Y expression.
[ .. ]
I'm going to narrow this PR to just cover that u_sat problem since the others
appear regressions due to different commits. I'll also bring Kyrylo into the
discussion since it's his patch that's causing this first issue.