From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id BE8DB383D014 for ; Sun, 27 Jun 2021 23:25:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE8DB383D014 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15RNL445027865 for ; Sun, 27 Jun 2021 16:25:06 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 39f11y086h-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 27 Jun 2021 16:25:06 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 27 Jun 2021 16:25:05 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Sun, 27 Jun 2021 16:25:05 -0700 Received: from linux.wrightpinski.org.com (unknown [10.69.242.197]) by maili.marvell.com (Postfix) with ESMTP id 1C9EA3F7055; Sun, 27 Jun 2021 16:25:05 -0700 (PDT) From: To: CC: Andrew Pinski Subject: [PATCH 0/4] v4 PHI-OPT move abs_replacement to match.pd Date: Sun, 27 Jun 2021 16:24:56 -0700 Message-ID: <1624836300-23553-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: FdpkDaDQwDSJsl03u2Sl1Qq5hWuFt2gN X-Proofpoint-ORIG-GUID: FdpkDaDQwDSJsl03u2Sl1Qq5hWuFt2gN X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-27_04:2021-06-25, 2021-06-27 signatures=0 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2021 23:25:09 -0000 From: Andrew Pinski To able to move PHI-OPT's abs_replacement to match.pd, a bunch of support needed to be added to PHI-OPT. This is a set of 4 (unapproved) patches which allows us to remove abs_replacement and even does one set further and does a few extra transformations that abs_replacement did not do (just because of the moving from fold to match). v3 to v4 Changes: * pushed the approved patches which are not dependent on unapproved ones * Change 1st patch to only duplicate in one direction and expanded comment on why it is safe and what it is needed Andrew Pinski (4): Duplicate the range information of the phi onto the new ssa_name Allow match-and-simplified phiopt to run in early phiopt Try inverted comparison for match_simplify in phiopt Port most of the A CMP 0 ? A : -A to match gcc/match.pd | 60 +++++ gcc/testsuite/gcc.dg/tree-ssa/phi-opt-15.c | 4 +- gcc/tree-ssa-phiopt.c | 291 +++++++++------------ 3 files changed, 185 insertions(+), 170 deletions(-) -- 2.27.0