From patchwork Mon Dec 13 16:02:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 48877 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E7873858429 for ; Mon, 13 Dec 2021 16:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E7873858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1639411373; bh=KijlTnWOpxENDO4gqHAZrHruM60a1VY2vsqT6ZQbMAs=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Ya9TVJ34+k7nZ/kXMBrHfXkucm0qA0B9qaBP4qg76RezcRuLhvmsMr2HUxLauff2H bODdXvb2tB9pZjHNYL3IKmPsSAslEfOYlhNaaIbeJKCMUtD6Pv0c6X+Iwd77gL12sF gf6GxaBdklwOVLybGzX3T7cQcbjMrK5VL1TeuFNs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id A6CA83858D39 for ; Mon, 13 Dec 2021 16:02:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6CA83858D39 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BDEvEm9026885; Mon, 13 Dec 2021 16:02:22 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cx8d21m23-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Dec 2021 16:02:22 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1BDEw6cf028765; Mon, 13 Dec 2021 16:02:22 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cx8d21m11-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Dec 2021 16:02:22 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BDFwBIF021469; Mon, 13 Dec 2021 16:02:20 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04wdc.us.ibm.com with ESMTP id 3cvkmah6t3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Dec 2021 16:02:20 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BDG2IQF2753100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Dec 2021 16:02:19 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C71DD28073; Mon, 13 Dec 2021 16:02:18 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DD932805C; Mon, 13 Dec 2021 16:02:17 +0000 (GMT) Received: from [9.211.120.142] (unknown [9.211.120.142]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 13 Dec 2021 16:02:17 +0000 (GMT) Message-ID: <03bf8867-b74e-7505-9ff2-47b474ef5f23@linux.ibm.com> Date: Mon, 13 Dec 2021 10:02:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 To: GCC Patches Subject: [PATCH] rs6000: Builtins for doubleword compare should be in [power8-vector] (PR103625) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: DNkxAHVJcjognRCUTvgInRfyjisA9JnI X-Proofpoint-GUID: kcNOcheSBOh7y_nkvo0DC-L0wnFJcjiq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-13_07,2021-12-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112130103 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bill Schmidt via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: wschmidt@linux.ibm.com Cc: David Edelsohn , Segher Boessenkool Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! PR103625 observes that we ICE when doing vector compares on doublewords. The original built-in function support requires Power8 vector support for these, but this was missed in the new built-in support. Moving these functions to the [power8-vector] stanza solves the problem. Tested the fix on a powerpc-e300c3-linux-gnu cross. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks! Bill 2021-12-13 Bill Schmidt gcc/ PR target/103625 * config/rs6000/rs6000-builtin-new.def (__builtin_altivec_vcmpequd): Move to power8-vector stanza. (__builtin_altivec_vcmpequd_p): Likewise. (__builtin_altivec_vcmpgtsd): Likewise. (__builtin_altivec_vcmpgtsd_p): Likewise. (__builtin_altivec_vcmpgtud): Likewise. (__builtin_altivec_vcmpgtud_p): Likewise. --- gcc/config/rs6000/rs6000-builtin-new.def | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def index a020dbbe2fb..bd950f8db36 100644 --- a/gcc/config/rs6000/rs6000-builtin-new.def +++ b/gcc/config/rs6000/rs6000-builtin-new.def @@ -1200,24 +1200,6 @@ const vull __builtin_altivec_vandc_v2di_uns (vull, vull); VANDC_V2DI_UNS andcv2di3 {} - const vsll __builtin_altivec_vcmpequd (vull, vull); - VCMPEQUD vector_eqv2di {} - - const int __builtin_altivec_vcmpequd_p (int, vsll, vsll); - VCMPEQUD_P vector_eq_v2di_p {pred} - - const vsll __builtin_altivec_vcmpgtsd (vsll, vsll); - VCMPGTSD vector_gtv2di {} - - const int __builtin_altivec_vcmpgtsd_p (int, vsll, vsll); - VCMPGTSD_P vector_gt_v2di_p {pred} - - const vsll __builtin_altivec_vcmpgtud (vull, vull); - VCMPGTUD vector_gtuv2di {} - - const int __builtin_altivec_vcmpgtud_p (int, vsll, vsll); - VCMPGTUD_P vector_gtu_v2di_p {pred} - const vd __builtin_altivec_vnor_v2df (vd, vd); VNOR_V2DF norv2df3 {} @@ -2221,6 +2203,24 @@ const vsc __builtin_altivec_vbpermq2 (vsc, vsc); VBPERMQ2 altivec_vbpermq2 {} + const vsll __builtin_altivec_vcmpequd (vull, vull); + VCMPEQUD vector_eqv2di {} + + const int __builtin_altivec_vcmpequd_p (int, vsll, vsll); + VCMPEQUD_P vector_eq_v2di_p {pred} + + const vsll __builtin_altivec_vcmpgtsd (vsll, vsll); + VCMPGTSD vector_gtv2di {} + + const int __builtin_altivec_vcmpgtsd_p (int, vsll, vsll); + VCMPGTSD_P vector_gt_v2di_p {pred} + + const vsll __builtin_altivec_vcmpgtud (vull, vull); + VCMPGTUD vector_gtuv2di {} + + const int __builtin_altivec_vcmpgtud_p (int, vsll, vsll); + VCMPGTUD_P vector_gtu_v2di_p {pred} + const vsll __builtin_altivec_vmaxsd (vsll, vsll); VMAXSD smaxv2di3 {}