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 C84593858D1E for ; Thu, 8 Sep 2022 05:59:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C84593858D1E 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 (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2885v6xT031517; Thu, 8 Sep 2022 05:59:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : subject; s=pp1; bh=aMkJxj5YxNykYOAvcryxIeYFZQMRvt4gIK9l0VXovFk=; b=V6TUgTM7TxQYduMAskn02dxhbrOFEOoaB4hxm7vKpx8k2MwfCVdBOLDQ4QZNpeqDaX6d g8erg1wBzgj0nC38idmsEVJlhzFC4WoVUinIMIgvZV69hufCz+C2JDez4WSOysxhDC2N D4HCBMi+9ohoQ6Ue0BZdv9SjWlix7jY2MmeZVl+gBj0mmUe74+EAbc17YL2zZHk/0FrH M+prWvNV3wxl+kUwsFw/i/bCaVPiMFHbDQSCeRMMD39rYjxMBt+EMX8OCiWaszIXr3Xs iLpmhYBk6JZUhBP/ZIZxtcSf0R7LnVoTeurwnIoA74GLQIcH2BoMU/AVg2Q2JD8LK4xE rw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jfaps0104-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 05:59:10 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2885vfRn032108; Thu, 8 Sep 2022 05:59:09 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jfaps00yj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 05:59:09 +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 2885oofm012659; Thu, 8 Sep 2022 05:59:07 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3jbx6hp446-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 05:59:07 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2885x5mj34668908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Sep 2022 05:59:05 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EE824C044; Thu, 8 Sep 2022 05:59:05 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 337A24C040; Thu, 8 Sep 2022 05:59:04 +0000 (GMT) Received: from [9.200.101.101] (unknown [9.200.101.101]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 8 Sep 2022 05:59:03 +0000 (GMT) Message-ID: Date: Thu, 8 Sep 2022 13:59:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-US To: Segher Boessenkool , "Paul A. Clarke" Cc: Peter Bergner , gcc-patches , David References: <3cd458bc-b01f-cc61-241a-f12d6a49bc87@linux.ibm.com> <20220902155604.GO25951@gate.crashing.org> <20220906171906.GF25951@gate.crashing.org> <20220907142548.GI25951@gate.crashing.org> From: HAO CHEN GUI In-Reply-To: <20220907142548.GI25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: bud5qRTsP4_Aa9sURj3PpdzsxMRpxmNG X-Proofpoint-ORIG-GUID: TXJO3a34hm-jSpOSylc5GJlOj_o3EnVn Subject: RE: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_04,2022-09-07_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080019 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,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: On 7/9/2022 下午 10:25, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 07, 2022 at 08:51:17AM -0500, Paul A. Clarke wrote: >> On Tue, Sep 06, 2022 at 12:19:06PM -0500, Segher Boessenkool wrote: >>> On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: >>>> The return type of vec_ version built-ins are different than their definition >>>> in PVIPR. In PVIPR, they're vector unsigned int or vector unsigned long long. >>>> Shall we correct them? >>>> >>>> const vd __builtin_vsx_extract_exp_dp (vd); >>>> VEEDP xvxexpdp {} >>>> >>>> const vf __builtin_vsx_extract_exp_sp (vf); >>>> VEESP xvxexpsp {} >>>> >>>> const vd __builtin_vsx_extract_sig_dp (vd); >>>> VESDP xvxsigdp {} >>>> >>>> const vf __builtin_vsx_extract_sig_sp (vf); >>>> VESSP xvxsigsp {} >>> >>> Those are the vsx_ versions. I'm not sure what you're asking. >>> >>> It won't be easy at all to change types from vector integer to vector >>> float, it will break all over. A compatibility nightmare. It is better >>> if you can show the current stuff cannot ever work, it's not a problem >>> to replace it in that case. >> >> I think Hao Chen is concerned about the return types: > > Yes, and so am I. > >>>> const vd __builtin_vsx_extract_exp_dp (vd); >>>> VEEDP xvxexpdp {} >> >> Per PVIPR, this should return vector unsigned long long ("vull" not "vd"). > > But changing that will make any existing code that now works, fail > horribly. Of course it is possible no such code exists :-) > > What did this do before the builtin rewrite? > > > ~ - ~ - ~ > > > It looks like it did the right thing before, but that is just based on > reading the code, I haven't actually tried it :-) > > So, changing the vsx_ code here should be okay, because obviously no one > is using it. OTOH, why do we have those separately at all, why do they > not just redirect to the canonical vec_ versions? Or, can we just get > rid of the vsx_ version completely? In rs6000-overload.def, the vsx_ version built-ins are overridden to vec_ version. And the return types of vec_ version is inline with those defined in PVIPR. So there should be no problem. Sorry for that. [VEC_VEEDP, vec_extract_exp_dp, __builtin_vec_extract_exp_dp] vull __builtin_vec_extract_exp_dp (vd); VEEDP VEEDP_DEPR1 [VEC_VEESP, vec_extract_exp_sp, __builtin_vec_extract_exp_sp] vui __builtin_vec_extract_exp_sp (vf); VEESP VEESP_DEPR1 [VEC_VEE, vec_extract_exp, __builtin_vec_extract_exp] vui __builtin_vec_extract_exp (vf); VEESP vull __builtin_vec_extract_exp (vd); VEEDP Thanks Gui Haochen