gimple-match-head.c (do_valueize): Return OP if valueize returns NULL_TREE.
authorRichard Biener <rguenther@suse.de>
Wed, 26 Jul 2017 11:35:45 +0000 (11:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 26 Jul 2017 11:35:45 +0000 (11:35 +0000)
commit4f450a2b1022124194097e39b3b1caca1d5dc2bc
tree952eff26eae11dd5471be7d46169494d5b16a908
parente17114487df7f90d8e015efad697a3cc93845b90
gimple-match-head.c (do_valueize): Return OP if valueize returns NULL_TREE.

2017-07-26  Richard Biener  <rguenther@suse.de>

* gimple-match-head.c (do_valueize): Return OP if valueize
returns NULL_TREE.
(get_def): New helper to get at the def stmt of a SSA name
if valueize allows.
* genmatch.c (dt_node::gen_kids_1): Use get_def instead of
do_valueize to get at the def stmt.
(dt_operand::gen_gimple_expr): Simplify do_valueize calls.

* gcc/testsuite/gcc.dg/pr70920-2.c: Adjust for transform already
happening in ccp1.
* gcc/testsuite/gcc.dg/pr70920-4.c: Likewise.

From-SVN: r250565
gcc/ChangeLog
gcc/genmatch.c
gcc/gimple-match-head.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr70920-2.c
gcc/testsuite/gcc.dg/pr70920-4.c