public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/40022] [4.4/4.5 Regression] Alpine miscompilation Date: Tue, 05 May 2009 10:01:00 -0000 [thread overview] Message-ID: <20090505100134.31719.qmail@sourceware.org> (raw) In-Reply-To: <bug-40022-17675@http.gcc.gnu.org/bugzilla/> ------- Comment #7 from jakub at gcc dot gnu dot org 2009-05-05 10:01 ------- Introduced during tuples merge apparently (haven't bisected the tuples branch though). To me this looks like a phiprop bug. In *.alias (trunk, -O2) we have: # BLOCK 3 freq:9100 # PRED: 4 [91.0%] (true,exec) # VUSE <.MEMD.2716_19> D.1614_8 = *cD.1606_1; cD.1606_9 = &D.1614_8->aD.1593; # SUCC: 4 [100.0%] (fallthru,dfs_back,exec) # BLOCK 4 freq:10000 # PRED: 2 [100.0%] (fallthru,exec) 3 [100.0%] (fallthru,dfs_back,exec) # cD.1606_1 = PHI <cD.1606_4(2), cD.1606_9(3)> # VUSE <.MEMD.2716_19> D.1614_7 = *cD.1606_1; if (D.1614_7 != 0B) goto <bb 3>; else goto <bb 5>; # SUCC: 3 [91.0%] (true,exec) 5 [9.0%] (false,exec) # BLOCK 5 freq:900 # PRED: 4 [9.0%] (false,exec) # .MEMD.2716_20 = VDEF <.MEMD.2716_19> D.1615_11 = fooD.1597 (yD.1602_10(D)); # .MEMD.2716_21 = VDEF <.MEMD.2716_20> *cD.1606_1 = D.1615_11; goto <bb 7>; # SUCC: 7 [100.0%] (fallthru,exec) # BLOCK 6 freq:9100 # PRED: 7 [91.0%] (true,exec) # VUSE <.MEMD.2716_21> D.1614_13 = *cD.1606_2; cD.1606_14 = &D.1614_13->aD.1593; # SUCC: 7 [100.0%] (fallthru,dfs_back,exec) # BLOCK 7 freq:10000 # PRED: 5 [100.0%] (fallthru,exec) 6 [100.0%] (fallthru,dfs_back,exec) # cD.1606_2 = PHI <cD.1606_1(5), cD.1606_14(6)> # VUSE <.MEMD.2716_21> D.1614_12 = *cD.1606_2; if (D.1614_12 != 0B) goto <bb 6>; else goto <bb 8>; # SUCC: 6 [91.0%] (true,exec) 8 [9.0%] (false,exec) Note that the D.1614_12 = *cD.1606_2 read depends on the *cD.1606_1 = D.1615_11; store. In phiprop we have though: # BLOCK 3 freq:9100 # PRED: 4 [91.0%] (true,exec) cD.1606_9 = &D.1614_8->aD.1593; # VUSE <.MEMD.2716_19> D.2745_25 = D.1614_8->aD.1593; # SUCC: 4 [100.0%] (fallthru,dfs_back,exec) # BLOCK 4 freq:10000 # PRED: 2 [100.0%] (fallthru,exec) 3 [100.0%] (fallthru,dfs_back,exec) # cD.1606_1 = PHI <cD.1606_4(2), cD.1606_9(3)> # D.1614_8 = PHI <D.2744_24(2), D.2745_25(3)> D.1614_7 = D.1614_8; if (D.1614_7 != 0B) goto <bb 3>; else goto <bb 5>; # SUCC: 3 [91.0%] (true,exec) 5 [9.0%] (false,exec) # BLOCK 5 freq:900 # PRED: 4 [9.0%] (false,exec) # .MEMD.2716_20 = VDEF <.MEMD.2716_19> D.1615_11 = fooD.1597 (yD.1602_10(D)); # .MEMD.2716_21 = VDEF <.MEMD.2716_20> *cD.1606_1 = D.1615_11; goto <bb 7>; # SUCC: 7 [100.0%] (fallthru,exec) # BLOCK 6 freq:9100 # PRED: 7 [91.0%] (true,exec) cD.1606_14 = &D.1614_13->aD.1593; # VUSE <.MEMD.2716_21> D.2746_26 = D.1614_13->aD.1593; # SUCC: 7 [100.0%] (fallthru,dfs_back,exec) # BLOCK 7 freq:10000 # PRED: 5 [100.0%] (fallthru,exec) 6 [100.0%] (fallthru,dfs_back,exec) # cD.1606_2 = PHI <cD.1606_1(5), cD.1606_14(6)> # D.1614_13 = PHI <D.1614_8(5), D.2746_26(6)> D.1614_12 = D.1614_13; if (D.1614_12 != 0B) goto <bb 6>; else goto <bb 8>; # SUCC: 6 [91.0%] (true,exec) 8 [9.0%] (false,exec) Note that the D.1614_13 PHI now uses D.1614_8, which is correct *c content only if the *cD.1606_1 = D.1615_11; store wasn't performed. This store obviously can change what *c contains. Later passes then find out that D.1614_8 must be 0 to reach BB5 and BB7, so the whole second while loop is removed. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.4 Regression] breaks |[4.4/4.5 Regression] Alpine |"reply to all" in alpine |miscompilation http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40022
next prev parent reply other threads:[~2009-05-05 10:01 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-04 23:08 [Bug c/40022] New: 4.4 regression breaks "reply to all" in alpine joshuadfranklin at yahoo dot com 2009-05-04 23:16 ` [Bug middle-end/40022] " pinskia at gcc dot gnu dot org 2009-05-04 23:36 ` joshuadfranklin at yahoo dot com 2009-05-04 23:53 ` joshuadfranklin at yahoo dot com 2009-05-04 23:55 ` pinskia at gcc dot gnu dot org 2009-05-05 0:00 ` joshuadfranklin at yahoo dot com 2009-05-05 0:01 ` joshuadfranklin at yahoo dot com 2009-05-05 9:02 ` jakub at gcc dot gnu dot org 2009-05-05 9:59 ` [Bug middle-end/40022] [4.4 Regression] " rguenth at gcc dot gnu dot org 2009-05-05 10:01 ` jakub at gcc dot gnu dot org [this message] 2009-05-05 10:10 ` [Bug middle-end/40022] [4.4/4.5 Regression] Alpine miscompilation rguenth at gcc dot gnu dot org 2009-05-05 16:10 ` rguenth at gcc dot gnu dot org 2009-05-05 16:11 ` [Bug middle-end/40022] [4.4 " rguenth at gcc dot gnu dot org 2009-05-05 16:12 ` mmitchel at gcc dot gnu dot org 2009-05-05 16:54 ` jakub at gcc dot gnu dot org 2009-05-06 4:31 ` mmitchel at gcc dot gnu dot org 2009-05-06 8:33 ` rguenth at gcc dot gnu dot org 2009-05-06 8:34 ` rguenth at gcc dot gnu dot 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=20090505100134.31719.qmail@sourceware.org \ --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).