From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87B513858D33; Fri, 5 May 2023 10:16:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87B513858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683281816; bh=31rX4Xqm9Yo39tMEIAkoOAApyy8sNko8DLJ8fWUQGxI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v8j4n6RfShCM6og82+1CRsuP6Sf4/Oabmg8ggem/D/M7oifVyPth+xUXpP+mLyJtK 9d9OzKAntZ4xpa8L1G8xfgraNqJhWi5+kyeP+qIHL/ijWSqaLJ9AYGnByxrD8447JI q/iYBFVDd1CKdQQLesRnKUEL2IYIpZrvk2ha8OEc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100162] missed optimization for dead code elimination at -O3 (vs. -O2) Date: Fri, 05 May 2023 10:16:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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=3D100162 --- Comment #3 from Richard Biener --- (In reply to Andrew Pinski from comment #2) > FRE is no longer able to optimize _7 to 2 in GCC 13+: > c[0][b.1_1] =3D 2; > c[1][b.1_1] =3D 2; > c[2][b.1_1] =3D 2; > c[3][b.1_1] =3D 2; > c[4][b.1_1] =3D 2; > a =3D 5; > _5 =3D b.1_1 !=3D 0; > _6 =3D (int) _5; > _7 =3D c[0][0]; That's PR108355. The "magic" special-casing of single element arrays went away (or rather now triggers more unreliably).=