diff options
author | ssaraswati <ssaraswati@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-20 09:20:57 +0000 |
---|---|---|
committer | ssaraswati <ssaraswati@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-20 09:20:57 +0000 |
commit | d24078c0f3fdbef71bb5ab58f094462a6dd61b1b (patch) | |
tree | 5baf4f1c4924072980834f8000966921cbe042f5 /gcc/match.pd | |
parent | b9333137494f7d00bba18c9c2a53769f3a790c70 (diff) | |
download | gcc-d24078c0f3fdbef71bb5ab58f094462a6dd61b1b.tar.gz |
This series of patches fix PR61441. This patch removes flag_errno_math check
for RINT, treating it similar to nearbyint.
Bootstrapped & regression-tested on x86_64-linux-gnu.
gcc/
* match.pd (f(x) -> x): Removed flag_errno_math check for RINT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/match.pd')
-rw-r--r-- | gcc/match.pd | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 5ac30eb078f..1674a146790 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2566,16 +2566,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (fns (fns @0)) (fns @0))) /* f(x) -> x if x is integer valued and f does nothing for such values. */ -(for fns (TRUNC FLOOR CEIL ROUND NEARBYINT) +(for fns (TRUNC FLOOR CEIL ROUND NEARBYINT RINT) (simplify (fns integer_valued_real_p@0) @0)) -/* Same for rint. We have to check flag_errno_math because - integer_valued_real_p accepts +Inf, -Inf and NaNs as integers. */ -(if (!flag_errno_math) - (simplify - (RINT integer_valued_real_p@0) - @0)) /* hypot(x,0) and hypot(0,x) -> abs(x). */ (simplify |