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 rtl-optimization/98973] [11 regression] Wrong code with gcse store motion pass Date: Fri, 26 Feb 2021 12:51:39 +0000 [thread overview] Message-ID: <bug-98973-4-buQyFzdJVC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98973-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98973 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Btw, this is likely a latent issue, the store-motion code didn't change since ages and the bisected rev. likely just changed the input to the pass. So the dump difference is -(note 76 75 217 19 [bb 19] NOTE_INSN_BASIC_BLOCK) -(insn 217 76 78 19 (set (reg:SI 3 %r3 [133]) - (reg:SI 2 %r2 [orig:69 ivtmp.24+4 ] [69])) "t.c":11:19 1467 {*movsi_zarch} - (nil)) -(insn 78 217 218 19 (parallel [ - (set (reg:SI 3 %r3 [133]) - (plus:SI (reg:SI 3 %r3 [133]) - (const_int -1 [0xffffffffffffffff]))) - (clobber (reg:CC 33 %cc)) - ]) "t.c":11:19 1821 {*addsi3} - (nil)) -(insn 218 78 79 19 (set (mem/c:SI (reg/f:DI 8 %r8 [103]) [1 c+0 S4 A32]) - (reg:SI 3 %r3 [133])) "t.c":11:19 1467 {*movsi_zarch} - (nil)) -(insn 79 218 83 19 (parallel [ - (set (reg:DI 2 %r2 [orig:69 ivtmp.24 ] [69]) - (plus:DI (reg:DI 2 %r2 [orig:69 ivtmp.24 ] [69]) +(note 76 75 79 19 [bb 19] NOTE_INSN_BASIC_BLOCK) +(insn 79 76 83 19 (parallel [ + (set (reg:DI 3 %r3 [orig:69 ivtmp.24 ] [69]) + (plus:DI (reg:DI 3 %r3 [orig:69 ivtmp.24 ] [69]) (const_int -1 [0xffffffffffffffff]))) (clobber (reg:CC 33 %cc)) ]) "t.c":11:12 1820 {*adddi3} (nil)) (insn 83 79 84 19 (set (reg:CCS 33 %cc) - (compare:CCS (reg:SI 2 %r2 [orig:69 ivtmp.24+4 ] [69]) + (compare:CCS (reg:SI 3 %r3 [orig:69 ivtmp.24+4 ] [69]) (const_int 2 [0x2]))) "t.c":11:12 1415 {*cmpsi_ccs} where you can see that %r2 is no longer decremented but the store (sunk) after the loop still uses %r2: (insn 175 105 218 23 (set (mem/c:SI (reg/f:DI 8 %r8 [103]) [1 c+0 S4 A32]) (reg:SI 2 %r2 [orig:110 c ] [110])) 1467 {*movsi_zarch} (nil)) -- scanning new insn with uid = 175. STORE_MOTION insert store at start of BB 26: (insn 175 105 0 26 (set (mem/c:SI (reg/f:DI 103) [1 c+0 S4 A32]) (reg:SI 110 [ c ])) -1 (nil)) I'll note the gcse dumps are after RA but the store-motion dump is pre-RA.
next prev parent reply other threads:[~2021-02-26 12:51 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-05 9:10 [Bug rtl-optimization/98973] New: " krebbel at gcc dot gnu.org 2021-02-05 9:15 ` [Bug rtl-optimization/98973] " rguenth at gcc dot gnu.org 2021-02-05 10:02 ` krebbel at gcc dot gnu.org 2021-02-05 10:03 ` krebbel at gcc dot gnu.org 2021-02-05 10:04 ` krebbel at gcc dot gnu.org 2021-02-05 10:11 ` krebbel at gcc dot gnu.org 2021-02-05 11:54 ` rguenth at gcc dot gnu.org 2021-02-05 12:19 ` jakub at gcc dot gnu.org 2021-02-05 12:39 ` rguenth at gcc dot gnu.org 2021-02-26 12:51 ` rguenth at gcc dot gnu.org [this message] 2021-04-09 8:16 ` rguenth at gcc dot gnu.org 2021-04-12 13:16 ` ebotcazou at gcc dot gnu.org 2021-04-13 15:58 ` law at gcc dot gnu.org 2021-04-27 11:40 ` [Bug rtl-optimization/98973] [11/12 " jakub at gcc dot gnu.org 2021-07-28 7:05 ` rguenth at gcc dot gnu.org 2022-04-21 7:48 ` rguenth at gcc dot gnu.org 2023-05-29 10:04 ` [Bug rtl-optimization/98973] [11/12/13/14 " jakub 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-98973-4-buQyFzdJVC@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).