From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 19217384477A; Tue, 20 Aug 2024 14:07:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19217384477A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1724162853; bh=o+SMugnjMgfpZ8n2zBJy5Wb6Fkzq1OG5kif2odnz0yQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qL3yUDvYBTrY46dEtUqig9ksdJY5x2+rTLDcQjyBqpoQGWbW+yqblh9vUEQXJh9lc 5Etu7IFg1sz7yBoAQriPWzNafDxIl6dIH5VAcqE/NVGI67wTs6eL97tzP6MK8l3v9d USErnkidFVcOnDLXw9OLeISifjwZF3K1oCBTKuoA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103660] Sub-optimal code with relational operators Date: Tue, 20 Aug 2024 14:07:31 +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=3D103660 --- Comment #10 from GCC Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:b73373520f0ed5d131d2cd6ee9078939a98d7a0d commit r15-3040-gb73373520f0ed5d131d2cd6ee9078939a98d7a0d Author: Andrew Pinski Date: Mon Aug 12 16:00:45 2024 -0700 match: extend the `((a CMP b) ? c : 0) | ((a CMP' b) ? d : 0)` patterns= to support ^ and + [PR103660] r13-4620-g4d9db4bdd458 Added a few patterns and some of them can be extended to support XOR and PLUS. This extends the patterns to support XOR and PLUS instead of just IOR. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/103660 gcc/ChangeLog: * match.pd (`((a CMP b) ? c : 0) | ((a CMP' b) ? d : 0)`): Exte= nd to support XOR and PLUS. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr103660-2.C: New test. * g++.dg/tree-ssa/pr103660-3.C: New test. * gcc.dg/tree-ssa/pr103660-2.c: New test. * gcc.dg/tree-ssa/pr103660-3.c: New test. Signed-off-by: Andrew Pinski =