From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 693823857B9B; Thu, 8 Jun 2023 01:55:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 693823857B9B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3581qCxK026332; Thu, 8 Jun 2023 01:55:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=JLbkXE4G2R49i4SLaQ7uHLlTfO77zkE0EJPSfbuxZ6U=; b=bYXPhwZoqqouL3rJU8UtideZqUoXFTY4TKRQlwPk7wHeiw0L0W9So90qFsBRQnU3WrbW F+6tDw8eSfLJU+ls/GHuykNfDxinuuvaB4uuqXr6AJDOaBt8At2iKBzuwGQPNEYAVpcJ t+Pe2ct/yFr/iYhloWnpgu9S2kAa5H4OJLkrM6mS+ky/BjowFPnSqB+Ctdc670Owce8K ee0dnAHIeD5izmfPHtBX8sWm73wKD3lriyFnh93Q2WYrFs8XwBEaioHHlrXXSBdlDEQ4 nSpBB5MNVRYSAFXZbPEHXUiwky9BkSghet7wHlZVZN8SSSDtO39mEstJwHt14ko2EgkF xA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r35pwg1cd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 01:55:55 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3581tt3q000936; Thu, 8 Jun 2023 01:55:55 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r35pwg1bv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 01:55:55 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 357NSMoa012236; Thu, 8 Jun 2023 01:55:53 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3r2a798p12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 01:55:52 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3581tncl57803014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Jun 2023 01:55:49 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D8F020043; Thu, 8 Jun 2023 01:55:49 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3676A20040; Thu, 8 Jun 2023 01:55:48 +0000 (GMT) Received: from ltcden2-lp1.aus.stglabs.ibm.com (unknown [9.3.90.43]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 8 Jun 2023 01:55:48 +0000 (GMT) From: Jiufu Guo To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, bergner@linux.ibm.com, guojiufu@linux.ibm.com Subject: [PATCH V2 0/4] rs6000: build constant via li/lis;rldicX Date: Thu, 8 Jun 2023 09:55:43 +0800 Message-Id: <20230608015547.3432691-1-guojiufu@linux.ibm.com> X-Mailer: git-send-email 2.39.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KXw4DVapLCyUq78iOtTGvYskL_aC3_wz X-Proofpoint-ORIG-GUID: Ja4Z_GTiN4zmQ237LfnulHfhr9B7KwmA Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_13,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 suspectscore=0 impostorscore=0 mlxlogscore=698 spamscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080010 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,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: Hi, These patches are just minor changes based on previous version/comments. https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620489.html And also update the wording for patches in this series. For a given constant, it would be profitable if we can use 2 insns to build. This patch enables more constants building through 2 insns: one is "li or lis", another is 'rldicl, rldicr or rldic'. Through checking and analyzing the characters of the insns "li/lis;rldicX", all the possible constant values are considered by this patch. The below patches are in this series. Considering the functionality and size, 4 patches are split as below: 1. Support the constants which can be built by "li;rotldi" Both positive and negative values from insn "li" are analyzed. 2. Support the constants which can be built by "lis;rotldi" We only need to analyze the negative value from "lis". And this patch uses more code to check leading 1s and tailing 0s from "lis". 3. Support the constants which can be built by "li/lis;rldicl/rldicr": Leverage the APIs defined/analyzed in patches 1 and 2, this patch checks the characters for the mask of "rldicl/rldicr" to support more constants. 4. Support the constants which can be built by "li/lis;rldic": The mask of "rldic" is relatively complicated, it is analyzed in this patch to support more constants. BR, Jeff (Jiufu)