summaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authorYury Gribov <tetra2005@gmail.com>2018-10-12 20:35:20 +0000
committerYury Gribov <ygribov@gcc.gnu.org>2018-10-12 20:35:20 +0000
commite41ec71bd97a1a8eaef40695c7ae9b7f4b1fc819 (patch)
treed9f2071404e3120d9043af8e3800ed5d14c14b8c /gcc/real.h
parent67aeaded2f8dabe16b4879261c6b6ddda6b53cd2 (diff)
Add pattern to remove useless float casts in comparisons.
PR middle-end/81376 gcc/ * real.c (format_helper::can_represent_integral_type_p): New function * real.h (format_helper::can_represent_integral_type_p): Ditto. * match.pd: New pattern. gcc/testsuite/ * c-c++-common/pr81376.c: New test. * gcc.target/i386/387-ficom-2.c: Update test. * gcc.target/i386/387-ficom-2.c: Ditto. From-SVN: r265131
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/real.h b/gcc/real.h
index 561d0fda129..cd557b31c23 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -216,6 +216,7 @@ public:
operator const real_format *() const { return m_format; }
bool decimal_p () const { return m_format && m_format->b == 10; }
+ bool can_represent_integral_type_p (tree type) const;
private:
const real_format *m_format;