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 75F393858D26 for ; Thu, 23 May 2024 02:28:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75F393858D26 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 75F393858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716431285; cv=none; b=svns4EOb34+lv0Y8JIMYosVp35prpGGTVkyPj82p1hHQ21lPH5+yNh2E+KWwn5yaIY59ClpEmvvZlnHL2Pgu02Z2I1ThwsoFNBAt9pF7B+vQPTwQJM3AkmRgggMHx0Wcsm09in09xhPAzFfCy9dNjlNDL8zCfoHPc+JXGuS2i3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716431285; c=relaxed/simple; bh=bL6jF/0kE2FzJJn/AVs4EyzfoxTss+yh4SbXlPDXPv0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=px3WJjS6kdLH4p1LWUqrCAdjfIBOsTWUNGJ6Wz4nGhxEHRgtXpH5S8hgTGPPFxAUd/WGb1b0Gl/eA5BmuFuVPFKRF6ANudWUuV+QURno+0VT1l4FWWVUbxRp2nd13UBM6LBs84PE6JSqx5Uy1VxMawY4v+3TcfID++DJ92hGcsM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44N2LAZM029614; Thu, 23 May 2024 02:28:02 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=cTZWXs1En0mLtylgC4f7uIeK1JcdiglMv5Vlqc5gzGo=; b=BhwxcKhmyYbaNxr0oWut4VqXevCpmnLNkpqIgbZP9djAEsNt69fkv1yDLuEXy8R84Ivt AMdbz2ALFrrmJ5DB3cxqZ2YxQx13xfIfRLAd/i6BNH4TT7j1XQ8Ynhe+WPv70UD+njXb syZJK5RgOlcIOb1iIpX0BkNd2sviAwQDGzjasiCGyBarm618zIghmpQBn580IFEad9a+ mJyk1VdlkE/1q8rxYCc052/HGa7FlOiqg9s4E+YL5xS3zKrpGeIBYvwIO7tpGuCA/BZ8 WNCHllean/WRWEBXqly0JP1dreSFrqa/rulu5/zelCoraZgbpWfAtdRgTkzL3yjZx2Q/ eQ== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y9vgx01ty-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 02:28:01 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44N00DEC023460; Thu, 23 May 2024 02:28:00 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y77npfehk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 02:28:00 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44N2RsZk13107546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2024 02:27:56 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B02E020043; Thu, 23 May 2024 02:27:54 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C04120040; Thu, 23 May 2024 02:27:53 +0000 (GMT) Received: from [9.200.158.244] (unknown [9.200.158.244]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 23 May 2024 02:27:52 +0000 (GMT) Message-ID: Date: Thu, 23 May 2024 10:27:51 +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 13/13] rs6000, remove vector set and vector init built-ins. Content-Language: en-US To: Carl Love References: <6378d560-df55-4b75-be7b-93dc6b85d81a@linux.ibm.com> <3889610b-6342-4145-8b7c-8a0c0b97c78b@linux.ibm.com> Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool , "bergner@linux.ibm.com" From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: U3JrSEDM8Iny5n-comcIps-mTTaZ0p0t X-Proofpoint-ORIG-GUID: U3JrSEDM8Iny5n-comcIps-mTTaZ0p0t X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_14,2024-05-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405230016 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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 Carl, on 2024/5/23 08:29, Carl Love wrote: > Kewen: > > On 5/13/24 22:44, Kewen.Lin wrote: >>> perform the same operation as setting a specific element in the vector in >>> C code. For example: >>> >>> src_v4si = __builtin_vec_set_v4si (src_v4si, int_val, index); >>> src_v4si[index] = int_val; >>> >>> The built-in actually generates more instructions than the inline C code >>> with no optimization but is identical with -O3 optimizations. >>> >>> All of the above built-ins that are removed do not have test cases and >>> are not documented. >>> >>> Built-ins __builtin_vec_set_v1ti __builtin_vec_set_v2di, >>> __builtin_vec_set_v2df are not removed as they are used in function >>> resolve_vec_insert() in file rs6000-c.cc. >> I think we can replace these calls with the equivalent gimple codes >> (early expanding it) and then we can get rid of these instances. > > Hmm, going to need a little coaching here. I am not sure how to do this. Looks like I get to lean some something new. > We have functions rs6000_gimple_fold.*_builtin to fold the builtins, it's folding (expanding) the bif with equivalent gimple codes, what we want here is similar, you can refer to some implementation there. For the expected gimple code, you can refer to what's generated with normal C code. Feel free to let me know when you meet some issues when you are trying, even you prefer me to follow up this. BR, Kewen