From patchwork Thu Sep 5 08:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Levy Hsu X-Patchwork-Id: 97137 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D32923850200 for ; Thu, 5 Sep 2024 08:57:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from out28-69.mail.aliyun.com (out28-69.mail.aliyun.com [115.124.28.69]) by sourceware.org (Postfix) with ESMTPS id 564563860C34 for ; Thu, 5 Sep 2024 08:57:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 564563860C34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=levyhsu.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=levyhsu.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 564563860C34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=115.124.28.69 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725526648; cv=none; b=IB4llb4fuYumT0BvRHNj39mcsb4llslALTSNAf8ECteLbZrHO/TmK5qglPiU+a1TAbagITah7ska/8XyP/lh98K29YsFP+Fm0bqTZpai+t38FsJST2N/rZbZrB6AiRI849kPOyQRVPFufEbyg9YEtcMoSFRLwJbr5e9+Pp1z1I4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725526648; c=relaxed/simple; bh=/qgf5TvbjeIwHc2mUAPhgRZAalb5VKne2qhUYLUD4/g=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eBq0C9Gu2aL6Rm9Bu0u9uWHi51EoRKBIGY0UnN8b5RofyXMC5+l6az7l+wT8ZuxwEM2v8ABvzT6jpvFUqQtrjX/H0vJvsNax2Krq1rlDPTphWTdrM7HUUiyiyFpDUG3pl4XRtlgxFaflnn59nP+ECkJ+fZcMbjFvrCqYPjfDal8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=levyhsu.com; s=default; t=1725526631; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=Lo9l9SNjd1TYOBq6RjLsda0ZdNowR3i+Vj9jeEAnRM8=; b=P8QTUQbACmeoREY3WZ5jgTcDk5uHc3cIunfh8lK2DOMDDaKsFg49cMDhTjzn5T9w3qf3iH9nflmAUMWBvEZE3iFoF/5KOd7jgjsj8VimElWovMeHeLK+kLMf9ddNh9rz2qCtBFmcHAxXj4ucFM93vu9WmaB5tDyj6VqXW6RCiL27nBUHccuyZx4uT53CvDaut5Yl79eLpNI4Mjfy7SmxUOiTU2uXxM+yMwNZKFH+D+O1bAp703Kqo2Hi2NQ9ogg2lo/wNWS6D8NkP+1dnXe1wN9s5/chdvphHHbj0AKYaIVMBpTYL8NjKjj3EuwqxdPe7hE1CjAm5mWiuu0euT3OpQ== Received: from ip-10-0-136-122.us-west-2.compute.internal(mailfrom:admin@levyhsu.com fp:SMTPD_---.ZBlFkv7_1725526619) by smtp.aliyun-inc.com; Thu, 05 Sep 2024 16:57:02 +0800 From: Levy Hsu To: gcc-patches@gcc.gnu.org Cc: admin@levyhsu.com, liwei.xu@intel.com, crazylht@gmail.com, ubizjak@gmail.com Subject: [PATCH] x86: Refine V4BF/V2BF FMA testcase Date: Thu, 5 Sep 2024 08:55:09 +0000 Message-ID: <20240905085655.1918785-1-admin@levyhsu.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, TXREP, T_SCC_BODY_TEXT_LINE, T_SPF_PERMERROR, UNPARSEABLE_RELAY 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~patchwork=sourceware.org@gcc.gnu.org Simple testcase fix, ok for trunk? This patch removes specific register checks to account for possible register spills and disables tests in 32-bit mode. This adjustment is necessary because V4BF operations in 32-bit mode require duplicating instructions, which lead to unintended test failures. It fixed the case when testing with --target_board='unix{-m32\ -march=cascadelake}' gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c: Remove specific register checks to account for potential register spills. Exclude tests in 32-bit mode to prevent incorrect failure reports due to the need for multiple instruction executions in handling V4BF operations. --- .../gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c index 72e17e99603..17c32c1d36b 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-mavx10.2 -O2" } */ -/* { dg-final { scan-assembler-times "vfmadd132nepbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */ -/* { dg-final { scan-assembler-times "vfmsub132nepbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */ -/* { dg-final { scan-assembler-times "vfnmadd132nepbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */ -/* { dg-final { scan-assembler-times "vfnmsub132nepbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */ +/* { dg-final { scan-assembler-times "vfmadd132nepbf16\[^\n\r\]*xmm\[0-9\]" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vfmsub132nepbf16\[^\n\r\]*xmm\[0-9\]" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vfnmadd132nepbf16\[^\n\r\]*xmm\[0-9\]" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vfnmsub132nepbf16\[^\n\r\]*xmm\[0-9\]" 2 { target { ! ia32 } } } } */ typedef __bf16 v4bf __attribute__ ((__vector_size__ (8))); typedef __bf16 v2bf __attribute__ ((__vector_size__ (4)));