From patchwork Wed Jun 12 19:49:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 1947106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mfbuLqBP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vzx396LJTz20KL for ; Thu, 13 Jun 2024 05:50:12 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACE783882052 for ; Wed, 12 Jun 2024 19:50:10 +0000 (GMT) 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 264063870899 for ; Wed, 12 Jun 2024 19:49:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 264063870899 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 264063870899 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=1718221788; cv=none; b=TnTAlDgAM0PbbQhJ4QJH6YJHToJCsdLo+5a5aPzE05r1mZbYIY1VDGnD8T9Abu2rujYXYnmMrqX8a5SXBwxeUeKACTDC4srmjXAppcSW/h8pZZ3K+DHNW6LzFtR6YXsM1vH7pSCyNEJjhDyoC5Xr6m07HFjyrdN6pEC3UFg8eMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718221788; c=relaxed/simple; bh=XEOBRCwSKcUwGh9IDmAi+21TadVc6AWYBz7LbkLf/VU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=NmFxvu1pglhFdvNtfJGO1iuWcBudPzptCONz2/yrHqRDujrnl3+n+j7iyipqtZOqvsZHIjISq+T51Jw2q7YuJIRyXx9+oTWdN3O8Fhov85+9bHiVkAx5UTMPwfXTF3IOHVUFlEhBMnPFNrCKCCQkLf4QVYgUKemiacAnx2VQPFM= 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.18.1.2/8.18.1.2) with ESMTP id 45CJSh0F020284; Wed, 12 Jun 2024 19:49:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h= message-id:date:mime-version:to:cc:from:subject:content-type :content-transfer-encoding; s=pp1; bh=emOcQQ6i+Jl4NCn+PEXJWDHG6m Nq3yfuLkndeCUcNwE=; b=mfbuLqBPhPKhspRIz3FQ+eY4r8cBqt6pEw4MYcZm/T s4f/3+1xhjmS1pt9NzNn1O9vlEwvc+BoxWMer+iZK2idPspgbtf+ne3BXCjF59ht jWKJpXKN3OaNB4ccuS+zxU8XRruj11jFiv+X28L5N2ZgaFrRYjTRdo8TmeOHnljJ 0ObRgoRDOjk2le2tWEwK38vvaj7K4PJFB2y/dgi3idbVo3ohtIyni8zzLI0Kkqmr Lwsx1deEL6MmiwdN9J8pTOFodclHclwT8ADu7Mch0ZzqirsvbV7ujQ0ABcZ4JMx9 vHxMzCuCKuEwxcrXNH0l3WVeirF/sW0N1n/XQjHIL3nA== 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 3yqhv0r1h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 19:49:45 +0000 (GMT) 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 45CIuq9f003886; Wed, 12 Jun 2024 19:49:44 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yn2mq136d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 19:49:44 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45CJnffQ17236620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2024 19:49:43 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 291825805A; Wed, 12 Jun 2024 19:49:41 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C866A58052; Wed, 12 Jun 2024 19:49:40 +0000 (GMT) Received: from [9.61.28.160] (unknown [9.61.28.160]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Jun 2024 19:49:40 +0000 (GMT) Message-ID: Date: Wed, 12 Jun 2024 14:49:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Segher Boessenkool , "Kewen.Lin" Cc: GCC Patches From: Peter Bergner Subject: [PATCH] testsuite: Fix pr66144-3.c test to accept multiple equivalent insns. [PR115262] X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 0Pyv570IUEykYbdzTrdjS5Nycvn90znl X-Proofpoint-ORIG-GUID: 0Pyv570IUEykYbdzTrdjS5Nycvn90znl 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_10,2024-06-12_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=999 phishscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 adultscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406120137 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_H3, 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 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: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org testsuite: Fix pr66144-3.c test to accept multiple equivalent insns. [PR115262] Jeff's commit r15-831-g05daf617ea22e1 changed the instruction we expected for this test case into an equivalent instruction. Modify the test case so it will accept any of three equivalent instructions we could get depending on the options used. I've verified this test case PASSes on all scenarios where the three possible instructions are generated. Ok for trunk? Peter 2024-06-12 Peter Bergner gcc/testsuite/ PR testsuite/115262 * gcc.target/powerpc/pr66144-3.c: Add -fno-unroll-loops to options. (scan-assembler): Change from this... (scan-assembler-times): ...to this. Tweak regex to accept multiple equivalent instructions. diff --git a/gcc/testsuite/gcc.target/powerpc/pr66144-3.c b/gcc/testsuite/gcc.target/powerpc/pr66144-3.c index 4c93b2a7a3d..dbd746c5489 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-options "-mdejagnu-cpu=power8 -mvsx -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} } } */