From patchwork Fri Apr 19 21:18:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Love X-Patchwork-Id: 1925720 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=EkEnHN47; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4VLncF20X1z1yZn for ; Sat, 20 Apr 2024 07:20:29 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8086E384641A for ; Fri, 19 Apr 2024 21:20:27 +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 110A7384601F for ; Fri, 19 Apr 2024 21:18:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 110A7384601F 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 110A7384601F 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=1713561493; cv=none; b=q41vfb2xOCEUo+1DX5Ttr8vmMZTyOWgg3L+Sm0I3xJ2jBql2c57Fx7B7xG/hXC+uYT0+d59wSOkGf7dQGFeyfkhY0sDmnphzHZNyWFaOJhMb4xSX5Hn3RK3C9KA9BBgCohFplpd3LMsSRKTPLsFWRofTeKTSyI8Siit0xjaHRL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713561493; c=relaxed/simple; bh=t3L3KZRfk8mAqDLbPSLN//+XVdc5dMudfHHgiYI50yo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tkVF446KRvAJoBVBvyPa//32zBFgNoxy7kcVCP7DRNiK9m/7f7Zkb31Z18FH6QMLZ1wjGvAg+XsJFnuZ+ZO4L3oj5Xfkc7276lj2XNyZ+8F9V26fKjSah24q9fZy7Kjo7GA4J1fEl/tI/WlT76RMcr9mK+54LSzGHe4HqCCgGzQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43JKvr0E007594; Fri, 19 Apr 2024 21:18:10 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=ZOBPDWr3lJ3z/PslZZirxt1EXBLECOTh0X4vQPL1HbU=; b=EkEnHN47plC25ZaOW3gAAfHSsFOJdfgqRyYcSfsOiLrfiOWnOhgBwNksfLB/5DP6gNsU kh0eUTemQK1Pg1on8YOkITP6l9tHRzelFJVp2sjG947mjUitQE+E8VF8UAGCqFplPKHh mp5pXGVHRznF+UnEqmtXGax9bJ/FVnxTGHmdmey/QA5GPUPzZX7dNhDAGUzK4XkAxI6g UPDzqkAh/n9V1vZvIiXZnl4zJoIhM2uguEYVbu1BjsO84QLrEcRtLZJmEEqdJF8UX4qg PoqkOHpV+t5b2VqSdwZxuWb3nP5C+U7yqzjfyMdTx4/OCTd7bE4x5FQsZniugOqcNDpV iw== 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 3xm03w81b6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Apr 2024 21:18:10 +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 43JIK7d2022064; Fri, 19 Apr 2024 21:18:09 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xkbk963s5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Apr 2024 21:18:09 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43JLI68V39125690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Apr 2024 21:18:08 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 465E858062; Fri, 19 Apr 2024 21:18:06 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 871AB5805F; Fri, 19 Apr 2024 21:18:05 +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:18:05 +0000 (GMT) Message-ID: Date: Fri, 19 Apr 2024 14:18:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 7/13] rs6000, remove the vec_xxsel built-ins, they are duplicates 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: BHk_611RE6y9oMae4QKtVAd3ygpTzHl4 X-Proofpoint-ORIG-GUID: BHk_611RE6y9oMae4QKtVAd3ygpTzHl4 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 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 spamscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404190165 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 the vec_xxsel built-ins, they are duplicates The following undocumented built-ins are covered by the existing overloaded vec_sel built-in definitions. const vsc __builtin_vsx_xxsel_16qi (vsc, vsc, vsc); same as vsc __builtin_vec_sel (vsc, vsc, vuc); (overloaded vec_sel) const vuc __builtin_vsx_xxsel_16qi_uns (vuc, vuc, vuc); same as vuc __builtin_vec_sel (vuc, vuc, vuc); (overloaded vec_sel) const vd __builtin_vsx_xxsel_2df (vd, vd, vd); same as vd __builtin_vec_sel (vd, vd, vull); (overloaded vec_sel) const vsll __builtin_vsx_xxsel_2di (vsll, vsll, vsll); same as vsll __builtin_vec_sel (vsll, vsll, vsll); (overloaded vec_sel) const vull __builtin_vsx_xxsel_2di_uns (vull, vull, vull); same as vull __builtin_vec_sel (vull, vull, vsll); (overloaded vec_sel) const vf __builtin_vsx_xxsel_4sf (vf, vf, vf); same as vf __builtin_vec_sel (vf, vf, vsi) (overloaded vec_sel) const vsi __builtin_vsx_xxsel_4si (vsi, vsi, vsi); same as vsi __builtin_vec_sel (vsi, vsi, vbi); (overloaded vec_sel) const vui __builtin_vsx_xxsel_4si_uns (vui, vui, vui); same as vui __builtin_vec_sel (vui, vui, vui); (overloaded vec_sel) const vss __builtin_vsx_xxsel_8hi (vss, vss, vss); same as vss __builtin_vec_sel (vss, vss, vbs); (overloaded vec_sel) const vus __builtin_vsx_xxsel_8hi_uns (vus, vus, vus); same as vus __builtin_vec_sel (vus, vus, vus); (overloaded vec_sel) This patch removed the duplicate built-in definitions so users will only use the documented vec_sel built-in. The __builtin_vsx_xxsel_[4si, 8hi, 16qi, 4sf, 2df] tests are also removed. gcc/ChangeLog: * config/rs6000/rs6000-builtins.def (__builtin_vsx_xxmrglw_4si, __builtin_vsx_xxsel_16qi, __builtin_vsx_xxsel_16qi_uns, __builtin_vsx_xxsel_2df, __builtin_vsx_xxsel_2di, __builtin_vsx_xxsel_2di_uns, __builtin_vsx_xxsel_4sf, __builtin_vsx_xxsel_4si, __builtin_vsx_xxsel_4si_uns, __builtin_vsx_xxsel_8hi, __builtin_vsx_xxsel_8hi_uns): Remove built-in definitions. gcc/testsuite/ChangeLog: * gcc.target/powerpc/vsx-builtin-3.c (__builtin_vsx_xxsel_4si, __builtin_vsx_xxsel_8hi, __builtin_vsx_xxsel_16qi, __builtin_vsx_xxsel_4sf, __builtin_vsx_xxsel_2df): Remove test cases for removed built-ins. --- gcc/config/rs6000/rs6000-builtins.def | 30 ------------------- .../gcc.target/powerpc/vsx-builtin-3.c | 26 ---------------- 2 files changed, 56 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def index 46d2ae7b7cb..3c409d729ea 100644 --- a/gcc/config/rs6000/rs6000-builtins.def +++ b/gcc/config/rs6000/rs6000-builtins.def @@ -1925,36 +1925,6 @@ const vss __builtin_vsx_xxpermdi_8hi (vss, vss, const int<2>); XXPERMDI_8HI vsx_xxpermdi_v8hi {} - const vsc __builtin_vsx_xxsel_16qi (vsc, vsc, vsc); - XXSEL_16QI vector_select_v16qi {} - - const vuc __builtin_vsx_xxsel_16qi_uns (vuc, vuc, vuc); - XXSEL_16QI_UNS vector_select_v16qi_uns {} - - const vd __builtin_vsx_xxsel_2df (vd, vd, vd); - XXSEL_2DF vector_select_v2df {} - - const vsll __builtin_vsx_xxsel_2di (vsll, vsll, vsll); - XXSEL_2DI vector_select_v2di {} - - const vull __builtin_vsx_xxsel_2di_uns (vull, vull, vull); - XXSEL_2DI_UNS vector_select_v2di_uns {} - - const vf __builtin_vsx_xxsel_4sf (vf, vf, vf); - XXSEL_4SF vector_select_v4sf {} - - const vsi __builtin_vsx_xxsel_4si (vsi, vsi, vsi); - XXSEL_4SI vector_select_v4si {} - - const vui __builtin_vsx_xxsel_4si_uns (vui, vui, vui); - XXSEL_4SI_UNS vector_select_v4si_uns {} - - const vss __builtin_vsx_xxsel_8hi (vss, vss, vss); - XXSEL_8HI vector_select_v8hi {} - - const vus __builtin_vsx_xxsel_8hi_uns (vus, vus, vus); - XXSEL_8HI_UNS vector_select_v8hi_uns {} - const vsc __builtin_vsx_xxsldwi_16qi (vsc, vsc, const int<2>); XXSLDWI_16QI vsx_xxsldwi_v16qi {} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c index ff875c55304..01f35dad713 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c @@ -2,7 +2,6 @@ /* { dg-skip-if "" { powerpc*-*-darwin* } } */ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O2 -mdejagnu-cpu=power7" } */ -/* { dg-final { scan-assembler "xxsel" } } */ /* { dg-final { scan-assembler "vperm" } } */ /* { dg-final { scan-assembler "xvrdpi" } } */ /* { dg-final { scan-assembler "xvrdpic" } } */ @@ -57,31 +56,6 @@ extern __vector unsigned long long ull[][4]; extern __vector __bool long bl[][4]; #endif -int do_sel(void) -{ - int i = 0; - - si[i][0] = __builtin_vsx_xxsel_4si (si[i][1], si[i][2], si[i][3]); i++; - ss[i][0] = __builtin_vsx_xxsel_8hi (ss[i][1], ss[i][2], ss[i][3]); i++; - sc[i][0] = __builtin_vsx_xxsel_16qi (sc[i][1], sc[i][2], sc[i][3]); i++; - f[i][0] = __builtin_vsx_xxsel_4sf (f[i][1], f[i][2], f[i][3]); i++; - d[i][0] = __builtin_vsx_xxsel_2df (d[i][1], d[i][2], d[i][3]); i++; - - si[i][0] = __builtin_vsx_xxsel (si[i][1], si[i][2], bi[i][3]); i++; - ss[i][0] = __builtin_vsx_xxsel (ss[i][1], ss[i][2], bs[i][3]); i++; - sc[i][0] = __builtin_vsx_xxsel (sc[i][1], sc[i][2], bc[i][3]); i++; - f[i][0] = __builtin_vsx_xxsel (f[i][1], f[i][2], bi[i][3]); i++; - d[i][0] = __builtin_vsx_xxsel (d[i][1], d[i][2], bl[i][3]); i++; - - si[i][0] = __builtin_vsx_xxsel (si[i][1], si[i][2], ui[i][3]); i++; - ss[i][0] = __builtin_vsx_xxsel (ss[i][1], ss[i][2], us[i][3]); i++; - sc[i][0] = __builtin_vsx_xxsel (sc[i][1], sc[i][2], uc[i][3]); i++; - f[i][0] = __builtin_vsx_xxsel (f[i][1], f[i][2], ui[i][3]); i++; - d[i][0] = __builtin_vsx_xxsel (d[i][1], d[i][2], ul[i][3]); i++; - - return i; -} - int do_perm(void) { int i = 0;