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/105198] [9/10/11 Regression] Wrong code for C loop (GCC 12 -O2, GCC 11 -O3) Date: Fri, 08 Apr 2022 13:00:15 +0000 [thread overview] Message-ID: <bug-105198-4-Ph9WxkYECP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105198-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105198 --- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:542c30dc4d220f6d2138e55d5fb8e1529339badf commit r11-9800-g542c30dc4d220f6d2138e55d5fb8e1529339badf Author: Richard Biener <rguenther@suse.de> Date: Fri Apr 8 13:13:29 2022 +0200 tree-optimization/105198 - wrong code with predictive commoning When predictive commoning looks for a looparound PHI it tries to match the entry value definition (a load) up with the appropriate member of the chain. But it fails to consider stmts clobbering the very same memory location inbetween the load and loop entry. In theory we could be more clever on must aliases that would be also picked up from a load (so not exactly stmt_kills_ref_p) and use the stored value from that if it is an exact match. But we currently have no way to propagate this information inside predcom. 2022-04-08 Richard Biener <rguenther@suse.de> PR tree-optimization/105198 * tree-predcom.c (find_looparound_phi): Check whether the found memory location of the entry value is clobbered inbetween the value we want to use and loop entry. * gcc.dg/torture/pr105198.c: New testcase. (cherry picked from commit e5453bcc217ea4ac53a4ac277661d6ef0ccd425b)
next prev parent reply other threads:[~2022-04-08 13:00 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-07 17:02 [Bug middle-end/105198] New: " tomas.kalibera at gmail dot com 2022-04-08 8:32 ` [Bug tree-optimization/105198] [11/12 Regression] " rguenth at gcc dot gnu.org 2022-04-08 8:45 ` jakub at gcc dot gnu.org 2022-04-08 9:04 ` rguenth at gcc dot gnu.org 2022-04-08 9:12 ` rguenth at gcc dot gnu.org 2022-04-08 10:55 ` rguenth at gcc dot gnu.org 2022-04-08 12:10 ` [Bug tree-optimization/105198] [9/10/11/12 " rguenth at gcc dot gnu.org 2022-04-08 12:18 ` cvs-commit at gcc dot gnu.org 2022-04-08 12:20 ` [Bug tree-optimization/105198] [9/10/11 " rguenth at gcc dot gnu.org 2022-04-08 13:00 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-08 13:00 ` [Bug tree-optimization/105198] [9/10 " rguenth at gcc dot gnu.org 2022-04-08 17:06 ` tomas.kalibera at gmail dot com 2022-05-06 12:47 ` cvs-commit at gcc dot gnu.org 2022-05-27 9:53 ` [Bug tree-optimization/105198] [9 " 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-105198-4-Ph9WxkYECP@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).