public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106922] [12 Regression] Bogus uninitialized warning on boost::optional<<std::vector<std::string>>>, missed FRE Date: Mon, 17 Oct 2022 13:10:29 +0000 [thread overview] Message-ID: <bug-106922-4-BmBVdrRGmT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106922-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106922 --- Comment #28 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:e8d5f3a1b5a5839cb1db57d6f6766469cc4f8747 commit r12-8835-ge8d5f3a1b5a5839cb1db57d6f6766469cc4f8747 Author: Richard Biener <rguenther@suse.de> Date: Wed Sep 21 13:52:56 2022 +0200 tree-optimization/106922 - missed FRE/PRE The following enhances the store-with-same-value trick in vn_reference_lookup_3 by not only looking for a = val; *ptr = val; .. = a; but also *ptr = val; other = x; .. = a; where the earlier store is more than one hop away. It does this by queueing the actual value to compare until after the walk but as disadvantage only allows a single such skipped store from a constant value. Unfortunately we cannot handle defs from non-constants this way since we're prone to pick up values from the past loop iteration this way and we have no good way to identify values that are invariant in the currently iterated cycle. That's why we keep the single-hop lookup for those cases. gcc.dg/tree-ssa/pr87126.c would be a testcase that's un-XFAILed when we'd handle those as well. PR tree-optimization/106922 * tree-ssa-sccvn.cc (vn_walk_cb_data::same_val): New member. (vn_walk_cb_data::finish): Perform delayed verification of a skipped may-alias. (vn_reference_lookup_pieces): Likewise. (vn_reference_lookup): Likewise. (vn_reference_lookup_3): When skipping stores of the same value also handle constant stores that are more than a single VDEF away by delaying the verification. * gcc.dg/tree-ssa/ssa-fre-100.c: New testcase. * g++.dg/tree-ssa/pr106922.C: Adjust. (cherry picked from commit 9baee6181b4e427e0b5ba417e51424c15858dce7)
next prev parent reply other threads:[~2022-10-17 13:10 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-13 8:18 [Bug tree-optimization/106922] New: [12 Regression] Bogus uninitialized warning on boost::optional<<std::vector<std::string>>> jan.zizka at nokia dot com 2022-09-13 9:13 ` [Bug tree-optimization/106922] [12/13 " rguenth at gcc dot gnu.org 2022-09-15 7:55 ` [Bug tree-optimization/106922] [12/13 Regression] Bogus uninitialized warning on boost::optional<<std::vector<std::string>>>, missed FRE rguenth at gcc dot gnu.org 2022-09-15 8:41 ` rguenth at gcc dot gnu.org 2022-09-15 11:26 ` rguenth at gcc dot gnu.org 2022-09-15 11:56 ` rguenth at gcc dot gnu.org 2022-09-15 11:57 ` rguenth at gcc dot gnu.org 2022-09-15 12:12 ` jan.zizka at nokia dot com 2022-09-15 12:36 ` cvs-commit at gcc dot gnu.org 2022-09-15 12:38 ` [Bug tree-optimization/106922] [12 " rguenth at gcc dot gnu.org 2022-09-15 22:13 ` jan.zizka at nokia dot com 2022-09-19 14:16 ` rguenth at gcc dot gnu.org 2022-09-19 15:03 ` jan.zizka at nokia dot com 2022-09-21 6:55 ` rguenth at gcc dot gnu.org 2022-09-21 12:52 ` rguenth at gcc dot gnu.org 2022-09-22 11:10 ` cvs-commit at gcc dot gnu.org 2022-09-22 11:11 ` rguenth at gcc dot gnu.org 2022-09-23 7:48 ` cvs-commit at gcc dot gnu.org 2022-09-23 11:31 ` jan.zizka at nokia dot com 2022-09-23 11:59 ` rguenth at gcc dot gnu.org 2022-09-23 13:11 ` cvs-commit at gcc dot gnu.org 2022-09-23 13:14 ` rguenth at gcc dot gnu.org 2022-09-23 14:22 ` jan.zizka at nokia dot com 2022-10-11 12:06 ` cvs-commit at gcc dot gnu.org 2022-10-11 12:08 ` rguenth at gcc dot gnu.org 2022-10-11 13:13 ` jan.zizka at nokia dot com 2022-10-13 7:44 ` rguenther at suse dot de 2022-10-13 10:50 ` jan.zizka at nokia dot com 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org [this message] 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org 2022-10-17 13:14 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106922-4-BmBVdrRGmT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).