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 rtl-optimization/101188] [postreload] Uses content of a clobbered register Date: Mon, 12 Jun 2023 18:55:19 +0000 [thread overview] Message-ID: <bug-101188-4-YFixKz7DSi@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101188-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101188 --- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <law@gcc.gnu.org>: https://gcc.gnu.org/g:ae193f9008e02683e27f3c87f3b06f38e103b1d0 commit r14-1738-gae193f9008e02683e27f3c87f3b06f38e103b1d0 Author: Jeff Law <jlaw@ventanamicro.com> Date: Mon Jun 12 12:52:10 2023 -0600 [committed] [PR rtl-optimization/101188] Fix reload_cse_move2add ignoring clobbers So as Georg-Johann discusses in the BZ, reload_cse_move2add can generate incorrect code when optimizing code with clobbers. Specifically in the case where we try to optimize a sequence of 4 operations down to 3 operations we can reset INSN to the next instruction and continue the loop. That skips the code to invalidate objects based on things like REG_INC nodes, stack pushes and most importantly clobbers attached to the current insn. This patch factors all of the invalidation code used by reload_cse_move2add into a new function and calls it at the appropriate time. Georg-Johann has confirmed this patch fixes his avr bug and I've had it in my tester over the weekend. It's bootstrapped and regression tested on aarch64, m68k, sh4, alpha and hppa. It's also regression tested successfully on a wide variety of other targets. gcc/ PR rtl-optimization/101188 * postreload.cc (reload_cse_move2add_invalidate): New function, extracted from... (reload_cse_move2add): Call reload_cse_move2add_invalidate. gcc/testsuite PR rtl-optimization/101188 * gcc.c-torture/execute/pr101188.c: New test
next prev parent reply other threads:[~2023-06-12 18:55 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-24 7:36 [Bug c/101188] New: [AVR] Miscompilation and function pointers joel.bertrand at systella dot fr 2021-06-25 8:09 ` [Bug target/101188] " saaadhu at gcc dot gnu.org 2023-05-24 6:56 ` gjl at gcc dot gnu.org 2023-05-24 7:21 ` [Bug rtl-optimization/101188] " gjl at gcc dot gnu.org 2023-05-24 7:44 ` gjl at gcc dot gnu.org 2023-05-24 11:07 ` gjl at gcc dot gnu.org 2023-05-24 19:07 ` gjl at gcc dot gnu.org 2023-05-25 9:47 ` gjl at gcc dot gnu.org 2023-05-28 9:24 ` [Bug rtl-optimization/101188] [postreload] Uses content of a clobbered register gjl at gcc dot gnu.org 2023-05-28 19:26 ` gjl at gcc dot gnu.org 2023-05-29 19:35 ` gjl at gcc dot gnu.org 2023-05-30 19:05 ` gjl at gcc dot gnu.org 2023-06-02 10:36 ` uweigand at gcc dot gnu.org 2023-06-02 11:27 ` gjl at gcc dot gnu.org 2023-06-02 15:35 ` uweigand at gcc dot gnu.org 2023-06-12 18:55 ` cvs-commit at gcc dot gnu.org [this message] 2023-06-13 11:42 ` gjl at gcc dot gnu.org 2023-06-13 11:45 ` gjl at gcc dot gnu.org 2023-08-09 18:57 ` gjl at gcc dot gnu.org 2024-02-09 11:23 ` [Bug rtl-optimization/101188] [11/12/13 Regression] " gjl at gcc dot gnu.org 2024-02-09 13:02 ` rguenth at gcc dot gnu.org 2024-05-08 11:47 ` 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-101188-4-YFixKz7DSi@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).