https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126726
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrea Pinski <[email protected]>: https://gcc.gnu.org/g:d17572cbff92720d4f38c5b908ada4fdb42c8b1e commit r17-5562-gd17572cbff92720d4f38c5b908ada4fdb42c8b1e Author: Kevin Stefanov <[email protected]> Date: Tue Sep 29 16:14:57 2026 +0300 RTL: Optimize smax(a, -a) for integer operands to abs(a). This change detects smax(a, -a) and smax(-a, a) at the RTL level for integer operands and optimizes that to abs(a). PR rtl-optimization/126726 gcc/ChangeLog: * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): Detect smax(a, -a) for integers and optimize it to abs(a). Signed-off-by: Kevin Stefanov <[email protected]>
