https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94665
--- Comment #4 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> --- (In reply to Segher Boessenkool from comment #2) > If vara is a NaN, this is not the same; it needs -ffinite-math-only. > And in fact adding that option does the trick (on powerpc that is, I > don't have an aarch64 Fortran handy). > > Could you check this please? Yes, on aarch64, fmaxnm can be generated with -ffinite-math-only and -funsafe-math-optimizations. One question: why is it OK for rtl combine to generate the fminnm here? Anything I missed?