From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A1B1E3858415; Fri, 8 Mar 2024 08:13:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1B1E3858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709885639; bh=q6Ia0tGV7VXUcYn7flXSYkMhtVMCROqyuwULp/VdTdo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PE9LcqyDRmMnSZ1sCM41uZwqKX4Pjm7kQN0dxofqFZrULezHDGkLm/eZCWB5yDfPH Rwik2OjqnAtJFTmfuLvj83CKRXJzHEOGsdbHzQjaZZcVvTvYjEgr7YrTs7bD8s+WLt 0bHGwhMWSJJkmtLFPF9j0uCKig2E+mG2EuV+sq6s= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111822] [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions since r12-5301-g045206450386bc Date: Fri, 08 Mar 2024 08:13:58 +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: EH, ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords component 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=3D111822 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Component|rtl-optimization |target --- Comment #8 from Richard Biener --- I think it's split1 doing wrong. We end up with ;; basic block 3, loop depth 0, count 118111600 (estimated locally, freq 1.0000), maybe hot ;; prev block 2, next block 4, flags: (NEW, HOT_PARTITION, RTL, MODIFIED) ;; pred: 2 [always] count:118111600 (estimated locally, freq 1.0000) (FALLTHRU) ;; bb 3 artificial_defs: { } ;; bb 3 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(19){ }} ;; lr in ;; lr use ;; lr def ;; live in ;; live gen ;; live kill (note 124 10 126 3 [bb 3] NOTE_INSN_BASIC_BLOCK) (jump_insn 126 124 127 3 (set (pc) (label_ref 125)) -1 (nil) -> 125) ;; succ: 6 [always] count:118111600 (estimated locally, freq 1.0000) ;; lr out ;; live out (barrier 127 126 84) ;; basic block 4, loop depth 0, count 0 (precise, freq 0.0000), probably ne= ver executed ;; prev block 3, next block 5, flags: (REACHABLE, HOT_PARTITION, RTL, MODIFIED) ;; pred: ;; bb 4 artificial_defs: { d-1(0){ }d-1(1){ }} ;; bb 4 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(19){ }} ;; lr in 6 [bp] 7 [sp] 16 [argp] 19 [frame] ;; lr use 6 [bp] 7 [sp] 16 [argp] 19 [frame] ;; lr def 0 [ax] 1 [dx] 114 115 ;; live in 6 [bp] 7 [sp] 16 [argp] 19 [frame] ;; live gen 0 [ax] 1 [dx] 114 115 ;; live kill (code_label/s 84 127 86 4 13 (nil) [1 uses]) (note 86 84 93 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 93 86 85 4 (set (reg:SI 115) (reg:SI 0 ax)) "t.ii":22:42 -1 (expr_list:REG_DEAD (reg:SI 0 ax) so block 4 is unreachable. split1 does 102: r122:DI#0=3Dvec_concat([r98:SI],0) 10: r102:DI#0=3Dr122:DI#0 - REG_EH_REGION 0xd 124: NOTE_INSN_BASIC_BLOCK 3 that looks spurious, so possibly some other pass leaves around the dead EH. Earlier this was 10: r102:DI=3D[r98:SI] REG_EH_REGION 0xd ; pc falls through to BB 5 and STV2 changes this like - 10: r102:DI=3D[r98:SI] + 102: r122:DI#0=3Dvec_concat([r98:SI],0) + 10: r102:DI#0=3Dr122:DI#0 REG_EH_REGION 0xd ; pc falls through to BB 5 failing to move EH (or refuse the lowering). Thus a target issue, even wrong-code I think as we now fail to catch a trap by the [r98:SI] load.=