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

--- Comment #18 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Aug 28 16:23:12 2015
New Revision: 227307

URL: https://gcc.gnu.org/viewcvs?rev=227307&root=gcc&view=rev
Log:
[PATCH][lto/66752] Fix missed FSM jump thread

        PR lto/66752
        * tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are
        unable to find X NE 0 in the tables, return X as the simplified
        condition.
        (fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are
        in VISISTED_BBS, then return failure.  Else add nodes from NEXT_PATH
        to VISISTED_BBS.
        * tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags
        after removing the control flow statement and unnecessary edges.

        PR lto/66752
        * gcc.dg/tree-ssa/pr66752-2.c: New test.
        * gcc.dg/torture/pr66752-1.c: New test
        * g++.dg/torture/pr66752-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr66752-2.C
    trunk/gcc/testsuite/gcc.dg/torture/pr66752-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadupdate.c

Reply via email to