diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-11-08 12:14:35 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-11-12 15:01:13 +0800 |
commit | d26c757b2ec22d2d752af94908ce54a1266cca01 (patch) | |
tree | 975a8a0119a80e4550f7b35573e59b7aa0da5926 /gcc/range-op-float.cc | |
parent | 51a233b97cc9c51e63f03f2f5554e905f3f6c054 (diff) | |
download | gcc-d26c757b2ec22d2d752af94908ce54a1266cca01.zip gcc-d26c757b2ec22d2d752af94908ce54a1266cca01.tar.gz gcc-d26c757b2ec22d2d752af94908ce54a1266cca01.tar.bz2 |
LoongArch: Add fscaleb.{s,d} instructions as ldexp{sf,df}3
This allows optimizing __builtin_ldexp{,f} and __builtin_scalbn{,f} with
-fno-math-errno.
IMODE is added because we can't hard code SI for operand 2: fscaleb.d
instruction always take the high half of both source registers into
account. See my_ldexp_long in the test case.
gcc/ChangeLog:
* config/loongarch/loongarch.md (UNSPEC_FSCALEB): New unspec.
(type): Add fscaleb.
(IMODE): New mode attr.
(ldexp<mode>3): New instruction template.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/fscaleb.c: New test.
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions