]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Replace UNSPEC_FCOPYSIGN with copysign RTL
authorXi Ruoyao <xry111@xry111.site>
Mon, 2 Oct 2023 10:51:00 +0000 (18:51 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 4 Oct 2023 09:35:37 +0000 (17:35 +0800)
commit64eb7b0c47c9bb34991f3d3fd0bbe0882a1f6da5
tree8bb3d0b9b4f7bcd5921a67c8fab9492827fdfd57
parent64eeec25f11e31bed844ef0a95ef0f9661c3ab37
LoongArch: Replace UNSPEC_FCOPYSIGN with copysign RTL

When I added copysign support for LoongArch (r13-3702), we did not have
a copysign RTL insn, so I had to use UNSPEC to represent the copysign
instruction. Now the copysign RTX code has been added in r14-1586, so
this patch removes those UNSPECs, and it uses the native RTL copysign
insn.

Inspired by rs6000 patch "Cleanup: Replace UNSPEC_COPYSIGN with copysign
RTL" [1] from Michael Meissner.

[1]: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631701.html

gcc/ChangeLog:

* config/loongarch/loongarch.md (UNSPEC_FCOPYSIGN): Delete.
(copysign<mode>3): Use copysign RTL instead of UNSPEC.
gcc/config/loongarch/loongarch.md