From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7E4C2385E03D; Sat, 9 Mar 2024 03:56:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E4C2385E03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709956614; bh=tGDnLi9xA9XPCv5rznCrQqlgGVa7qlc9yco6uZj7t08=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xk/91DWnKlMqQrn0c7/9lvNhEpFGcd8i/3n0WURTBaid6f/cb66pZ8Dra0cJ4oq/q z4RnPv9D/u73fMLaAsVJusDqUhEz8300Svgrn4p5HvPYkF5yqvGh1YXB94fx07RK5r LHP5ogIuJ9P0yEbofIXkDAz0k15RQqo57pDQe8/o= From: "law 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: Sat, 09 Mar 2024 03:56:52 +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: law 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: cc 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 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org, | |rzinsly at ventanamicro do= t com --- Comment #2 from Jeffrey A. Law --- The other approach we could take (and which I think may have certain advantages) would be to first realize this is a multiplication by a boolean (0/1) value. That's just a conditional move. If we then rewrote as a conditional move there's a reasonable chance we'd be able to further simpli= fy. The biggest problem with this approach is if we're aggressively transforming into conditional moves in gimple, the expanders will need improvement, particularly on targets that don't have conditional moves. Raphael has a TODO in this space. He may have further thoughts.=