https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93709
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jiu Fu Guo <guoji...@gcc.gnu.org>: https://gcc.gnu.org/g:d01cb80e0fbe23510a861faab9909b76837faf98 commit r9-8401-gd01cb80e0fbe23510a861faab9909b76837faf98 Author: Jiufu Guo <guoji...@linux.ibm.com> Date: Tue Mar 10 13:51:57 2020 +0800 rs6000: Check -+0 and NaN for smax/smin generation PR93709 mentioned regressions on maxlocval_4.f90 and minlocval_f.f90 which relates to max of '-inf' and 'nan'. This regression occur on P9 because P9 new instruction 'xsmaxcdp' is generated. And for C code `a < b ? b : a` is also generated as `xsmaxcdp` under -O2 for P9. While this instruction behavior more like C/C++ semantic (a>b?a:b). In GCC9, the issue also occur as the new test case shows. This generates prevents 'xsmaxcdp' to be generated for those cases. 'xsmincdp' also is handled in patch. gcc/ 2020-03-19 Jiufu Guo <guoji...@linux.ibm.com> PR target/93709 * gcc/config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): Check NAN and SIGNED_ZEROR for smax/smin. gcc/testsuite 2020-03-19 Jiufu Guo <guoji...@linux.ibm.com> PR target/93709 * gcc.target/powerpc/p9-minmax-3.c: New test.