[Bug tree-optimization/88775] [8/9 Regression] Optimize std::string assignment

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 15 08:11:00 GMT 2019


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

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jan 15 08:11:00 2019
New Revision: 267931

URL: https://gcc.gnu.org/viewcvs?rev=267931&root=gcc&view=rev
Log:
        PR tree-optimization/88775
        * match.pd (cmp (convert1?@2 addr@0) (convert2? addr@1)): Optimize
        equal == 0 equality pointer comparisons some more if compared in
        integral types and either one points to an automatic var and the
        other to a global, or we can prove at least one points to the middle
        or both point to start or both point to end.

        * gcc.dg/tree-ssa/pr88775-1.c: New test.
        * gcc.dg/tree-ssa/pr88775-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr88775-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr88775-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/match.pd
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list