re PR tree-optimization/71866 (gcc locks up after fix for PR70159)
authorRichard Biener <rguenther@suse.de>
Thu, 14 Jul 2016 12:15:38 +0000 (12:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Jul 2016 12:15:38 +0000 (12:15 +0000)
commit351168fe551a792fac3dac3359de72c1bcdc651e
treee63596b59c87415b491b0e9c85ffdeff0cdb6f3d
parent8234d02aa47d9cba294b4263e47a336e9c67f5b1
re PR tree-optimization/71866 (gcc locks up after fix for PR70159)

2016-07-14  Richard Biener  <rguenther@suse.de>

PR tree-optimization/71866
* tree-ssa-pre.c (get_constant_for_value_id): Remove.
(do_hoist_insertion): Avoid endless recursion when we
didn't insert anything because we managed to simplify
things down to a constant or SSA name.
(fully_constant_expression): Re-write in terms of ...
* tree-ssa-sccvn.h (vn_nary_simplify): ... this.  Declare.
* tree-ssa-sccvn.c (vn_nary_simplify): New wrapper around
vn_nary_build_or_lookup_1.
(vn_nary_build_or_lookup_1): Added flag and renamed from ...
(vn_nary_build_or_lookup): ... this which now wraps it.

* gcc.dg/torture/pr71866.c: New testcase.

From-SVN: r238334
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr71866.c [new file with mode: 0644]
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-sccvn.h