Add pattern to remove useless float casts in comparisons.
authorYury Gribov <tetra2005@gmail.com>
Fri, 12 Oct 2018 20:35:20 +0000 (20:35 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Fri, 12 Oct 2018 20:35:20 +0000 (20:35 +0000)
commite41ec71bd97a1a8eaef40695c7ae9b7f4b1fc819
treed9f2071404e3120d9043af8e3800ed5d14c14b8c
parent67aeaded2f8dabe16b4879261c6b6ddda6b53cd2
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
gcc/ChangeLog
gcc/match.pd
gcc/real.c
gcc/real.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr81376.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/387-ficom-1.c
gcc/testsuite/gcc.target/i386/387-ficom-2.c