diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-10-02 18:51:00 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-10-04 17:35:37 +0800 |
commit | 64eb7b0c47c9bb34991f3d3fd0bbe0882a1f6da5 (patch) | |
tree | 8bb3d0b9b4f7bcd5921a67c8fab9492827fdfd57 /gcc | |
parent | 64eeec25f11e31bed844ef0a95ef0f9661c3ab37 (diff) | |
download | gcc-64eb7b0c47c9bb34991f3d3fd0bbe0882a1f6da5.zip gcc-64eb7b0c47c9bb34991f3d3fd0bbe0882a1f6da5.tar.gz gcc-64eb7b0c47c9bb34991f3d3fd0bbe0882a1f6da5.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/loongarch/loongarch.md | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 4fcb6d7..3286b0c 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -37,7 +37,6 @@ UNSPEC_FCLASS UNSPEC_FMAX UNSPEC_FMIN - UNSPEC_FCOPYSIGN UNSPEC_FTINT UNSPEC_FTINTRM UNSPEC_FTINTRP @@ -1129,9 +1128,8 @@ (define_insn "copysign<mode>3" [(set (match_operand:ANYF 0 "register_operand" "=f") - (unspec:ANYF [(match_operand:ANYF 1 "register_operand" "f") - (match_operand:ANYF 2 "register_operand" "f")] - UNSPEC_FCOPYSIGN))] + (copysign:ANYF (match_operand:ANYF 1 "register_operand" "f") + (match_operand:ANYF 2 "register_operand" "f")))] "TARGET_HARD_FLOAT" "fcopysign.<fmt>\t%0,%1,%2" [(set_attr "type" "fcopysign") |