public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
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 <pan2.li@intel.com>
Subject: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite
Date: Thu, 16 May 2024 12:05:42 +0800	[thread overview]
Message-ID: <20240516040542.2734412-3-pan2.li@intel.com> (raw)
In-Reply-To: <20240516040542.2734412-1-pan2.li@intel.com>

From: Pan Li <pan2.li@intel.com>

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 <pan2.li@intel.com>
---
 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]
 	}}]
 }
 
-- 
2.34.1


  parent reply	other threads:[~2024-05-16  4:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16  4:05 [PATCH v2 1/3] Vect: Support loop len in vectorizable early exit pan2.li
2024-05-16  4:05 ` [PATCH v2 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len pan2.li
2024-05-16 12:19   ` juzhe.zhong
2024-05-16 13:44     ` Li, Pan2
2024-05-16  4:05 ` pan2.li [this message]
2024-05-16 12:19   ` [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite juzhe.zhong
2024-05-16 13:44     ` Li, Pan2
2024-05-16  6:49 ` [PATCH v2 1/3] Vect: Support loop len in vectorizable early exit Tamar Christina
2024-05-16 12:13   ` Richard Biener
2024-05-16 12:27     ` Li, Pan2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240516040542.2734412-3-pan2.li@intel.com \
    --to=pan2.li@intel.com \
    --cc=Richard.Sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=tamar.christina@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).