https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Wilco Dijkstra <wi...@gcc.gnu.org>: https://gcc.gnu.org/g:5b531aa5cc216b5ec4d740940b43ca7a7728cc90 commit r16-3909-g5b531aa5cc216b5ec4d740940b43ca7a7728cc90 Author: Wilco Dijkstra <wilco.dijks...@arm.com> Date: Thu Sep 4 14:31:16 2025 +0000 AArch64: Add isnan expander [PR 66462] Add an expander for isnan using integer arithmetic. Since isnan is just a compare, enable it only with -fsignaling-nans to avoid generating spurious exceptions. This fixes part of PR66462. int isnan1 (float x) { return __builtin_isnan (x); } Before: fcmp s0, s0 cset w0, vs ret After: fmov w1, s0 mov w0, -16777216 cmp w0, w1, lsl 1 cset w0, cc ret gcc: PR middle-end/66462 * config/aarch64/aarch64.md (isnan<mode>2): Add new expander. gcc/testsuite: PR middle-end/66462 * gcc.target/aarch64/pr66462.c: Update test.