aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc/arc-c.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-11-20 03:51:56 +0800
committerXi Ruoyao <xry111@xry111.site>2023-11-29 15:07:09 +0800
commit3f9eb37fb765c23ff3af8185570c56cfb6c037f3 (patch)
tree3fc14fb332623fbb78d939db7e0c4e0733a7029d /gcc/config/arc/arc-c.cc
parent3c81a587ad828b60b5b9ed712f728a11cd29d6d3 (diff)
downloadgcc-3f9eb37fb765c23ff3af8185570c56cfb6c037f3.zip
gcc-3f9eb37fb765c23ff3af8185570c56cfb6c037f3.tar.gz
gcc-3f9eb37fb765c23ff3af8185570c56cfb6c037f3.tar.bz2
LoongArch: Use LSX for scalar FP rounding with explicit rounding mode
In LoongArch FP base ISA there is only the frint.{s/d} instruction which reads the global rounding mode. Utilize LSX for explicit rounding mode even if the operand is scalar. It seems wasting the CPU power, but still much faster than calling the library function. gcc/ChangeLog: * config/loongarch/simd.md (LSX_SCALAR_FRINT): New int iterator. (VLSX_FOR_FMODE): New mode attribute. (<simd_for_scalar_frint_pattern><mode>2): New expander, expanding to vreplvei.{w/d} + frint{rp/rz/rm/rne}.{s.d}. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vect-frint-scalar.c: New test. * gcc.target/loongarch/vect-frint-scalar-no-inexact.c: New test.
Diffstat (limited to 'gcc/config/arc/arc-c.cc')
0 files changed, 0 insertions, 0 deletions