From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E8223858D33; Mon, 4 Sep 2023 08:39:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E8223858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693816760; bh=uT0r8c6AZWgoF++G1xTJMCVIMATaZLe3TWsc/MJZ2HA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H2seMPS8OIa5QrBok0G4O5U+iNQAJjNGDIpQni9HM33ERPQdHVysDKDIWHwnRvVIC RlbfaXceIa/CXRdt6Dkuzd8J+SlpxIZizRRYTyUzRS9YShjonyu3pmkPXFX0cdkPrP c6Hou+maLS8MHsIjz4Noh2kZcWTjvAe1LA97IYlE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110009] Another missing ABS detection Date: Mon, 04 Sep 2023 08:39:20 +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: enhancement 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: --- 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=3D110009 --- Comment #5 from Andrew Pinski --- With the nop_convert added and using bitwise_equal_p : (simplify (mult:c @0 (nop_convert? (bit_ior:c (rshift @1 INTEGER_CST@2) integer_onep= ))) (if (!TYPE_UNSIGNED (TREE_TYPE (@1)) && wi::to_wide (@2) =3D=3D element_precision (type) - 1 && bitwise_equal_p (@0, @1)) (if (TYPE_UNSIGNED (type)) (absu @1) (abs @1))))=