]> 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>
Mon, 17 Oct 2022 12:27:18 +0000 (14:27 +0200)
commitb9f58edfc2ccb0fb3840751a2fb4268ce5dd9b3d
tree283269fbcc883f9f3f740b49a106fbcc4e7a2c16
parent641369e29f57c508e6316d5d221c1a92900163f9
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.

(cherry picked from commit af611afe5fcc908a6678b5b205fb5af7d64fbcb2)
gcc/testsuite/g++.dg/torture/pr106922.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc
This page took 0.058796 seconds and 6 git commands to generate.