From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E1E73858C42; Sun, 7 Jan 2024 19:48:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E1E73858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704656933; bh=o4f0B3jWhAncRJgnLIBjOUuXB28dhfUZxLPB9v4GHtY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p5+fsmytE3NH32gSui/HbjHqItcRK2+0kG6v69GJ6/byi9wRfBqVSiCpJyPHRa3IH 00XTn1gyih8keYYzoC0O1jRRg0Vd+Unw00DoN8nPTraKo6lxrgcD1cu4X5TzGKCWho WCdzwaDqSdDzfhWCNJSoO1TrT9mwNIKcfb96ocEQ= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113255] [11/12/13/14 Regression] wrong code with -O2 -mtune=k8 Date: Sun, 07 Jan 2024 19:48:53 +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: 13.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D113255 --- Comment #3 from Uro=C5=A1 Bizjak --- _.dse1 pass is removing the store for some reason, -fno-dse "fixes" the testcase. Before _.dse1 pass, we have: (insn 41 40 46 4 (set (mem/c:SI (plus:DI (reg/f:DI 19 frame) (const_int -36 [0xffffffffffffffdc])) [2 e[1].y+0 S4 A32]) (reg:SI 98 [ e$1$y ])) "pr113255.c":21:9 85 {*movsi_internal} (expr_list:REG_DEAD (reg:SI 98 [ e$1$y ]) (nil))) But _.dse1 pass decides that: **scanning insn=3D41 mem: (plus:DI (reg/f:DI 19 frame) (const_int -36 [0xffffffffffffffdc])) after canon_rtx address: (plus:DI (reg/f:DI 19 frame) (const_int -36 [0xffffffffffffffdc])) gid=3D1 offset=3D-36 processing const base store gid=3D1[-36..-32) mems_found =3D 1, cannot_delete =3D false ... Locally deleting insn 41 deferring deletion of insn with uid =3D 41.=