https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105414
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>: https://gcc.gnu.org/g:b48d7ff3570fa0ebe7790275cf020d8885120338 commit r13-2914-gb48d7ff3570fa0ebe7790275cf020d8885120338 Author: Xi Ruoyao <xry...@xry111.site> Date: Sat Sep 24 20:47:22 2022 +0800 LoongArch: Use UNSPEC for fmin/fmax RTL pattern [PR105414] I made a mistake defining fmin/fmax RTL patterns in r13-2085: I used smin and smax in the definition mistakenly. This causes the optimizer to perform constant folding as if fmin/fmax was "really" smin/smax operations even with -fsignaling-nans. Then pr105414.c fails. We don't have fmin/fmax RTL codes for now (PR107013) so we can only use an UNSPEC for fmin and fmax patterns. gcc/ChangeLog: PR tree-optimization/105414 * config/loongarch/loongarch.md (UNSPEC_FMAX): New unspec. (UNSPEC_FMIN): Likewise. (fmax<mode>3): Use UNSPEC_FMAX instead of smax. (fmin<mode>3): Use UNSPEC_FMIN instead of smin.