From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A5C73858C60; Sat, 16 Sep 2023 07:46:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A5C73858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694850386; bh=M6wsNHAFqBFKoBnMJm4cbh8ZEF2RnnreqqQ7V+xBJr0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NWyag4g7j5btFptO00mimp1+/Zpuz5wt6CSIsk0vXjbpiiZ5QULE6fyWAwTpfQBkx nqF5F2LFJPReHLBAtYd7apOaDCOM3X6gPVB3E2wZw62sQZEQKRpNcXF3moWLY8Vnp7 8NA1UlV/THasTmuoEZGEeCvMnogEgb0b9jwDdJDw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110941] [14 Regression] Dead Code Elimination Regression at -O3 since r14-2379-gc496d15954c Date: Sat, 16 Sep 2023 07:46:25 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 14.0 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=3D110941 --- Comment #2 from Andrew Pinski --- GCC 13: Global Exported: _6 =3D [irange] unsigned int [0, 24] NONZERO 0x1e trunk: Global Exported: _6 =3D [irange] unsigned int [0, 24][+INF, +INF] MASK 0x1c= VALUE 0x0 And then: Folding predicate _6 > 24 to 0 does not happen. But what is interesting is with https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629128.html , We get: ``` Simplified relational if (_6 > 24) into if (_6 =3D=3D 4294967295) Folded into: if (_6 =3D=3D 4294967295) ``` And then during cfgcleanup the match pattern: /* X =3D=3D C (or X & Z =3D=3D Y | C) is impossible if ~nonzero(X) & C !=3D= 0. */ Hits which is totally funny because that means the range and nonzero information are out of sync ...=