]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/106922 - extend same-val clobber FRE
authorRichard Biener <rguenther@suse.de>
Fri, 23 Sep 2022 12:28:52 +0000 (14:28 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 23 Sep 2022 13:10:54 +0000 (15:10 +0200)
commitaf611afe5fcc908a6678b5b205fb5af7d64fbcb2
tree4afb9a869b3cc42f350119e75d04d47909d3770c
parentab0f70a63011ff06eea64960e3b8ca66575bfdaf
tree-optimization/106922 - extend same-val clobber FRE

The following extends the skipping of same valued stores to
handle an arbitrary number of them as long as they are from the
same value (which we now record).  That's an obvious extension
which allows to optimize the m_engaged member of std::optional
more reliably.

PR tree-optimization/106922
* tree-ssa-sccvn.cc (vn_reference_lookup_3): Allow
an arbitrary number of same valued skipped stores.

* g++.dg/torture/pr106922.C: New testcase.
gcc/testsuite/g++.dg/torture/pr106922.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc
This page took 0.058184 seconds and 5 git commands to generate.