From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDF943858003; Mon, 11 Mar 2024 23:36:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDF943858003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710200187; bh=fZoLSPuw1GJw3XXYlwTgCXD18A0k4MfxPAhtkz8rlpc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KWza+NaWdJaPk6xiUxxd7I74NnTXC8pP0vDUPEjWqblKQ5RkpN20z2Z57J5U74Pv1 MA36j+RRWYnGPgMraPVTdZ98XYkgRhRf9mpvEX0VtsIwG2tAadEiKsBavFFO9vD5wv eCZihkkuzO4kyX/ekEbloRJRhpnZcIMKX+4YCyvI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114277] [11/12/13/14 Regression] Missed optimization: x*(x||b) => x Date: Mon, 11 Mar 2024 23:36:27 +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: 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=3D114277 --- Comment #5 from Andrew Pinski --- Thinking about this a little more. ((convert)boolean)*a is not Canonical But `boolean?a:0` is. Due to one expression vs 2. But `zero_one * a` is still Canonical if there is no cast from the boolean type. That will fix this issue but not the other.=