tree-optimization/98464 - replace loop info with avail at uses
authorRichard Biener <rguenther@suse.de>
Mon, 4 Jan 2021 12:02:24 +0000 (13:02 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 4 Jan 2021 12:51:56 +0000 (13:51 +0100)
commit39bd65faee3bafe2dc067e5fedb5079896551a8a
tree9da1da01aeca091cfad6664b0490ed8c03da488c
parent7f2b73175666f678adbf007907c7aa2661284bd3
tree-optimization/98464 - replace loop info with avail at uses

This does VN replacement in loop nb_iterations consistent with
the rest of the IL by using availability at the definition site
of uses.

2021-01-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98464
* tree-ssa-sccvn.c (vn_valueize_for_srt): Rename from ...
(vn_valueize_wrapper): ... this.  Temporarily adjust vn_context_bb.
(process_bb): Adjust.

* g++.dg/opt/pr98464.C: New testcase.
gcc/testsuite/g++.dg/opt/pr98464.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.c