re PR tree-optimization/49770 (wrong code with -fno-tree-forwprop)
authorRichard Guenther <rguenther@suse.de>
Thu, 21 Jul 2011 13:19:18 +0000 (13:19 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 21 Jul 2011 13:19:18 +0000 (13:19 +0000)
commit3ceaf2f571c5b02610383abb80579861cff5d22e
tree521bd5035d3ea31fdd464007a7f1904d598fe907
parenta423549540656e001cd6d0f820ff60cdbe045f7d
re PR tree-optimization/49770 (wrong code with -fno-tree-forwprop)

2011-07-21  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/49770
* tree-ssa-sccvn.c (valueize_refs_1): Return whether we
valueized any operand.  Renamed from ...
(valueize_refs): ... this.  New wrapper around valueize_refs_1.
(valueize_shared_reference_ops_from_ref): Return whether we
valueized any operand.
(vn_reference_lookup): Only when we valueized any operand
use the valueized reference for alias analysis.  Do not preserve
the original reference tree in this case.

* g++.dg/torture/pr49770.C: New testcase.

From-SVN: r176567
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr49770.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.c