From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CED46385771F; Thu, 6 Jul 2023 22:44:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CED46385771F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688683448; bh=j1ROamPB2Z9Aog/KwkpGcsCnUnEwldbnP1GP4tHymbE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uKgua7Rw5PfJt2l46vM8bcatQKpP4jkR/k0jpqC7NkdyT8UnsSkfaddEi+yx0VTzw KTP9kSYVTsJhEJaz2cd0szPOuh5irftlb0uqCBf7CfIE0DIejI+c7v22AlSiR+0xwQ 7gXncKsJ/zU5uJl+Cnw8Sqwr3KYmN5CS87RyUo04= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110539] [14 Regression] Dead Code Elimination Regression at since r14-338-g1dd154f6407 Date: Thu, 06 Jul 2023 22:44:08 +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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia 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=3D110539 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > yes adding: > /* (convert)(zeroone !=3D 0) into (convert)zeroone */ > /* (convert)(zeroone =3D=3D 0) into ((convert)zeroone)^1 */ > (for neeq (ne eq) > (simplify > (convert (neeq zero_one_valued_p@0 integer_zerop)) > (if (neeq =3D=3D NE_EXPR) > (convert @0) > (bit_xor (convert @0) { build_one_cst (type); } )))) >=20 >=20 > Fixes the original testcase. One simple regression: /* { dg-final { scan-tree-dump-times "Folded to: _\[0-9\]+ =3D 1;" 1 "dom3"= } } */ /* { dg-final { scan-tree-dump-times "Folded to: _\[0-9\]+ =3D 0;" 1 "dom3"= } } */ fail now but that is they just don't match the above on accident. Before: Replaced 'bufferstep_36' with constant '0' gimple_simplified to _5 =3D 1; Folded to: _5 =3D 1; After: Replaced 'bufferstep_36' with constant '0' gimple_simplified to bufferstep_23 =3D 1; Folded to: bufferstep_23 =3D 1;=