aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-07-04 02:49:28 +0800
committerXi Ruoyao <xry111@xry111.site>2024-08-15 19:38:44 +0800
commitee4a6343225b6e44b3d2b2c90c355c21f7ec6855 (patch)
tree46fc1d502a2736b77c47841965b70250afd508df /gcc/fortran/frontend-passes.cc
parentf7e672da8fc3d416a6d07eb01f3be4400ef94fac (diff)
downloadgcc-ee4a6343225b6e44b3d2b2c90c355c21f7ec6855.zip
gcc-ee4a6343225b6e44b3d2b2c90c355c21f7ec6855.tar.gz
gcc-ee4a6343225b6e44b3d2b2c90c355c21f7ec6855.tar.bz2
LoongArch: Implement scalar isinf, isnormal, and isfinite via fclass
Doing so can avoid loading FP constants from the memory. It also partially fixes PR 66262 as fclass does not signal on sNaN. gcc/ChangeLog: * config/loongarch/loongarch.md (extendsidi2): Add ("=r", "f") alternative and use movfr2gr.s for it. The spec clearly states movfr2gr.s sign extends the value to GRLEN. (fclass_<fmt>): Make the result SImode instead of a floating mode. The fclass results are really not FP values. (FCLASS_MASK): New define_int_iterator. (fclass_optab): New define_int_attr. (<FCLASS_MASK:fclass_optab><ANYF:mode>): New define_expand template. gcc/testsuite/ChangeLog: * gcc.target/loongarch/fclass-compile.c: New test. * gcc.target/loongarch/fclass-run.c: New test.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
0 files changed, 0 insertions, 0 deletions