LoongArch: Add fcopysign instructions
authorXi Ruoyao <xry111@xry111.site>
Fri, 4 Nov 2022 07:12:22 +0000 (15:12 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sun, 6 Nov 2022 07:56:52 +0000 (15:56 +0800)
commit3628025ac604cf76a3fa30ffcc5899f01d3ffee4
tree047eb5219aa588b217cbbf85d48e11e6e5fe1e1b
parent07b0096e5b6749d88f5a22f694401abd6aaca551
LoongArch: Add fcopysign instructions

Add fcopysign.{s,d} with the names copysign{sf,df}3 so GCC will expand
__builtin_copysign{f,} to a single instruction.

Link: https://sourceware.org/pipermail/libc-alpha/2022-November/143177.html
gcc/ChangeLog:

* config/loongarch/loongarch.md (UNSPEC_FCOPYSIGN): New unspec.
(type): Add fcopysign.
(copysign<mode>3): New instruction template.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/fcopysign.c: New test.
gcc/config/loongarch/loongarch.md
gcc/testsuite/gcc.target/loongarch/fcopysign.c [new file with mode: 0644]