public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109002] -O1 -ftree-pre -ftree-partial-pre results in stall value Date: Fri, 03 Mar 2023 09:38:02 +0000 [thread overview] Message-ID: <bug-109002-4-bfXyidlYnl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109002-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109002 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- When doing partial PRE we somehow lose the effect of g = 1; we also generate weird PHIs: <bb 2> pretmp_20 = h; pretmp_22 = g; <bb 3> # prephitmp_21 = PHI <pretmp_20(2), prephitmp_25(10)> # prephitmp_23 = PHI <pretmp_22(2), prephitmp_24(10)> # prephitmp_24 = PHI <pretmp_22(2), prephitmp_24(10)> # prephitmp_25 = PHI <pretmp_20(2), prephitmp_25(10)> those are all unnecessary ... There's one old detail I never understood in partial ANTIC compute and that gets us weird expressions in here, which is that we do not PHI translate ANTIC_IN when computing PA_OUT. Fixing that fixes this bug. I have no idea how to create a testcase for the testsuite though besides verifying we're not inserting any PHI - but we also fail to partial-PRE the load of h here, likely because of the iteration order imposed by the infinite loop which is probably also key to the miscompilation. Anyway, I have a fix, but I'm not 100% sure it fixes the actual cause.
next prev parent reply other threads:[~2023-03-03 9:38 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-03 6:40 [Bug tree-optimization/109002] New: " akihiko.odaki at daynix dot com 2023-03-03 6:51 ` [Bug tree-optimization/109002] " pinskia at gcc dot gnu.org 2023-03-03 6:58 ` akihiko.odaki at daynix dot com 2023-03-03 8:50 ` rguenth at gcc dot gnu.org 2023-03-03 9:38 ` rguenth at gcc dot gnu.org [this message] 2023-03-03 9:55 ` [Bug tree-optimization/109002] [13 Regression] " rguenth at gcc dot gnu.org 2023-03-03 11:07 ` cvs-commit at gcc dot gnu.org 2023-03-03 11:07 ` 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-109002-4-bfXyidlYnl@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).