From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2C1F3858C78; Fri, 28 Apr 2023 14:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2C1F3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682692062; bh=ehp9HIsuH6EERIT18x6oyMjMwwJRxByfACFIjrQFwjI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c9HKRXEzxUvS34Vhsy+/yS9R6/bd83wOnjRo/GGiyQbH0KflL4Ha2PLIoI9D0RBNz BIU9zCddbebZA5sCaDY88FNaAL/BiJdc69zkrFklhzTMF8BG9pRfVhYenugXRb6E7t ZrEcD9hvZ7PdJQOCrrETFnTlRvRaF9VqqrOA6g0Y= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100958] two_value_replacement should move to match.pd Date: Fri, 28 Apr 2023 14:27:42 +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=3D100958 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:1dd154f6407658d46faa4d21bfec04fc2551506a commit r14-338-g1dd154f6407658d46faa4d21bfec04fc2551506a Author: Andrew Pinski Date: Tue Apr 25 19:46:40 2023 -0700 PHIOPT: Move two_value_replacement to match.pd This patch converts two_value_replacement function into a match.pd pattern. It is a direct translation with only one minor change, does not check for the {0,+-1} case as that is handled before in match.pd so there is no reason to do the extra check for it. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/100958 * tree-ssa-phiopt.cc (two_value_replacement): Remove. (pass_phiopt::execute): Don't call two_value_replacement. * match.pd (a !=3D/=3D=3D CST1 ? CST2 : CST3): Add pattern to handle what two_value_replacement did.=