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 090C53858D20; Fri, 3 Feb 2023 10:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 090C53858D20 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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3138Ue98017517; Fri, 3 Feb 2023 10:22:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version; s=pp1; bh=rNUnyIRtrMm/Hyj+ieMCsGdYD6C/4RIFByDjvuc0hNo=; b=rPf32I7Pez9uwpQAu9CkxO4VdjvCLnVM5K/+OnB2YH397Z6d3nj2q4pMV+POPmVGBkPt mJnqu8dpw9rP9sN5tO4JvWsOiXsoh0CK7VMnvJKdYUP14MLt4hX1E2LXJYi/yKE/7bj7 XzTQn58Q4PIIufE0yB+ogxbmLGpUyvbHWLfer5aP+ZLnIMe8EwJwFMlXygNIfQhvU+Jo wDycLp9QJu7WW6ylDbaT9cO9VJfZcPS8tr9HXuBgg+QKAG3khtHS2xyl5+wz+g6sUe49 A9OXGMc1mRXX2dc8U5DFljotmD9L8saSmMiy3M1DtvQg8q/ZiG7HGJW4mYEWybc3edNf Jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ngxtuad2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:15 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3139kDqn016300; Fri, 3 Feb 2023 10:22:15 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 3ngxtuad21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:15 +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 312MMNNf019572; Fri, 3 Feb 2023 10:22:12 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3ncvv6d6r7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:12 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 313AMAWb25297320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Feb 2023 10:22:10 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D9A62004B; Fri, 3 Feb 2023 10:22:10 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E82C020043; Fri, 3 Feb 2023 10:22:08 +0000 (GMT) Received: from pike.rch.stglabs.ibm.com (unknown [9.5.12.127]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 3 Feb 2023 10:22:08 +0000 (GMT) From: Jiufu Guo To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, guojiufu@linux.ibm.com Subject: [PATCH 0/4] rs6000: build constant via li/lis;rldicX Date: Fri, 3 Feb 2023 18:22:04 +0800 Message-Id: <20230203102208.53215-1-guojiufu@linux.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GZe-2CPA4aD7sgQKbeqfVpES_AbpcNs3 X-Proofpoint-GUID: y5JPC4iFVHaAQyCbhxVZfgnYhITmYB5m X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-03_06,2023-02-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=612 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302030085 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP 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, 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. Previously, a patch is posted, but it is too large. https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601276.html As suggested, I split it into 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)