On Mon, Oct 5, 2026 at 5:07 PM Roger Sayle <[email protected]> wrote: > > > This patch addresses PR rtl-optimization/126521 where ifcvt transforms > x < 0 ? -x : x (and x < 0 ? x : -x) into ABS (and NABS respectively). > Unfortunately, these transformations are unsafe in the presence of NaNs. > The simple fix is a one-line change to noce_try_abs. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check, both with and without --target_board=unix{-m32} > with no new failures. Ok for mainline?
OK. > > 2026-10-05 Roger Sayle <[email protected]> > > gcc/ChangeLog > PR rtl-optimization/126521 > * ifcvt.c (noce_try_abs): These conversions are unsafe in the > presence of NaNs. > > gcc/testsuite/ChangeLog > PR rtl-optimization/126521 > * gcc.target/i386/pr126521.c: New test case. > > > Thanks in advance, > Roger > -- >
