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 target/113077] [14 Regression] ICE in dwarf2out_frame_debug_cfa_offset with `-O2 -fstack-protector-strong -fstack-clash-protection` Date: Thu, 11 Jan 2024 10:17:33 +0000 [thread overview] Message-ID: <bug-113077-4-I2zZwh3fn8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113077-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113077 --- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>: https://gcc.gnu.org/g:5400778f69d19a94017561c7de02510d9c0899e6 commit r14-7132-g5400778f69d19a94017561c7de02510d9c0899e6 Author: Alex Coplan <alex.coplan@arm.com> Date: Thu Jan 11 10:16:24 2024 +0000 aarch64: Fix dwarf2cfi ICEs due to recent CFI note changes [PR113077] In r14-6604-gd7ee988c491cde43d04fe25f2b3dbad9d85ded45 we changed the CFI notes attached to callee saves (in aarch64_save_callee_saves). That patch changed the ldp/stp representation to use unspecs instead of PARALLEL moves. This meant that we needed to attach CFI notes to all frame-related pair saves such that dwarf2cfi could still emit the appropriate CFI (it cannot interpret the unspecs directly). The patch also attached REG_CFA_OFFSET notes to individual saves so that the ldp/stp pass could easily preserve them when forming stps. In that change I chose to use REG_CFA_OFFSET, but as the PR shows, that choice was problematic in that REG_CFA_OFFSET requires the attached store to be expressed in terms of the current CFA register at all times. This means that even scheduling of frame-related insns can break this invariant, leading to ICEs in dwarf2cfi. The old behaviour (before that change) allowed dwarf2cfi to interpret the RTL directly for sp-relative saves. This change restores that behaviour by using REG_FRAME_RELATED_EXPR instead of REG_CFA_OFFSET. REG_FRAME_RELATED_EXPR effectively just gives a different pattern for dwarf2cfi to look at instead of the main insn pattern. That allows us to attach the old-style PARALLEL move representation in a REG_FRAME_RELATED_EXPR note and means we are free to always express the save addresses in terms of the stack pointer. Since the ldp/stp fusion pass can combine frame-related stores, this patch also updates it to preserve REG_FRAME_RELATED_EXPR notes, and additionally gives it the ability to synthesize those notes when combining sp-relative saves into an stp (the latter always needs a note due to the unspec representation, the former does not). gcc/ChangeLog: PR target/113077 * config/aarch64/aarch64-ldp-fusion.cc (filter_notes): Add fr_expr param to extract REG_FRAME_RELATED_EXPR notes. (combine_reg_notes): Handle REG_FRAME_RELATED_EXPR notes, and synthesize these if needed. Update caller ... (ldp_bb_info::fuse_pair): ... here. (ldp_bb_info::try_fuse_pair): Punt if either insn has writeback and either insn is frame-related. (find_trailing_add): Punt on frame-related insns. * config/aarch64/aarch64.cc (aarch64_save_callee_saves): Use REG_FRAME_RELATED_EXPR instead of REG_CFA_OFFSET. gcc/testsuite/ChangeLog: PR target/113077 * gcc.target/aarch64/pr113077.c: New test.
next prev parent reply other threads:[~2024-01-11 10:17 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-19 3:44 [Bug middle-end/113077] New: " pinskia at gcc dot gnu.org 2023-12-19 3:45 ` [Bug middle-end/113077] " pinskia at gcc dot gnu.org 2023-12-19 3:47 ` pinskia at gcc dot gnu.org 2023-12-19 3:52 ` pinskia at gcc dot gnu.org 2023-12-19 9:44 ` acoplan at gcc dot gnu.org 2024-01-08 12:51 ` [Bug target/113077] " jakub at gcc dot gnu.org 2024-01-08 14:50 ` acoplan at gcc dot gnu.org 2024-01-08 15:00 ` jakub at gcc dot gnu.org 2024-01-08 15:05 ` acoplan at gcc dot gnu.org 2024-01-09 9:13 ` acoplan at gcc dot gnu.org 2024-01-09 11:30 ` acoplan at gcc dot gnu.org 2024-01-09 15:38 ` acoplan at gcc dot gnu.org 2024-01-10 9:57 ` acoplan at gcc dot gnu.org 2024-01-10 17:02 ` acoplan at gcc dot gnu.org 2024-01-11 9:39 ` acoplan at gcc dot gnu.org 2024-01-11 10:17 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-11 10:19 ` acoplan 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-113077-4-I2zZwh3fn8@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).