[Bug middle-end/81376] unnecessary cast before comparison
ygribov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 12 20:35:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81376
--- Comment #4 from Yury Gribov <ygribov at gcc dot gnu.org> ---
Author: ygribov
Date: Fri Oct 12 20:35:20 2018
New Revision: 265131
URL: https://gcc.gnu.org/viewcvs?rev=265131&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/c-c++-common/pr81376.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/real.c
trunk/gcc/real.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/387-ficom-1.c
trunk/gcc/testsuite/gcc.target/i386/387-ficom-2.c
More information about the Gcc-bugs
mailing list