From patchwork Wed Aug 30 22:42:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 137217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp4816974vqm; Wed, 30 Aug 2023 15:43:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDVAvQkG6vdYTQKXWhw7kIFcpoS/XltxsWz/LXXjOWYwkYsNRd36Co/A88CC013FfMONov X-Received: by 2002:a17:907:7798:b0:99b:ed44:1a79 with SMTP id ky24-20020a170907779800b0099bed441a79mr2594648ejc.3.1693435426988; Wed, 30 Aug 2023 15:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693435426; cv=none; d=google.com; s=arc-20160816; b=kxjjIRjxr2Fecmh1PNxgVx7UYJ3Pi0nb84oRRIZkj+2yTJqj93gxp6/rOQTVMUatN7 XHdf1MrtKAAnCbZL7JCdiEibmQS1iyDAwxOl6ChS9915k4HPfdb9FpyzfTuJk4wnPCVe 3UbVe3HQgZec2FtGD1H7llxGnsp3U3iI/PyTpo843uFotDqPDPyoMCWrpSRJFO3+5xd+ 5mHBIjt8CN+jl4fkhZM8nNxinZU9Z8obTofF42+RXFfS/sl3I8YcUX3oZjaFnSZhP5El ravI78vW3IuBiyIk2dv68jj0BbNdk1ntV1hCCSQSXI7kU+Lm/OdEOc/YUpM9O7YsQu0E 1y7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:cc:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=kdr+0agdReHgB0moRkewZ85H/+ZIQGer3ZszxFhNtqA=; fh=rk8nU2vuF8M0+dX0N64tww3aH5jxY7+BBjoqdWeOV3o=; b=ECMVTvM1yMN9bDNOrL9SvdMVNtB1Rz0/ddkikX4mtKOrj6wNYXomctlYlr4UYQLsr0 lBjo78nS4SbUqmUATrBHNq9Pjyof7N7S/VMXAEaNGaZaYvmuOkYRC4uKsjFC7LU3DUpO tev6Anq9iZ5XkyHSt773ZnAuMPutfksyTnlpGDAuTQFnacTpWsMWN0NLLfXF/7TOUWis CD1X1EkPraN7FP+QKT86y6Dx6oXB/d3I6r6HsZZaTAQopGq4AHs5Ji6OfRTS5wJ9fIpw jnQvJVd8J2hlfhQnsIGSdJ3w72k8Xx0Dpgz9pXudPjzQYRgd7KSV2AhW0m4gmR3PVQ+x vVoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Yx76dki+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qp25-20020a170907207900b009a1990f178fsi92442ejb.334.2023.08.30.15.43.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 15:43:46 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Yx76dki+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3C70385843E for ; Wed, 30 Aug 2023 22:43:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3C70385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693435425; bh=kdr+0agdReHgB0moRkewZ85H/+ZIQGer3ZszxFhNtqA=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Yx76dki+0XtyoHniUZoFljQTAASdJ3WbDWGExtw24Vw71t6vI2Rh4g+GQDHEatwb2 JN86Ce9LnAlYwjoUrfo9fwfKmQqO9nw3SbnJekWLgHp4TT1+o2PYDqDJS12CXnvXKp eoU+9oBZWH+VOOqK+8MQ/3++VbdPyRP1CNkmE2/w= 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 D17FE3858C62 for ; Wed, 30 Aug 2023 22:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D17FE3858C62 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 37UMbDlR007207; Wed, 30 Aug 2023 22:42:55 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3std7x1p9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 22:42:54 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 37UMfGJ4019162; Wed, 30 Aug 2023 22:42:54 GMT 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 3std7x1p9b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 22:42:54 +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 37UK7FH5014331; Wed, 30 Aug 2023 22:42:52 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3sqvqnfj7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 22:42:52 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 37UMgptv38601416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Aug 2023 22:42:51 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8CA7458050; Wed, 30 Aug 2023 22:42:51 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E08FC58045; Wed, 30 Aug 2023 22:42:50 +0000 (GMT) Received: from [9.61.187.53] (unknown [9.61.187.53]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 30 Aug 2023 22:42:50 +0000 (GMT) Message-ID: <36198454-b68c-5f9d-3248-5dcfcd8eae1b@linux.ibm.com> Date: Wed, 30 Aug 2023 17:42:50 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Content-Language: en-US To: Segher Boessenkool , "Kewen.Lin" , David Edelsohn Cc: GCC Patches , Bill Seurer Subject: [PATCH] rs6000: Update instruction counts to match vec_* calls [PR111228] X-TM-AS-GCONF: 00 X-Proofpoint-GUID: fZZonMC8pE_Osbwghw8EataHpN2G2a72 X-Proofpoint-ORIG-GUID: 7_vAfgkz3JvBV09Hazl5z1tLvM0gRsAe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-30_18,2023-08-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 suspectscore=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308300204 X-Spam-Status: No, score=-10.0 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: , X-Patchwork-Original-From: Peter Bergner via Gcc-patches From: Peter Bergner Reply-To: Peter Bergner Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775695746116899162 X-GMAIL-MSGID: 1775695746116899162 Commit r14-3258-ge7a36e4715c716 increased the amount of folding we perform, leading to better code. Update the expected instruction counts to match the the number of associated vec_* built-in calls. Tested on powerpc64le-linux with no regressions. Ok for mainline? Peter gcc/testsuite/ PR testsuite/111228 * gcc.target/powerpc/fold-vec-logical-ors-char.c: Update instruction counts to match the number of associated vec_* built-in calls. * gcc.target/powerpc/fold-vec-logical-ors-int.c: Likewise. * gcc.target/powerpc/fold-vec-logical-ors-longlong.c: Likewise. * gcc.target/powerpc/fold-vec-logical-ors-short.c: Likewise. * gcc.target/powerpc/fold-vec-logical-other-char.c: Likewise. * gcc.target/powerpc/fold-vec-logical-other-int.c: Likewise. * gcc.target/powerpc/fold-vec-logical-other-longlong.c: Likewise. * gcc.target/powerpc/fold-vec-logical-other-short.c: Likewise. diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-char.c index 713fed7824a..7406039d054 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-char.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-char.c @@ -120,6 +120,6 @@ test6_nor (vector unsigned char x, vector unsigned char y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlor\M} 7 } } */ +/* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */ -/* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-int.c index 4d1c78f40ec..a7c6366b938 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-int.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-int.c @@ -119,6 +119,6 @@ test6_nor (vector unsigned int x, vector unsigned int y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlor\M} 7 } } */ +/* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */ -/* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-longlong.c index 27ef09ada80..10c69d3d87b 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-longlong.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-longlong.c @@ -156,6 +156,6 @@ test6_nor (vector unsigned long long x, vector unsigned long long y) // For simplicity, this test now only targets "powerpc_p8vector_ok" environments // where the answer is expected to be 6. -/* { dg-final { scan-assembler-times {\mxxlor\M} 9 } } */ +/* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */ -/* { dg-final { scan-assembler-times {\mxxlnor\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-short.c index f796c5b33a9..8352a7f4dc5 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-short.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-ors-short.c @@ -119,6 +119,6 @@ test6_nor (vector unsigned short x, vector unsigned short y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlor\M} 7 } } */ +/* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */ -/* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-char.c index e74308ccda2..7fe3e0b8e0e 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-char.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-char.c @@ -104,5 +104,5 @@ test6_nand (vector unsigned char x, vector unsigned char y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlnand\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxlnand\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-int.c index 57edaad52a8..61d34059b67 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-int.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-int.c @@ -104,5 +104,5 @@ test6_nand (vector unsigned int x, vector unsigned int y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlnand\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxlnand\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-longlong.c index d4b85796406..d33006c17e0 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-longlong.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-longlong.c @@ -102,5 +102,5 @@ test6_nand (vector unsigned long long x, vector unsigned long long y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlnand\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxlnand\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-short.c index bf98652750c..cc354b935dc 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-short.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-logical-other-short.c @@ -104,5 +104,5 @@ test6_nand (vector unsigned short x, vector unsigned short y) return *foo; } -/* { dg-final { scan-assembler-times {\mxxlnand\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxlnand\M} 6 } } */ /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */