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 83F083858C50 for ; Sat, 22 Apr 2023 22:09:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83F083858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33MLGWq7006595 for ; Sat, 22 Apr 2023 15:09:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=3aMYjI326/+FEgLRRDaxM8KF5+AQe4rt1RHKMJnvTjY=; b=J4ASNG+HV1oms9lB7Omo5M42pnpmHiRDnckjUDQBUHRu7pxiJe6/Up3aZBPIEQdE92DP 5JlnDRxVt49RUu9W3/+iD+mir04lRVDm9PdlZMrLdN5hllTM0l67rYxJxbhfwFBOpIEs TIFCMJQFXEUNPSrpLUwjM/WxJ20dn5vur1aPjKhKp4T9U9tjlgyW9BRqYNqp0lXJmLFT E54nlrZg2FO5x13I06UpC7sdArMXLuDrAqxTa20LTP8MfCrJshZZGdsl0wpanrS9DW1o 8yHrn/GFjSNl+x6oyGrmpxvYnYDqStHCup4ehpRVy3lnksqIBZLqXmCmv//I+8KeF03I Ig== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q4egjhp9y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 22 Apr 2023 15:09:43 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 22 Apr 2023 15:09:30 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sat, 22 Apr 2023 15:09:30 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id AC56B3F708D; Sat, 22 Apr 2023 15:09:29 -0700 (PDT) From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 0/6] Improve PHIOPT match and simplify for diamond shaped bbs Date: Sat, 22 Apr 2023 15:09:15 -0700 Message-ID: <20230422220921.452264-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: P0Jmcae3iKxsiQr8Q4FJDyrMSzsXPnaS X-Proofpoint-GUID: P0Jmcae3iKxsiQr8Q4FJDyrMSzsXPnaS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-22_15,2023-04-21_01,2023-02-09_01 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This set of patches implement match and simplify for diamond shaped bbs. Right now there are no match-and-simplify patterns which take advantages of this directly. Though predicates can cause a diamond shaped bb to show up in phiopt1 even though the BB is empty. This allows for that and fixes phi-opt-23.c/phi-opt-24.c testcases. Andrew Pinski (6): PHIOPT: Move check on diamond bb to tree_ssa_phiopt_worker from minmax_replacement PHIOPT: Cleanup tree_ssa_phiopt_worker code PHIOPT: Allow other diamond uses when do_hoist_loads is true PHIOPT: Factor out some code from match_simplify_replacement PHIOPT: Ignore predicates for match-and-simplify phi-opt PHIOPT: Add support for diamond shaped bb to match_simplify_replacement gcc/testsuite/gcc.dg/tree-ssa/phi-opt-23.c | 4 +- gcc/testsuite/gcc.dg/tree-ssa/phi-opt-24.c | 4 +- .../gcc.dg/tree-ssa/ssa-ifcombine-13.c | 4 +- gcc/tree-ssa-phiopt.cc | 360 ++++++++++-------- 4 files changed, 218 insertions(+), 154 deletions(-) -- 2.39.1