From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 29D4B3858D28; Wed, 26 Apr 2023 03:09:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29D4B3858D28 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 (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33Q32sAR030031; Wed, 26 Apr 2023 03:09:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : references : date : in-reply-to : message-id : content-type : mime-version; s=pp1; bh=5KCOuV9hR+VpALF9DRzVJ7OYGazTK6w1IrkYdcR1alE=; b=Uci7ORMbBdiXHcef4uO/buhbsYRN7AEg35YFPMEDJ3ibV8HN843iykTKm7e9z8OGBsDr 6UjQQb2VtjzHeD6MbAGAMBs5t3/U78NoC1cZC/7klXGw9+uQ1HE/OgjaJx9MXZsBb4PX AkguyWvfbRenTNrqCUvr+MTMQyk2DrX7xDAWoW3uFRLFXrpGQB/L0oksTIsoGx7l4swe 2+O0RS5nxLgvtQqrPkCBuaNZjODojoyj31V9Nt7R/XDSxNvdNnqf5Xn8iMXrVVs+OjvU hqYx+3B1Z1M+UxUJlqI8mew7nPB9xiuw+mQ3bElP4jUid+rgXvLxhbA2fo/VrHbokE+a Zw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q6uq78fb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 03:09:40 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33Q33sCh001299; Wed, 26 Apr 2023 03:07:42 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q6uq78ap6-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 03:07:42 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33PMB6RN014382; Wed, 26 Apr 2023 02:35:26 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3q4777u8ew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 02:35:26 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33Q2ZPYZ11207282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Apr 2023 02:35:26 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C44EB58052; Wed, 26 Apr 2023 02:35:25 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B1F758050; Wed, 26 Apr 2023 02:35:25 +0000 (GMT) Received: from ltcden2-lp1.aus.stglabs.ibm.com (unknown [9.3.90.43]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Wed, 26 Apr 2023 02:35:25 +0000 (GMT) From: Jiufu Guo To: Jiufu Guo via Gcc-patches Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org Subject: Ping^^^ [PATCH V4 2/2] rs6000: use li;x?oris to build constant References: <20221212013829.111739-1-guojiufu@linux.ibm.com> <20221212013829.111739-2-guojiufu@linux.ibm.com> <7ezgayde2f.fsf@pike.rch.stglabs.ibm.com> <7n4jrhj6dr.fsf_-_@ltcden2-lp1.aus.stglabs.ibm.com> Date: Wed, 26 Apr 2023 10:35:19 +0800 In-Reply-To: <7n4jrhj6dr.fsf_-_@ltcden2-lp1.aus.stglabs.ibm.com> (Jiufu Guo via Gcc-patches's message of "Mon, 20 Feb 2023 12:41:20 +0800") Message-ID: <7nleifmkuw.fsf_-_@ltcden2-lp1.aus.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: SdjgsxEvArOXb6WkU367jadyg4Vspf5s X-Proofpoint-ORIG-GUID: nGpdWhKgKWGAj--fTMD0vaRF3vXEY-a3 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.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-25_11,2023-04-25_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304260026 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H2,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, I would like to have a gentle ping for this. https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608292.html BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches writes: > Hi, > > Gentle ping: > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608292.html > > BR, > Jeff (Jiufu) > > > Jiufu Guo via Gcc-patches writes: > >> Hi, >> >> I would like to have a ping on this patch: >> https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608292.html >> >> >> BR, >> Jeff (Jiufu) >> >> >> Jiufu Guo writes: >> >>> Hi, >>> >>> For constant C: >>> If '(c & 0xFFFFFFFF0000FFFFULL) == 0xFFFFFFFF00000000' or say: >>> 32(1) || 1(0) || 15(x) || 16(0), we could use "lis; xoris" to build. >>> >>> Here N(M) means N continuous bit M, x for M means it is ok for either >>> 1 or 0; '||' means concatenation. >>> >>> This patch update rs6000_emit_set_long_const to support those constants. >>> >>> Compare with previous version: >>> https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607618.htm >>> This patch fix conflicts with trunk. >>> >>> Bootstrap and regtest pass on ppc64{,le}. >>> >>> Is this ok for trunk? >>> >>> BR, >>> Jeff (Jiufu) >>> >>> >>> PR target/106708 >>> >>> gcc/ChangeLog: >>> >>> * config/rs6000/rs6000.cc (rs6000_emit_set_long_const): Add to build >>> constants through "lis; xoris". >>> >>> gcc/testsuite/ChangeLog: >>> >>> * gcc.target/powerpc/pr106708.c: Add test function. >>> >>> --- >>> gcc/config/rs6000/rs6000.cc | 7 +++++++ >>> gcc/testsuite/gcc.target/powerpc/pr106708.c | 10 +++++++++- >>> 2 files changed, 16 insertions(+), 1 deletion(-) >>> >>> diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc >>> index 8c1192a10c8..1138d5e8cd4 100644 >>> --- a/gcc/config/rs6000/rs6000.cc >>> +++ b/gcc/config/rs6000/rs6000.cc >>> @@ -10251,6 +10251,13 @@ rs6000_emit_set_long_const (rtx dest, HOST_WIDE_INT c) >>> if (ud1 != 0) >>> emit_move_insn (dest, gen_rtx_IOR (DImode, temp, GEN_INT (ud1))); >>> } >>> + else if (ud4 == 0xffff && ud3 == 0xffff && !(ud2 & 0x8000) && ud1 == 0) >>> + { >>> + /* lis; xoris */ >>> + temp = !can_create_pseudo_p () ? dest : gen_reg_rtx (DImode); >>> + emit_move_insn (temp, GEN_INT (sext_hwi ((ud2 | 0x8000) << 16, 32))); >>> + emit_move_insn (dest, gen_rtx_XOR (DImode, temp, GEN_INT (0x80000000))); >>> + } >>> else if (ud4 == 0xffff && ud3 == 0xffff && (ud1 & 0x8000)) >>> { >>> /* li; xoris */ >>> diff --git a/gcc/testsuite/gcc.target/powerpc/pr106708.c b/gcc/testsuite/gcc.target/powerpc/pr106708.c >>> index dc9ceda8367..a015c71e630 100644 >>> --- a/gcc/testsuite/gcc.target/powerpc/pr106708.c >>> +++ b/gcc/testsuite/gcc.target/powerpc/pr106708.c >>> @@ -4,7 +4,7 @@ >>> /* { dg-require-effective-target has_arch_ppc64 } */ >>> >>> long long arr[] >>> - = {0xffffffff7cdeab55LL, 0x98765432LL, 0xabcd0000LL}; >>> += {0xffffffff7cdeab55LL, 0x98765432LL, 0xabcd0000LL, 0xffffffff65430000LL}; >>> >>> void __attribute__ ((__noipa__)) lixoris (long long *arg) >>> { >>> @@ -27,6 +27,13 @@ void __attribute__ ((__noipa__)) lisrldicl (long long *arg) >>> /* { dg-final { scan-assembler-times {\mlis .*,0xabcd\M} 1 } } */ >>> /* { dg-final { scan-assembler-times {\mrldicl .*,0,32\M} 1 } } */ >>> >>> +void __attribute__ ((__noipa__)) lisxoris (long long *arg) >>> +{ >>> + *arg = 0xffffffff65430000LL; >>> +} >>> +/* { dg-final { scan-assembler-times {\mlis .*,0xe543\M} 1 } } */ >>> +/* { dg-final { scan-assembler-times {\mxoris .*0x8000\M} 1 } } */ >>> + >>> int >>> main () >>> { >>> @@ -35,6 +42,7 @@ main () >>> lixoris (a); >>> lioris (a + 1); >>> lisrldicl (a + 2); >>> + lisxoris (a + 3); >>> if (__builtin_memcmp (a, arr, sizeof (arr)) != 0) >>> __builtin_abort (); >>> return 0;