re PR tree-optimization/64084 (match-and-simplify prefers complex matches)
authorRichard Biener <rguenther@suse.de>
Fri, 28 Nov 2014 08:57:43 +0000 (08:57 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 28 Nov 2014 08:57:43 +0000 (08:57 +0000)
commit7e015fcefe33eded9a565e7e2ad3da11952249ae
tree356b7102afa2ca34e687601a0c8e4114bd1500da
parentabd5932ea9a0b502fa69e7a7d90d445331e2a4f5
re PR tree-optimization/64084 (match-and-simplify prefers complex matches)

2014-11-28  Richard Biener  <rguenther@suse.de>

PR middle-end/64084
* genmatch.c (dt_node::gen_kids_1): New function, split out
from dt_node::gen_kids.
(decision_tree::cmp_node): DT_TRUE are generally not equal.
(decision_tree::find_node): Treat DT_TRUE as barrier for
node CSE on the same level.
(dt_node::append_node): Do not keep DT_TRUE last.
(dt_node::gen_kids): Emit code after each DT_TRUE node seen.

* gcc.dg/tree-ssa/ssa-ccp-34.c: New testcase.
* gcc.dg/tree-ssa/forwprop-31.c: Likewise.

From-SVN: r218141
gcc/ChangeLog
gcc/genmatch.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/forwprop-31.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-34.c [new file with mode: 0644]