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 2DDE03858C52 for ; Mon, 13 May 2024 06:28:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DDE03858C52 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2DDE03858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715581719; cv=none; b=RlV9Jw03/NhRNpriknudhdkIC5je/U+g3uEwtWboAX0kbIf8D8TNnkeat7y6ESo+dgy7ax5rcSrazGc3zQDgPMRAEpdDUjSGmEBMqlY7MMlLZASMNuouTW1gljHOy3hbnYDi6kzhQ3g5iaHqBxos1qdJnfT+k2H9TvDIlew5YRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715581719; c=relaxed/simple; bh=shWgWPnXlqH00FJV5xnBvZ95JdXnfyLY6NMXzlAVjdA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=DUyorZbfFPaQ0tV4c4GTqtfIsbrhxyYIOxDU2g7iNfdjh+hQzjvV8kSRNSPo44HPKflmT+ryGXwbcuDJSPYtkQIp+Ugg13QpLsIjoQ1wGoTioyRQ/rZ+1JYASIDMHCKZPvIb8Ty/eZ0BtkL8B88Cw2fEv9JjD4IsGJxndhjypzQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44D3jVvD024137; Mon, 13 May 2024 06:28:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : cc : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=ienmDTEonx87JTXYVDjc8Zeg59ff6Q3McRVL2bSB4VI=; b=dP62lhuTqMyX21AfJDQy9hzuSL9drv4W6eJU4QIZOjnlYCDiPAovYHWEla3lYB95lbpo mzFS+vBJyCWUf6Ojhfw5k+dxD9YehQqjql7KEokJfjSky/0P6rsqWroaSIQ53uWicn31 EUbEFbtEm0upx6rCU+QNJ0hrHCLhMdvuBdMprDo70SKTHn/3KF5wj/URgl7i/ck5EWV8 ZGP4Btn0fagZVKSwJwR0MSvNXwr3pQTHYJ+YywtArgG6+D0Cik4SInNIrME6v+I5Diq2 WrPICE8kk2Gk/Rgtdb9HA6ILz5tdFJ+u2JjvSmAmyufXzFwo9+AySJ+i2v0eQWg8tAam 6w== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y35mn0vu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 May 2024 06:28:37 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44D5CmOh006073; Mon, 13 May 2024 06:28:36 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3y2nq2dh49-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 May 2024 06:28:36 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44D6SVuF33424038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 May 2024 06:28:33 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28C6D20040; Mon, 13 May 2024 06:28:31 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7F4092004D; Mon, 13 May 2024 06:28:29 +0000 (GMT) Received: from [9.200.58.104] (unknown [9.200.58.104]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 13 May 2024 06:28:29 +0000 (GMT) Message-ID: Date: Mon, 13 May 2024 14:28:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 1/13] rs6000, Remove __builtin_vsx_cmple* builtins Content-Language: en-US To: Carl Love References: <6378d560-df55-4b75-be7b-93dc6b85d81a@linux.ibm.com> Cc: gcc-patches@gcc.gnu.org, "bergner@linux.ibm.com" , Segher Boessenkool From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Ms9lRrqBULCIGwbMnP23s9zu8qkqxkeX X-Proofpoint-GUID: Ms9lRrqBULCIGwbMnP23s9zu8qkqxkeX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-13_04,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405130041 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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, on 2024/4/20 05:16, Carl Love wrote: > > rs6000, Remove __builtin_vsx_cmple* builtins > > The built-ins __builtin_vsx_cmple_u16qi, __builtin_vsx_cmple_u2di, > __builtin_vsx_cmple_u4si and __builtin_vsx_cmple_u8hi should take > unsigned arguments and return an unsigned result. The current definitions > take signed arguments and return signed results which is incorrect. > > The signed and unsigned versions of __builtin_vsx_cmple* are not > documented in extend.texi. Also there are no test cases for the > built-ins. > > Users can use the existing vec_cmple as PVIPR defines instead of > __builtin_vsx_cmple_u16qi, __builtin_vsx_cmple_u2di, > __builtin_vsx_cmple_u4si and __builtin_vsx_cmple_u8hi, > __builtin_vsx_cmple_16qi, __builtin_vsx_cmple_2di, > __builtin_vsx_cmple_4si and __builtin_vsx_cmple_8hi, > __builtin_altivec_cmple_1ti, __builtin_altivec_cmple_u1ti. > > Hence these built-ins are redundant and are removed by this patch. OK for trunk, thanks. BR, Kewen > > gcc/ChangeLog: > * config/rs6000/rs6000-builtin.cc (RS6000_BIF_CMPLE_16QI, > RS6000_BIF_CMPLE_U16QI, RS6000_BIF_CMPLE_8HI, > RS6000_BIF_CMPLE_U8HI, RS6000_BIF_CMPLE_4SI, RS6000_BIF_CMPLE_U4SI, > RS6000_BIF_CMPLE_2DI, RS6000_BIF_CMPLE_U2DI, RS6000_BIF_CMPLE_1TI, > RS6000_BIF_CMPLE_U1TI): Remove case statements. > config/rs6000/rs6000-builtins.def (__builtin_vsx_cmple_16qi, > __builtin_vsx_cmple_2di, __builtin_vsx_cmple_4si, > __builtin_vsx_cmple_8hi, __builtin_vsx_cmple_u16qi, > __builtin_vsx_cmple_u2di, __builtin_vsx_cmple_u4si, > __builtin_vsx_cmple_u8hi): Remove buit-in definitions. > --- > gcc/config/rs6000/rs6000-builtin.cc | 13 ------------ > gcc/config/rs6000/rs6000-builtins.def | 30 --------------------------- > 2 files changed, 43 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc > index 320affd79e3..ac9f16fe51a 100644 > --- a/gcc/config/rs6000/rs6000-builtin.cc > +++ b/gcc/config/rs6000/rs6000-builtin.cc > @@ -2027,19 +2027,6 @@ rs6000_gimple_fold_builtin (gimple_stmt_iterator *gsi) > fold_compare_helper (gsi, GT_EXPR, stmt); > return true; > > - case RS6000_BIF_CMPLE_16QI: > - case RS6000_BIF_CMPLE_U16QI: > - case RS6000_BIF_CMPLE_8HI: > - case RS6000_BIF_CMPLE_U8HI: > - case RS6000_BIF_CMPLE_4SI: > - case RS6000_BIF_CMPLE_U4SI: > - case RS6000_BIF_CMPLE_2DI: > - case RS6000_BIF_CMPLE_U2DI: > - case RS6000_BIF_CMPLE_1TI: > - case RS6000_BIF_CMPLE_U1TI: > - fold_compare_helper (gsi, LE_EXPR, stmt); > - return true; > - > /* flavors of vec_splat_[us]{8,16,32}. */ > case RS6000_BIF_VSPLTISB: > case RS6000_BIF_VSPLTISH: > diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def > index 3bc7fed6956..7c36976a089 100644 > --- a/gcc/config/rs6000/rs6000-builtins.def > +++ b/gcc/config/rs6000/rs6000-builtins.def > @@ -1337,30 +1337,6 @@ > const vss __builtin_vsx_cmpge_u8hi (vus, vus); > CMPGE_U8HI vector_nltuv8hi {} > > - const vsc __builtin_vsx_cmple_16qi (vsc, vsc); > - CMPLE_16QI vector_ngtv16qi {} > - > - const vsll __builtin_vsx_cmple_2di (vsll, vsll); > - CMPLE_2DI vector_ngtv2di {} > - > - const vsi __builtin_vsx_cmple_4si (vsi, vsi); > - CMPLE_4SI vector_ngtv4si {} > - > - const vss __builtin_vsx_cmple_8hi (vss, vss); > - CMPLE_8HI vector_ngtv8hi {} > - > - const vsc __builtin_vsx_cmple_u16qi (vsc, vsc); > - CMPLE_U16QI vector_ngtuv16qi {} > - > - const vsll __builtin_vsx_cmple_u2di (vsll, vsll); > - CMPLE_U2DI vector_ngtuv2di {} > - > - const vsi __builtin_vsx_cmple_u4si (vsi, vsi); > - CMPLE_U4SI vector_ngtuv4si {} > - > - const vss __builtin_vsx_cmple_u8hi (vss, vss); > - CMPLE_U8HI vector_ngtuv8hi {} > - > const vd __builtin_vsx_concat_2df (double, double); > CONCAT_2DF vsx_concat_v2df {} > > @@ -3117,12 +3093,6 @@ > const vbq __builtin_altivec_cmpge_u1ti (vuq, vuq); > CMPGE_U1TI vector_nltuv1ti {} > > - const vbq __builtin_altivec_cmple_1ti (vsq, vsq); > - CMPLE_1TI vector_ngtv1ti {} > - > - const vbq __builtin_altivec_cmple_u1ti (vuq, vuq); > - CMPLE_U1TI vector_ngtuv1ti {} > - > const unsigned long long __builtin_altivec_cntmbb (vuc, const int<1>); > VCNTMBB vec_cntmb_v16qi {} >