From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2EE863857C69; Tue, 16 Nov 2021 03:32:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EE863857C69 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103228] [9/10/11/12 Regression] missed optimization with |^ at the gimple level Date: Tue, 16 Nov 2021 03:32:47 +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, TREE X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 03:32:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103228 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:3200de91bc70bfd6d4b7b40e769bc82756b9b555 commit r12-5291-g3200de91bc70bfd6d4b7b40e769bc82756b9b555 Author: Andrew Pinski Date: Mon Nov 15 22:55:09 2021 +0000 tree-optimization: [PR103245] Improve detection of abs pattern using multiplication So while working on PR 103228 (and a few others), I noticed the testcase for PR 94785 was failing. The problem is that the nop_convert moved from being inside the IOR to be outside of it. I also noticed the patch for PR 103228 was not needed to reproduce the issue either. This patch combines the two patterns together for the abs match when us= ing multiplication and adds a few places where nop_convert are optional. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/103245 gcc/ChangeLog: * match.pd: Combine the abs pattern matching using multiplicati= on. Adding optional nop_convert too. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr103245-1.c: New test.=