summaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2018-10-11 21:06:12 +0000
committerJeff Law <law@gcc.gnu.org>2018-10-11 15:06:12 -0600
commit121ef08b0b964ff4e7072a6af14613e68788abc4 (patch)
treee967a89e2270c12ad7a8fa8d6fbf6f4a32132efd /gcc/real.h
parentea010af6b4d780261b791999e43ba056edce2af0 (diff)
re PR tree-optimization/86829 (Missing sin(atan(x)) and cos(atan(x)) optimizations)
PR tree-optimization/86829 * match.pd (sin (atan (x))): New simplification rules. (cos (atan (x))): Likewise. * real.c (build_sinatan_real): New function. * real.h (build_sinatan_real): Prototype. PR tree-optimization/86829 * gcc.dg/sinatan-1.c: New test. * gcc.dg/sinatan-2.c: New test. * gcc.dg/sinatan-3.c: New test. From-SVN: r265064
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/real.h b/gcc/real.h
index 0ce42565708..561d0fda129 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -523,4 +523,8 @@ extern void real_from_integer (REAL_VALUE_TYPE *, format_helper,
const wide_int_ref &, signop);
#endif
+/* Fills r with the largest value such that 1 + r*r won't overflow.
+ This is used in both sin (atan (x)) and cos (atan(x)) optimizations. */
+extern void build_sinatan_real (REAL_VALUE_TYPE *, tree);
+
#endif /* ! GCC_REAL_H */