From patchwork Thu May 16 04:05:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1935794 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=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HujuFkAX; 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 4VfxNl41ztz20KF for ; Thu, 16 May 2024 14:06:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 68F7D3849AF5 for ; Thu, 16 May 2024 04:06:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by sourceware.org (Postfix) with ESMTPS id 8D2AE384AB45 for ; Thu, 16 May 2024 04:05:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D2AE384AB45 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D2AE384AB45 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715832358; cv=none; b=sPTFkYu90k4/0dydLUbNT5coqiRrj9/sC+UsTYtBtTAwktZZTl62DlsmI+BLLN9q1eT3g8hBoxc/Y69YH5lASvngh2iaPKV5w47xXZkhVYM0OCOJoBtJLjbN2GQUZ1xVTQCMOe2o2PuK/xoTjlAlGJnYpfL6BxquWMNyq7vv01I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715832358; c=relaxed/simple; bh=p/iK8fYM1+EwDicUUtj/HcArWnO8G3qYkcfn2So+kzo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=q6E1MwmycGD1cIWG/agCXwEplsR72/qNsEXLv4rVglHnWzrnVtbT3ot+xu8h/yohYCafv19njyh9FkwOPSpAxsGxJRiKThwUjpPOOjT4SLFjTeVyMcnSRuK+JLrn67tmV5BlLWtc7OTpSwZc/xEKavzChDYjN+L1fLCH68BQDmo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715832352; x=1747368352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p/iK8fYM1+EwDicUUtj/HcArWnO8G3qYkcfn2So+kzo=; b=HujuFkAX3fVVhisW73YEHYwQgCb3UYcsSXGq3Vnr9VjjzWKsLPBpPHtx gOqI8YiH+lcGgp/b2z92zg+veg1YSa+ZlOwlrEot2Bh2buXPSoY1vw1b9 y3hPU0r5/wPSq0OyZ47hvZ36d8+LkJdEMYc6teuBLKWrHme/MSl8cdLlT 9xLb+bMHthDNuKbhI9caRG5UHSJ7IGqrlB0CU4zgVLIRTlRveFUPSDP+w 42xA5BGHZdes+N6JtA0y2a1QuvfWKqXg+TUfB8SY6nGj5PVa3anOkpjJP /ZTUyv7/Q65rlPrDa8nP+lxKJvjBHhxAiDA/Q6Tr1iT4bRPpVP6zO/9y7 w==; X-CSE-ConnectionGUID: J47RNpyTRo22KdoteNpovA== X-CSE-MsgGUID: 3iQyCCkFRouURZTNUKMySg== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="37297993" X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="37297993" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2024 21:05:48 -0700 X-CSE-ConnectionGUID: rqOLHlXUR/qmzhfZCrTLgQ== X-CSE-MsgGUID: /NWy9rt3RomXkPRLbgslhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="68736870" Received: from shvmail02.sh.intel.com ([10.239.244.9]) by orviesa001.jf.intel.com with ESMTP; 15 May 2024 21:05:47 -0700 Received: from pli-ubuntu.sh.intel.com (pli-ubuntu.sh.intel.com [10.239.159.47]) by shvmail02.sh.intel.com (Postfix) with ESMTP id AAEBA100727B; Thu, 16 May 2024 12:05:45 +0800 (CST) From: pan2.li@intel.com To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, tamar.christina@arm.com, richard.guenther@gmail.com, Richard.Sandiford@arm.com, Pan Li Subject: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite Date: Thu, 16 May 2024 12:05:42 +0800 Message-Id: <20240516040542.2734412-3-pan2.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240516040542.2734412-1-pan2.li@intel.com> References: <20240516040542.2734412-1-pan2.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, 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 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 From: Pan Li After we supported vectorizable early exit in RISC-V, we would like to enable the gcc vect test for vectorizable early test. The vect-early-break_124-pr114403.c failed to vectorize for now. Because that the __builtin_memcpy with 8 bytes failed to folded into int64 assignment during ccp1. We will improve that first and mark this as xfail for RISC-V. The below tests are passed for this patch: 1. The riscv fully regression tests. gcc/testsuite/ChangeLog: * gcc.dg/vect/slp-mask-store-1.c: Add pragma novector as it will have 2 times LOOP VECTORIZED in RISC-V. * gcc.dg/vect/vect-early-break_124-pr114403.c: Xfail for the riscv backend. * lib/target-supports.exp: Add RISC-V backend. Signed-off-by: Pan Li Signed-off-by: Pan Li --- gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c | 2 +- gcc/testsuite/lib/target-supports.exp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c b/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c index fdd9032da98..2f80bf89e5e 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c +++ b/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c @@ -28,6 +28,8 @@ main () if (__builtin_memcmp (x, res, sizeof (x)) != 0) abort (); + +#pragma GCC novector for (int i = 0; i < 32; ++i) if (flag[i] != 0 && flag[i] != 1) abort (); diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c index 51abf245ccb..101ae1e0eaa 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_early_break_hw } */ /* { dg-require-effective-target vect_long_long } */ -/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */ +/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { xfail riscv*-*-* } } } */ #include "tree-vect.h" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 6f5d477b128..ec9baa4f32a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -4099,6 +4099,7 @@ proc check_effective_target_vect_early_break { } { || [check_effective_target_arm_v8_neon_ok] || [check_effective_target_sse4] || [istarget amdgcn-*-*] + || [check_effective_target_riscv_v] }}] } @@ -4114,6 +4115,7 @@ proc check_effective_target_vect_early_break_hw { } { || [check_effective_target_arm_v8_neon_hw] || [check_sse4_hw_available] || [istarget amdgcn-*-*] + || [check_effective_target_riscv_v_ok] }}] }