From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 401D73858C54; Thu, 1 Dec 2022 05:30:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 401D73858C54 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 (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B15BI3h021459; Thu, 1 Dec 2022 05:30:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=jk1Q4JBcIf/0ysoPEbOVYK52LhMzcy+L1MllW7MEA8A=; b=kYsHcJm/2cDepKSCO5rlmjlZHU6LPLco0Eg8+LJthcmHGmN2peiz2JoW3F+gCj3YYxMZ h/aOC1YG6SCn/WDYQD9x2fKgdfkN9GXozSErMufdSC1gEHStuCCODg+AgMkZ3CM3RBPU SlnExQS0GnGPwjV6nl41cn6VkCEU5ZfDB3qJ+Ru8CDuaR1q1dzlfBW74EwBy3tzN4GtO CHTgZISSGWoDpvdbqhtqFAhmWq1rzRilq0pilRLfSfRB9uYTzj0jvxwB31TVsIE0LHhd YwfEuZmvtwwi0O4+2di8PFH4eNQvPCyxHuqapxjHjOxuohtNcyVYP6dKu1cgyfOvs+QM 6w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6nky8m0q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 05:30:44 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2B15DeYL029312; Thu, 1 Dec 2022 05:30:43 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6nky8ky9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 05:30:43 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B15KHwF027698; Thu, 1 Dec 2022 05:30:41 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3m3a2hxuj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 05:30:41 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B15O8jO3015300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 05:24:08 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8794EA405C; Thu, 1 Dec 2022 05:30:39 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 94B88A405B; Thu, 1 Dec 2022 05:30:37 +0000 (GMT) Received: from [9.197.236.127] (unknown [9.197.236.127]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Dec 2022 05:30:37 +0000 (GMT) Message-ID: <54cbdd5a-c4ec-9c80-d2e6-1449798286f0@linux.ibm.com> Date: Thu, 1 Dec 2022 13:30:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 2/3]rs6000: NFC use sext_hwi to replace ((v&0xf..f)^0x80..0) - 0x80..0 Content-Language: en-US To: Jiufu Guo Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, gcc-patches@gcc.gnu.org References: <20221201013619.196004-1-guojiufu@linux.ibm.com> <20221201013619.196004-2-guojiufu@linux.ibm.com> <94338e4c-baf4-ec09-68a7-064a23c79327@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: <94338e4c-baf4-ec09-68a7-064a23c79327@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 4HK1CsW6IFCM6_kWwGILAtVxlNLMTpKH X-Proofpoint-GUID: YA_rsBRCuvITYAH2eUwCqDNgNXlDQC4n 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-12-01_03,2022-11-30_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=873 phishscore=0 suspectscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010034 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: on 2022/12/1 13:17, Kewen.Lin via Gcc-patches wrote: > Hi Jeff, > > on 2022/12/1 09:36, Jiufu Guo wrote: >> Hi, >> >> This patch just uses sext_hwi to replace the expression like: >> ((value & 0xf..f) ^ 0x80..0) - 0x80..0 for rs6000.cc and rs6000.md. >> >> Bootstrap & regtest pass on ppc64{,le}. >> Is this ok for trunk? > > You didn't say it clearly but I guessed you have grepped in the whole > config/rs6000 directory, right? I noticed there are still two places > using this kind of expression in function constant_generates_xxspltiw, > but I assumed it's intentional as their types are not HOST_WIDE_INT. > > gcc/config/rs6000/rs6000.cc: short sign_h_word = ((h_word & 0xffff) ^ 0x8000) - 0x8000; > gcc/config/rs6000/rs6000.cc: int sign_word = ((word & 0xffffffff) ^ 0x80000000) - 0x80000000; > oh, one place in gcc/config/rs6000/predicates.md got missed. ./predicates.md-756-{ ./predicates.md-757- HOST_WIDE_INT val; ... ./predicates.md-762- val = const_vector_elt_as_int (op, elt); ./predicates.md:763: val = ((val & 0xff) ^ 0x80) - 0x80; ./predicates.md-764- return EASY_VECTOR_15_ADD_SELF (val); ./predicates.md-765-}) Do you mind to have a further check? Thanks! Kewen