From patchwork Fri Apr 19 21:16:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Love X-Patchwork-Id: 1925698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=VsdaBmhD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLnXl6trCz1yZP for ; Sat, 20 Apr 2024 07:17:25 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 733453849AF7 for ; Fri, 19 Apr 2024 21:17:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id F0BB63849ACF for ; Fri, 19 Apr 2024 21:17:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0BB63849ACF 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 F0BB63849ACF 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=1713561423; cv=none; b=ZM9iW5sdtR75pYEVUU6lUcn+nyIlNJMyIBmb3x7NCJl/eS7GBTQDMvYOtlod03N6n8Mw/9CWjNyXQLe+dhtsf5kkJ5RTisIOj53tsBTvdJPH6ibloHIob9tOM4eFFYLCDKdZR6BFGejLymsqnsVqOlM07rUCmkRNjEK21ewbhdA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713561423; c=relaxed/simple; bh=/0+7k7pry4hb9HQiHhTy7AP42exQK3BDvtCBQIKRERU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=DdyYDqQxb+y6qGD4KHp94zFo4YOl38S5VsbTMcraFLqv2szZqQ/IR93mfPcamrIeEey1tzieb5+f4a3jiT4cwJ85YDD05TWWszDlbut6RccjLrs3N5OJdaj0/Lrwak3ACQEMNpizNxVmlqewDi2vr6RlFtJV/BOW21SXlK31Ts4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43JKw9sD028139; Fri, 19 Apr 2024 21:17:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=f2Ag89WmYtULOr9XXPSorZngPk2bl7wvzgL7T2vQy7M=; b=VsdaBmhDln9w4XxUWmmTdjpE6l+bGihbAA1Ren98KK/J8OxNOyL/oiPGPfPWFnIw/z+W aG1Eg0vktAi0/fWrcgQ8bKWUWXLi2H6/nNA4yxbXKNQL+w41ppKqjJa70nZvYWDZxfY1 gzWdZkqh6D7NKwO2gN7VOa3bo/cZNCJUYRd+DyM0TGIGuRpKZxpwlOKecKKRvQtzg2qU EulCTrXY0hbN72dDqbW1zWtwAqZqZPX7p2E42EheMZ1HWu/g4Tk1olTcUF0KpOpu48mY K85t92lmd214mQSyu/s8g+RLTRIJ6oqQIzjbPj4M2vovDirFZuZNndF5+eew7nH1jDlj oA== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xm03xr1ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Apr 2024 21:17:00 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43JIK7cg022064; Fri, 19 Apr 2024 21:17:00 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([172.16.1.71]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xkbk963n0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Apr 2024 21:17:00 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43JLGvg955574950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Apr 2024 21:16:59 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D4C358045; Fri, 19 Apr 2024 21:16:57 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 949DF58052; Fri, 19 Apr 2024 21:16:56 +0000 (GMT) Received: from [9.67.133.93] (unknown [9.67.133.93]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 19 Apr 2024 21:16:56 +0000 (GMT) Message-ID: Date: Fri, 19 Apr 2024 14:16:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 1/13] rs6000, Remove __builtin_vsx_cmple* builtins Content-Language: en-US To: gcc-patches@gcc.gnu.org, "bergner@linux.ibm.com" , Segher Boessenkool , "Kewen.Lin" References: <6378d560-df55-4b75-be7b-93dc6b85d81a@linux.ibm.com> From: Carl Love In-Reply-To: <6378d560-df55-4b75-be7b-93dc6b85d81a@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mYgpuzmMSxcG2nzqf-N7iezO0wOKHZ7f X-Proofpoint-ORIG-GUID: mYgpuzmMSxcG2nzqf-N7iezO0wOKHZ7f X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-19_15,2024-04-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404190165 X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org 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. 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 {}