[PATCH] Allow FSM threader to thread more complex conditions
authorJeff Law <law@redhat.com>
Mon, 12 Oct 2015 21:39:35 +0000 (15:39 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 12 Oct 2015 21:39:35 +0000 (15:39 -0600)
commit3d466672b1290916bfc75f191787bc7459479ca3
tree175480cddd480785cb6eb725aa212724d5416228
parent058a654b30b40d19db1306daa38df363b9bf8a56
[PATCH] Allow FSM threader to thread more complex conditions

* tree-ssa-threadbackward.c (get_gimple_control_stmt): New function.
(fsm_find_control_stmt_paths): Change name of first argument to
more accurately relfect what it really is.  Handle simplification
of GIMPLE_COND after finding a thread path for NAME.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Allow
nontrivial conditions to be handled by FSM threader.
(thread_through_normal_block): Extract the name to looup via
FSM threader from COND_EXPR.

* gcc.dg/tree-ssa/ssa-thread-12.c: New test.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Update expected output.
* gcc.dg/tree-ssa/ssa-thread-11.c: Renamed from
ssa-dom-thread-11.c.

From-SVN: r228739
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c [deleted file]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-12.c [new file with mode: 0644]
gcc/tree-ssa-threadbackward.c
gcc/tree-ssa-threadedge.c