]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH][lto/66752] Fix missed FSM jump thread
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Aug 2015 16:23:12 +0000 (16:23 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Aug 2015 16:23:12 +0000 (16:23 +0000)
commit7729459fa88493719171d37651cdb090454ac1ce
treebbd17aebd5d2754461d0c78d62a94cd88fb1a65b
parentccf193a4a041663b0c35a14604adae1ba5a75624
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227307 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr66752-2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr66752-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c [new file with mode: 0644]
gcc/tree-ssa-threadedge.c
gcc/tree-ssa-threadupdate.c