]> gcc.gnu.org Git - gcc.git/commit
LoongArch: Use UNSPEC for fmin/fmax RTL pattern [PR105414]
authorXi Ruoyao <xry111@xry111.site>
Sat, 24 Sep 2022 12:47:22 +0000 (20:47 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 28 Sep 2022 09:55:01 +0000 (17:55 +0800)
commitb48d7ff3570fa0ebe7790275cf020d8885120338
tree373e4a0e2d5e8b22fb5c5f7a4f33eb8304ad61b4
parent9a8212db2dd8373f5649ccd21028edd14303eb82
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.
gcc/config/loongarch/loongarch.md
This page took 0.063227 seconds and 6 git commands to generate.