From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id DDC153882058 for ; Thu, 13 Jun 2024 00:02:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DDC153882058 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 DDC153882058 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=1718236959; cv=none; b=rGR+3kuCevTSwxHmA5pcvyAo0jxK4uD5PYWFCyKWgSUvlZci/hf5zAM9dtxaHxduUG3DxgLYTud4eKIFUNvQU7El/TDTzMekitwQysWCpGe5AWL+xiJsEINKVu5pJMqhsjY8miulHiI4h43hXhXs9grq8Zop8hBSKKZQ77/0DGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718236959; c=relaxed/simple; bh=s9PxH8ZgWnPkid8Wn0K4/ywVFuf6/kz3d3T0MNW5yjI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=GUKenFQFDm7QlSUV508GyP+E4PwC6zzsZmk+tsj9U3DT129SZhCYSDYyVLJJHUcZPfMZaYM1QynRPhgPfLD8IbUDKhxrnrYcL8T/ukEzoajQLgO+epnbvjFTtWywNVs6Vq4syM2g/du1CNxdol+7jQ3qAWQtLzD11+BtLpnOxOk= 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.18.1.2/8.18.1.2) with ESMTP id 45D00BtA030970; Thu, 13 Jun 2024 00:02:36 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=V s1jKQ2Yss2F5iKJ5yr20U+UjMZQt02iE9Zpi8mYVgA=; b=T83rE4dPNaGx/+Q/+ Uz31pzvfx9eD093e6of5Pm1M/+rj95gP4BzAoum6DeUNsYP/bzaraIoqpEs+/tku n3MF5+In9Pz2Xbm6eP+BFsvNOGLbeodoaXBg31CR/UKxc80GB8IX21Fl6ZZuydgS hGK85eOJT3nd3lb4WF3ke035ib8HgQSjMzOpEJHtiHnA01tcTsc5H5YoTVNXvjx5 PQSjwwqgQmqxreus4iv7r6nb7lXICCSjCiZhT5+9O/T9zO+wZpWqBsiZvagDk3H3 wz5KaqYmO7MwnpYz110kFZdPf1wXxMjAA7Ml7Xdav0fuQTmZzym4AQyOEGT5aUzD hISpA== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yqntyg062-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 00:02:36 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45CNRAIB027246; Thu, 13 Jun 2024 00:02:35 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yn2112kht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 00:02:35 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45D02WO640960484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jun 2024 00:02:34 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 013AC5806D; Thu, 13 Jun 2024 00:02:32 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A6D8458066; Thu, 13 Jun 2024 00:02:31 +0000 (GMT) Received: from [9.61.28.160] (unknown [9.61.28.160]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 13 Jun 2024 00:02:31 +0000 (GMT) Message-ID: Date: Wed, 12 Jun 2024 19:02:31 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] testsuite: Fix pr66144-3.c test to accept multiple equivalent insns. [PR115262] To: Segher Boessenkool Cc: "Kewen.Lin" , GCC Patches References: <20240612200002.GH19790@gate.crashing.org> Content-Language: en-US From: Peter Bergner In-Reply-To: <20240612200002.GH19790@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: PDzxiNOuesmxF3HzedfhqiWLTfsMgJiK X-Proofpoint-ORIG-GUID: PDzxiNOuesmxF3HzedfhqiWLTfsMgJiK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-12_11,2024-06-12_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 adultscore=0 bulkscore=0 impostorscore=0 mlxlogscore=986 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406120171 X-Spam-Status: No, score=-10.7 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,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 6/12/24 3:00 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Jun 12, 2024 at 02:49:40PM -0500, Peter Bergner wrote: >> testsuite: Fix pr66144-3.c test to accept multiple equivalent insns. [PR115262] > > ("rs6000:", not "testsuite") Done. >> /* { dg-do compile { target { powerpc64*-*-* } } } */ > > Probably should be an "lp64" instead? Actually, there is nothing inherently 64-bit about the test case. I removed the target test altogether and it executes just fine on our BE system in both 32-bit and 64-bit modes, so I'll just drop the target test as part of the patch. >> -/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2 -ftree-vectorize" } */ >> +/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2 -ftree-vectorize -fno-unroll-loops" } */ > > The "-mvsx" is superfluous btw (implied by -mcpu=power8). Ok, I removed -mvsx since I'm touching the line already. >> /* { dg-require-effective-target powerpc_vsx } */ > > This isn't needed either. Maybe not strictly needed, but it shields us from users who force some options to be used via RUNTESTFLAGS env var that can cause the test case to FAIL. I'm going to leave this for someone else to clean up. >> -/* { dg-final { scan-assembler {\mvcmpequw\M} } } */ >> -/* { dg-final { scan-assembler {\mxxsel\M} } } */ >> +/* { dg-final { scan-assembler-times {\mvcmpequw\M} 1 } } */ >> +/* { dg-final { scan-assembler-times {\m(?:xxsel|xxlor|vor)\M} 1 } } */ >> /* { dg-final { scan-assembler-not {\mvspltisw\M} } } */ >> /* { dg-final { scan-assembler-not {\mxxlorc\M} } } */ > > Okido, thanks! The three trivial tweaks I suggest here are okay as > well if you want, after testing of course ;-) Thanks. For completeness, the final patch looks like the following. Peter gcc/testsuite/ PR testsuite/115262 * gcc.target/powerpc/pr66144-3.c (dg-do): Compile for all targets. (dg-options): Add -fno-unroll-loops and remove -mvsx. (scan-assembler): Change from this... (scan-assembler-times): ...to this. Tweak regex to accept multiple allowable instructions. --- gcc/testsuite/gcc.target/powerpc/pr66144-3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/pr66144-3.c b/gcc/testsuite/gcc.target/powerpc/pr66144-3.c index 4c93b2a7a3d..14ecb809edc 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr66144-3.c +++ b/gcc/testsuite/gcc.target/powerpc/pr66144-3.c @@ -1,5 +1,5 @@ -/* { dg-do compile { target { powerpc64*-*-* } } } */ -/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2 -ftree-vectorize" } */ +/* { dg-do compile } */ +/* { dg-options "-mdejagnu-cpu=power8 -O2 -ftree-vectorize -fno-unroll-loops" } */ /* { dg-require-effective-target powerpc_vsx } */ /* Verify that we can optimize a vector conditional move, where one of the arms @@ -20,7 +20,7 @@ test (void) a[i] = (b[i] == c[i]) ? -1 : a[i]; } -/* { dg-final { scan-assembler {\mvcmpequw\M} } } */ -/* { dg-final { scan-assembler {\mxxsel\M} } } */ +/* { dg-final { scan-assembler-times {\mvcmpequw\M} 1 } } */ +/* { dg-final { scan-assembler-times {\m(?:xxsel|xxlor|vor)\M} 1 } } */ /* { dg-final { scan-assembler-not {\mvspltisw\M} } } */ /* { dg-final { scan-assembler-not {\mxxlorc\M} } } */