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 2F2703858D1E for ; Wed, 24 Jan 2024 06:04:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F2703858D1E 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 2F2703858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706076257; cv=none; b=HQoJCnnKT34oG0bmKDdhxuHwamHraNxIKXSVctOAQAXPU+YAV0PcF/89in4Wvktqx/9Uj7scIXM6vvBmUeQsxM2uFh+9HLiWWfKCRjcgKExYfBaGyfIbuMORRS4FwspL7lXlOIM6Ztpo6qp5F5Ed/UmXC4mhhkXZTE5sZ8ZXwdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706076257; c=relaxed/simple; bh=2cMI014GFr94JzYDVLN+GbKR5qV/k9PpnbURa5DkqaY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=T4fN5S+0I9CmNVM9LgzgOFbObiJ8PhOVN/fpn1pEaZI6czKXUZntUbKObscLjkF9ScPPYpOW69n4Kv1s7pnYGPa+P07bS9ibJo3NzizvjJr+LsMAgcRLpS6w81JZv8zEAlTWGDoz3CJcNoN9uyBGbo1XOSnYeTl1BlNB2TwvsAI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40O57Udg013554; Wed, 24 Jan 2024 06:04:14 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=BxV+D3dnsnD0d4vbG+dRQXO+MvztW17pRWVg+Hax6gA=; b=sqtrsIeiOuPrEDqPk11ewr42X+iywRODTRqbaryF2ae6Rcsl5cxnQbkLAj8RIWV+iq03 ptRH/zDrJPWFvVyPRsohn0TJFfpqDb5i8Xq4EiSdM9UHquFYM2UuryskwOQNWRtchPUA 2sLeKR4V8wUhB5ctGU4g0UHIbcEffkLWDhwTaZPcmeeu0K0Gm9IydRnsOgWS+xt6UVQx AnrMT2Syo/434B7sk53JW7+CajDttnJWHoNNGFc0+ex5rIXU15jb8taYl2EgZkqKUEaF 8f227nFG1L+HeRn5in79Py3ND7M7QUc8BAC3AyrEL+wt3/qOiXBA18xKwEwmG6tt/aCz +A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vtv4ch2pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 06:04:13 +0000 Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40O5vLGx014976; Wed, 24 Jan 2024 06:04:13 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vtv4ch2p5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 06:04:13 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 40O5SvZ9028254; Wed, 24 Jan 2024 06:04:12 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3vru72kk8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 06:04:12 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 40O649Fi8782358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Jan 2024 06:04:09 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 611042004D; Wed, 24 Jan 2024 06:04:09 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6ED2820043; Wed, 24 Jan 2024 06:04:07 +0000 (GMT) Received: from [9.200.61.207] (unknown [9.200.61.207]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Jan 2024 06:04:07 +0000 (GMT) Message-ID: <8c6e44e4-d50a-1d1d-a8af-3fb3e76da2ad@linux.ibm.com> Date: Wed, 24 Jan 2024 14:04:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH, V2] PR target/112886, Add %S to print_operand for vector pair support. Content-Language: en-US To: Peter Bergner , Michael Meissner Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn References: <26fef06f-2875-d9e9-946c-1a549da5aa12@linux.ibm.com> <0aef29c9-03d1-4f0c-8d7b-bf40683d57d6@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: <0aef29c9-03d1-4f0c-8d7b-bf40683d57d6@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: _wC9pQ6yYuU6gsmPVCUTvEcfUrynDMYP X-Proofpoint-ORIG-GUID: KqsWpdBiKK8U0qSt8hnylMWb155iNz5s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-24_02,2024-01-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 malwarescore=0 phishscore=0 mlxlogscore=828 suspectscore=0 bulkscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401240043 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: on 2024/1/24 11:11, Peter Bergner wrote: > On 1/23/24 8:30 PM, Kewen.Lin wrote: >>> - output_operand_lossage ("invalid %%x value"); >>> + output_operand_lossage ("invalid %%%c value", (code == 'S' ? 'S' : 'x')); >> >> Nit: Seems simpler with >> >> output_operand_lossage ("invalid %%%c value", (char) code); > > Agreed, good catch. > > > > >>> diff --git a/gcc/testsuite/gcc.target/powerpc/pr112886.c b/gcc/testsuite/gcc.target/powerpc/pr112886.c >>> new file mode 100644 >>> index 00000000000..4e59dcda6ea >>> --- /dev/null >>> +++ b/gcc/testsuite/gcc.target/powerpc/pr112886.c >>> @@ -0,0 +1,29 @@ >>> +/* { dg-do compile } */ >>> +/* { dg-require-effective-target power10_ok } */ >> >> I think this needs one more: >> >> /* { dg-require-effective-target powerpc_vsx_ok } */ > > I agree with this... > > > >>> +/* { dg-options "-mdejagnu-cpu=power10 -O2" } */ >> >> ... and >> >> /* { dg-options "-mdejagnu-cpu=power10 -O2 -mvsx" } */ >> >> , otherwise with explicit -mno-vsx, this test case would fail. > > But not with this. The -mdejagnu-cpu=power10 option already enables -mvsx. > If the user explcitly forces -mno-vsx via RUNTESTFLAGS, then let them. > The options set in RUNTESTFLAGS come after the options in the dg-options > line, so even adding -mvsx like the above won't help the test case PASS But this is NOT true, at least on one of internal Power10 machine (ltcden2-lp1). With the command below: make check-gcc-c RUNTESTFLAGS="--target_board=unix/-mno-vsx powerpc.exp=pr112886.c" this test case fails without the explicit -mvsx in dg-options. >From the verbose dumping, the compilation command looks like: /home/linkw/gcc/build/gcc-test-debug/gcc/xgcc -B/home/linkw/gcc/build/gcc-test-debug/gcc/ /home/linkw/gcc/gcc-test/gcc/testsuite/gcc.target/powerpc/pr112886.c -mno-vsx -fdiagnostics-plain-output -mdejagnu-cpu=power10 -O2 -ffat-lto-objects -fno-ident -S -o pr112886.s "-mno-vsx" comes **before** "-mdejagnu-cpu=power10 -O2" rather than **after**. I guess it might be due to different behaviors of different versions of runtest framework? So there can be two cases with user explicitly specified -mno-vsx: 1) RUNTESTFLAGS comes after dg-options (assuming same order for -mvsx in powerpc_vsx_ok) powerpc_vsx_ok test failed, so UNSUPPORTED // with explicit -mvsx does nothing as you said. 2) RUNTESTFLAGS comes before dg-options powerpc_vsx_ok test succeeds, but FAIL. // with suggested -mvsx, make it match the powerpc_vsx_ok checking and the case not fail. As above I think we still need to append the "-mvsx" explicitly. As tested/verified, it does help the case not to fail on ltcden2-lp1. BR, Kewen > if we didn't have the powerpc_vsx_ok test. In other words, the -mvsx option > doesn't help with anything. > > All we need is the new powerpc_vsx_ok check and that will guard against the FAIL > in the case the user forces -mno-vsx. In that case, we'll just get an UNSUPPORTED > and that is fine. > > Peter > > >