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 52B033858D28; Tue, 11 Apr 2023 09:40:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52B033858D28 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 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33B7XmFC027206; Tue, 11 Apr 2023 09:40:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=pRMsYToIqY0iK6UTO/29q6w0Qt8wZWv0686ib7USuAw=; b=grQ4R7lThjWxPzasEOrDGWUUwX1qKyP6HohxaP0SIKQlKYa+k8VwM5Dlq29oPHiA8G3k URSX2GDNTShpfVMQ7IjPVgUh070Ao2574x5BUR5tO0TOoUeDdstvbWsbU/RoPtGD9utm ckdWuGA0bdzUB5EbpEYT5myvmcXABivyGV/NaQBecqraW+R/GdGYMa3Bv0IeQe7uXbcq 6V/dUjYhkZEH287isTTJpXMx/wqWce9EJuw19yZtZhLZY+wzZ1XWyAztE/ZVRhhT4gji 3vq3oc3ECGrLEPVfrMpckQ9cWBkN3BwcEjIFpDS7hlaaNrgY7LgOQozcJpeOKbp8YV2b Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pw38xtxgp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 09:40:20 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33B9U7jZ014273; Tue, 11 Apr 2023 09:40:20 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pw38xtxfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 09:40:20 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33B4IVMP024940; Tue, 11 Apr 2023 09:40:18 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3pu0fvsc3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 09:40:17 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33B9eEbn18743850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Apr 2023 09:40:14 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 55C1820043; Tue, 11 Apr 2023 09:40:14 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC0232004F; Tue, 11 Apr 2023 09:40:11 +0000 (GMT) Received: from [9.177.20.73] (unknown [9.177.20.73]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 11 Apr 2023 09:40:11 +0000 (GMT) Message-ID: <13ec00da-587b-847d-c26b-98cf463f21ac@linux.ibm.com> Date: Tue, 11 Apr 2023 17:40:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] testsuite: update requires for powerpc/float128-cmp2-runnable.c Content-Language: en-US To: guojiufu Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, meissner@linux.ibm.com, gcc-patches@gcc.gnu.org References: <20230410020941.2440885-1-guojiufu@linux.ibm.com> <11b29ca1-cd23-1a48-4ad8-3b472d38fd2f@linux.ibm.com> <71ed6f665ae2ed9678d8dc4ec0f620ce@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: <71ed6f665ae2ed9678d8dc4ec0f620ce@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: apPUlDbPmmZ-NrHRlsyb93qDzj4hi-K1 X-Proofpoint-ORIG-GUID: qsJ0sEBu8jVOpXVh3fx-3rROrrk0t2qB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-11_06,2023-04-06_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304110089 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,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 Jeff, on 2023/4/11 17:14, guojiufu wrote: > Hi Kewen, > > Thanks a lot for your very helpful comments! > > On 2023-04-10 17:26, Kewen.Lin wrote: >> Hi Jeff, >> >> on 2023/4/10 10:09, Jiufu Guo via Gcc-patches wrote: >>> Hi, >>> >>> In this test case (float128-cmp2-runnable.c), the instruction >>> xscmpexpqp is used to support a few builtins e.g. >>> __builtin_vsx_scalar_cmp_exp_qp_eq on _Float128. >>> This instruction handles the whole 128bits of the vector, and >>> it is guarded by [ieee128-hw]. >> >> The instruction xscmpexpqp is guarded with TARGET_P9_VECTOR, >> >> (define_insn "*xscmpexpqp" >>   [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") >>     (compare:CCFP >>      (unspec:IEEE128 [(match_operand:IEEE128 1 "altivec_register_operand" "v") >>                   (match_operand:IEEE128 2 "altivec_register_operand" "v")] >>       UNSPEC_VSX_SCMPEXPQP) >>      (match_operand:SI 3 "zero_constant" "j")))] >>   "TARGET_P9_VECTOR" >>   "xscmpexpqp %0,%1,%2" >>   [(set_attr "type" "fpcompare")]) >> >> [ieee128-hw] is used for guarding those bifs, so the above >> statement doesn't quite match the fact. >> > > Agree, I'm wondering if P9_VECTOR is perfect here, even if it indicates the ISA > which contains xscmpexpqp. Let me have more checks. > >> PR108758 said this case doesn't fail with gcc-10 and gcc-11, >> I wonder why it changes from gcc-12?  The above define_insn >> shows the underlying insns for these bifs just requires the >> condition power9-vector.  Could you have a further check? >> Thanks. > > Thanks for raising this concern. > The behavior to check about bif on FLOAT128_HW and emit an error message for > requirements on quad-precision is added in gcc12. This is why gcc12 fails to > compile the case on -m32. > > Before gcc12, altivec_resolve_overloaded_builtin will return the overloaded > result directly, and does not check more about the result function. Thanks for checking, I wonder which commit caused this behavior change and what's the underlying justification? I know there is one new bif handling framework introduced in gcc12, not sure the checking condition was changed together or by a standalone commit. Anyway, apparently the conditions for the support of these bifs are different on gcc-11 and gcc-12, I wonder why it changed. As mentioned above, PR108758's c#1 said this case (bifs) work well on gcc-11, I suspected the condition change was an overkill, that's why I asked. BR, Kewen > >> >> btw, please add a PR marker for PR108758. > > Sure,  thanks for catching this! > > > BR, > Jeff (Jiufu) > >> >> BR, >> Kewen >> >>> So, we may update the testcase to require ppc_float128_hw. >>> >>> Tested on ppc64 both BE and LE. >>> Is this ok for trunk? >>> >>> BR, >>> Jeff (Jiufu) >>> >>> gcc/testsuite/ChangeLog: >>> >>>     * gcc.target/powerpc/float128-cmp2-runnable.c: Update requires. >>> >>> --- >>>  gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c | 2 +- >>>  1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c >>> index d376a3ca68e..91287c0fb7a 100644 >>> --- a/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c >>> +++ b/gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c >>> @@ -1,5 +1,5 @@ >>>  /* { dg-do run } */ >>> -/* { dg-require-effective-target ppc_float128_sw } */ >>> +/* { dg-require-effective-target ppc_float128_hw } */ >>>  /* { dg-require-effective-target p9vector_hw } */ >>>  /* { dg-options "-O2 -mdejagnu-cpu=power9 " } */ >>>