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/104985] [12 Regression] ICE: SIGSEGV in undo_to_marker / adjust_reg_mode with -Os -frounding-math since r12-4767-g81342e95827f77 Date: Wed, 11 May 2022 06:26:16 +0000 [thread overview] Message-ID: <bug-104985-4-xv0PUgQzKg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104985-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104985 --- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:5169f5756e26feac7042a6046e974dd4b650b6ed commit r9-10145-g5169f5756e26feac7042a6046e974dd4b650b6ed Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Apr 6 18:42:52 2022 +0200 combine: Don't record for UNDO_MODE pointers into regno_reg_rtx array [PR104985] The testcase in the PR fails under valgrind on mips64 (but only Martin can reproduce, I couldn't). But the problem reported there is that SUBST_MODE remembers addresses into the regno_reg_rtx array, then some splitter needs a new pseudo and calls gen_reg_rtx, which reallocates the regno_reg_rtx array and finally undo operation is done and dereferences the old regno_reg_rtx entry. The rtx values stored in regno_reg_rtx array seems to be created by gen_reg_rtx only and since then aren't modified, all we do for it is adjusting its fields (e.g. adjust_reg_mode that SUBST_MODE does). So, I think it is useless to use where.r for UNDO_MODE and store ®no_reg_rtx[regno] in struct undo, we can store just regno_reg_rtx[regno] (i.e. pointer to the REG itself instead of pointer to pointer to REG) or could also store just the regno. The following patch does the latter, and because SUBST_MODE no longer needs to be a macro, changes all SUBST_MODE uses to subst_mode. 2022-04-06 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/104985 * combine.c (struct undo): Add where.regno member. (do_SUBST_MODE): Rename to ... (subst_mode): ... this. Change first argument from rtx * into int, operate on regno_reg_rtx[regno] and save regno into where.regno. (SUBST_MODE): Remove. (try_combine): Use subst_mode instead of SUBST_MODE, change first argument from regno_reg_rtx[whatever] to whatever. For UNDO_MODE, use regno_reg_rtx[undo->where.regno] instead of *undo->where.r. (undo_to_marker): For UNDO_MODE, use regno_reg_rtx[undo->where.regno] instead of *undo->where.r. (simplify_set): Use subst_mode instead of SUBST_MODE, change first argument from regno_reg_rtx[whatever] to whatever. (cherry picked from commit 61bee6aed26eb30b798c75b9a595c9d51e080442)
prev parent reply other threads:[~2022-05-11 6:26 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-19 13:57 [Bug rtl-optimization/104985] New: [12 Regression] ICE: SIGSEGV in undo_to_marker / adjust_reg_mode with -Os -frounding-math zsojka at seznam dot cz 2022-03-21 1:01 ` [Bug rtl-optimization/104985] " pinskia at gcc dot gnu.org 2022-03-21 9:37 ` [Bug rtl-optimization/104985] [12 Regression] ICE: SIGSEGV in undo_to_marker / adjust_reg_mode with -Os -frounding-math since r12-4767-g81342e95827f77 marxin at gcc dot gnu.org 2022-03-23 13:15 ` rguenth at gcc dot gnu.org 2022-03-23 14:12 ` marxin at gcc dot gnu.org 2022-03-23 14:18 ` jakub at gcc dot gnu.org 2022-03-23 14:22 ` marxin at gcc dot gnu.org 2022-03-23 20:32 ` jakub at gcc dot gnu.org 2022-03-24 10:10 ` marxin at gcc dot gnu.org 2022-03-28 12:28 ` jakub at gcc dot gnu.org 2022-03-28 12:33 ` rguenth at gcc dot gnu.org 2022-03-28 12:35 ` jakub at gcc dot gnu.org 2022-03-28 12:41 ` jakub at gcc dot gnu.org 2022-03-28 12:43 ` jakub at gcc dot gnu.org 2022-03-28 12:49 ` marxin at gcc dot gnu.org 2022-03-28 12:55 ` jakub at gcc dot gnu.org 2022-04-04 18:42 ` segher at gcc dot gnu.org 2022-04-04 18:58 ` jakub at gcc dot gnu.org 2022-04-04 19:05 ` segher at gcc dot gnu.org 2022-04-06 16:45 ` cvs-commit at gcc dot gnu.org 2022-04-06 16:47 ` jakub at gcc dot gnu.org 2022-04-13 4:28 ` cvs-commit at gcc dot gnu.org 2022-05-10 8:26 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:26 ` cvs-commit at gcc dot gnu.org [this message]
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-104985-4-xv0PUgQzKg@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).