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 1C6E23858D37; Thu, 1 Dec 2022 01:48:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1C6E23858D37 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 2B10beuw012930; Thu, 1 Dec 2022 01:48:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : message-id : from : to : cc : subject : references : content-type : mime-version; s=pp1; bh=QfKEfyfxXDgyahzY5thcTp3JVbOFw0vXLWlqxvL3DVE=; b=i88KtOPCS0KV1wdZkc6RdqHAWnPtT9N4yISuo361Zkr7mKiagDtoxuLCi6T8VR7m7PE6 huDXHu68SFSYBAs/jcsYMjTX9S6qyWil1KyGppE7YoHXZ/G1BJbkWM3jWXjNORyVjnrb 4RFHsRzTegfcJ4SFXn5UkRcDTy1rYAZwUEuxeSK0Wujxj6RPjriwvhuKz1Y53iWK7E+l vdOs2atUiYXEUMlVvbKOJp8j09ygL+2wlCU3KlE0X3qTfNksyhdNOadfx+cG4x5zts0K 0W1R6Btxyod8lMqsBF6T2ml3hCoJ/L52l7gY4YB0NiJvqgXcekKghQFaA7TUEuE1Vwb6 sg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6hm79ppf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 01:48:18 +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 2B11mIQG026244; Thu, 1 Dec 2022 01:48:18 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6hm79pp4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 01:48:18 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B11ZTsV014209; Thu, 1 Dec 2022 01:48:17 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma03wdc.us.ibm.com with ESMTP id 3m3ae9qsry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 01:48:16 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B11mGM935651856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 01:48:16 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 19A5C5805A; Thu, 1 Dec 2022 01:48:16 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D39A858056; Thu, 1 Dec 2022 01:48:15 +0000 (GMT) Received: from pike (unknown [9.5.12.127]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 1 Dec 2022 01:48:15 +0000 (GMT) Date: Thu, 01 Dec 2022 09:48:11 +0800 Message-Id: <7e359zyjvo.fsf@pike.rch.stglabs.ibm.com> From: Jiufu Guo To: Segher Boessenkool Cc: Jiufu Guo via Gcc-patches , "Kewen.Lin" , dje.gcc@gmail.com, linkw@gcc.gnu.org Subject: Re: [PATCH V2] rs6000: Support to build constants by li/lis+oris/xoris References: <20221026114052.17713-1-guojiufu@linux.ibm.com> <9331dba8-f346-37e5-3340-055f2c4d9245@linux.ibm.com> <20221125144309.GG25951@gate.crashing.org> <7ebkor21hd.fsf@pike.rch.stglabs.ibm.com> <7e5yez1ppc.fsf@pike.rch.stglabs.ibm.com> <20221128171950.GN25951@gate.crashing.org> Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QXuis6cjhKVVxl8bjfka9ro5926q1ZBb X-Proofpoint-ORIG-GUID: w2FOxMu5ITqDQCz6XPk6fhGOVxbg0gve 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.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-30_04,2022-11-30_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=952 clxscore=1015 mlxscore=0 adultscore=0 suspectscore=0 spamscore=0 priorityscore=1501 phishscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010007 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_MSPIKE_H2,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: Date: Thu, 01 Dec 2022 09:48:06 +0800 In-Reply-To: <20221128171950.GN25951@gate.crashing.org> (Segher Boessenkool's message of "Mon, 28 Nov 2022 11:19:50 -0600") Message-ID: <7e4jufyjvt.fsf@pike.rch.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Segher Boessenkool writes: > On Mon, Nov 28, 2022 at 03:51:59PM +0800, Jiufu Guo wrote: >> Jiufu Guo via Gcc-patches writes: >> > Segher Boessenkool writes: >> >>> > + else >> >>> > + { >> >>> > + emit_move_insn (temp, >> >>> > + GEN_INT (((ud2 << 16) ^ 0x80000000) - 0x80000000)); >> >>> > + if (ud1 != 0) >> >>> > + emit_move_insn (temp, gen_rtx_IOR (DImode, temp, GEN_INT (ud1))); >> >>> > + emit_move_insn (dest, >> >>> > + gen_rtx_ZERO_EXTEND (DImode, >> >>> > + gen_lowpart (SImode, temp))); >> >>> > + } >> >> >> >> Why this? Please just write it in DImode, do not go via SImode? >> > Thanks for catch this. Yes, gen_lowpart with DImode would be ok. >> Oh, Sorry. DImode can not be used here. The genreated pattern with >> DImode can not be recognized. Using SImode is to match 'rlwxx'. > > There are patterns that accept DImode for rlwinm just fine. Please use > (and:DI (const_int 0xffffffff) (x:DI)) > not the obfuscated > (zero_extend:DI (subreg:SI (x:DI) LOWBYTE)) I just submit a simple patch for this: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607589.html Thanks for comments! BR, Jeff (Jiufu) > > > Segher