[Bug middle-end/35691] Missed (a == 0) && (b == 0) into (a|(typeof(a)(b)) == 0 when the types don't match

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 22 18:56:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35691

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Sep 22 18:56:23 2017
New Revision: 253107

URL: https://gcc.gnu.org/viewcvs?rev=253107&root=gcc&view=rev
Log:
        PR middle-end/35691
        * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
        and x != -1 | y != -1 into (x & y) != -1.

        * gcc.dg/pr35691-1.c: Use -fdump-tree-forwprop1-details
        instead of -fdump-tree-forwprop-details in dg-options.
        * gcc.dg/pr35691-2.c: Likewise.
        * gcc.dg/pr35691-3.c: New test.
        * gcc.dg/pr35691-4.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr35691-3.c
    trunk/gcc/testsuite/gcc.dg/pr35691-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr35691-1.c
    trunk/gcc/testsuite/gcc.dg/pr35691-2.c


More information about the Gcc-bugs mailing list