From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39AC03858285; Wed, 7 Feb 2024 13:21:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39AC03858285 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707312074; bh=JbVqkitkMi4lYBtkeB4pvC6x/JDqBslpnjb8VBNu/x0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S852qa3DHresjxlWhnZkMsN2eLuNn9blogtfnYV9wmQkuTXZ1cwhTPZnvNgg0TjnR oHWvX7HBzN4/WQrbPDcOjHjGV6uz1ZofQN/gtxhH24ouZjUD0rsXNXvWFskaBgidos FJiBfmE/7etZxv78xE9Y9SLbwfdstR/pxwySxAg8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113778] ICE: RTL check: expected elt 3 type 'e' or 'u', have '0' (rtx code_label) in PATTERN, at rtl.h:1506 with -march=armv9-a+sme -fhardened Date: Wed, 07 Feb 2024 13:21:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113778 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Just -march=3Darmv9-a+sme -fstack-clash-protection is needed. early_ra::preprocess_insns as the only other user of vec_rtx_properties doe= s: for (rtx_insn *insn =3D get_insns (); insn; insn =3D NEXT_INSN (insn)) { if (!NONDEBUG_INSN_P (insn)) continue; // Mark all registers that occur in addresses as needing a GPR. vec_rtx_properties properties; properties.add_insn (insn, true); and I think only NONDEBUG_INSN_P can actually clobber anything (DEBUG_INSNs can't and other rtx_insns don't even have a PATTERN). But --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -29491,6 +29491,9 @@ aarch64_mode_emit (int entity, int mode, int prev_m= ode, HARD_REG_SET live) HARD_REG_SET clobbers =3D {}; for (rtx_insn *insn =3D seq; insn; insn =3D NEXT_INSN (insn)) { + if (!NONDEBUG_INSN_P (insn)) + continue; + vec_rtx_properties properties; properties.add_insn (insn, false); for (rtx_obj_reference ref : properties.refs ()) doesn't actually fix this, we ICE elsewhere: ./cc1 -quiet -nostdinc pr113778.c -march=3Darmv9-a+sme -fstack-clash-protec= tion during RTL pass: mode_sw pr113778.c: In function =E2=80=98shared_to_normal=E2=80=99: pr113778.c:2:65: internal compiler error: Segmentation fault 2 | void shared_to_normal() [[arm::inout("za")]] { normal_callee(); } | ^ 0x171054c crash_signal ../../gcc/toplev.cc:317 0xfe7d1d rtl_verify_bb_pointers ../../gcc/cfgrtl.cc:2834 0xfe7ede rtl_verify_flow_info_1 ../../gcc/cfgrtl.cc:2886 0xfe864a rtl_verify_flow_info ../../gcc/cfgrtl.cc:3134 0xfcdb08 verify_flow_info() ../../gcc/cfghooks.cc:283 0xfc4548 checking_verify_flow_info() ../../gcc/cfghooks.h:214 0x2a4dac5 try_optimize_cfg ../../gcc/cfgcleanup.cc:2980 0x2a4df9e cleanup_cfg(int) ../../gcc/cfgcleanup.cc:3143 0x2c02d0d optimize_mode_switching ../../gcc/mode-switching.cc:1261 0x2c02dee execute ../../gcc/mode-switching.cc:1309 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. mode switching isn't prepared for targetm.mode_switching.confluence to emit labels that would need splitting the current bb (say using find_sub_basic_blocks). But, disabling -fstack-clash-protection temporarily in such sequences means= it will not act the way it is supposed to.=