From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE3F13858288; Tue, 5 Sep 2023 21:16:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE3F13858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693948582; bh=I/JfnHnmN3sdJdhvz3ZDrgHqtbGM96nvengzix5xlqk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ik173EFD6yRcmOYqVxgZthz8YUiSRnGftbQDrnowpSlE4zwmxGCVA7AOBdRjTM+K3 zbxwSBQAPeidovK0dGvDxWWC2tI6J0nBSwiXR7YWDKbeDNGzlieA3e8VYbwpUoi2MI RXpehXOKUlBf79BYaf+w1tOscgLsmrJBCriR8cWU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103536] Suboptimal codegen for && and || combination. Date: Tue, 05 Sep 2023 21:16:22 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit 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=3D103536 --- Comment #6 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:8e995e84233661a1a246807a66cc84003426b1df commit r14-3722-g8e995e84233661a1a246807a66cc84003426b1df Author: Andrew Pinski Date: Sun Sep 3 10:17:29 2023 -0700 MATCH: Add pattern for `(x | y) & (x & z)` Like the pattern already there for `(x | y) & x`, this adds a simple pattern to optimize `(x | y) & (x & z)` to just `x & z`. OK? Bootstrapped and tested on x86-64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/103536 * match.pd (`(x | y) & (x & z)`, `(x & y) | (x | z)`): New patterns. gcc/testsuite/ChangeLog: PR tree-optimization/103536 * gcc.dg/tree-ssa/andor-6.c: New test. * gcc.dg/tree-ssa/andor-bool-1.c: New test.=