From: Li Xu <xuli1@eswincomputing.com>
To: gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com,
tamar.christina@arm.com, richard.guenther@gmail.com,
Richard.Sandiford@arm.com, juzhe.zhong@rivai.ai,
zhengyu@eswincomputing.com, pan2.li@intel.com,
xuli <xuli1@eswincomputing.com>
Subject: [PATCH] RISC-V: Enable vectorization for vect-early-break_124-pr114403.c
Date: Mon, 20 May 2024 07:59:15 +0000 [thread overview]
Message-ID: <20240520075915.5538-1-xuli1@eswincomputing.com> (raw)
From: xuli <xuli1@eswincomputing.com>
Because "targetm.slow_unaligned_access" is set to true by default
(aka -mtune=rocket) for RISC-V, it causes the __builtin_memcpy with
8 bytes failed to folded into int64 assignment during ccp1.
So adding "-mtune=generic-ooo" to the RISC-V target can vectorize
vect-early-break_124-pr114403.c.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-early-break_124-pr114403.c: Enable vectrization for RISC-V target.
---
gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 101ae1e0eaa..610b951b262 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
@@ -1,8 +1,9 @@
/* { dg-add-options vect_early_break } */
/* { dg-require-effective-target vect_early_break_hw } */
/* { dg-require-effective-target vect_long_long } */
+/* { dg-additional-options "-mtune=generic-ooo" { target riscv*-*-* } } */
-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { xfail riscv*-*-* } } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
#include "tree-vect.h"
@@ -74,4 +75,3 @@ int main ()
return 0;
}
-
--
2.17.1
next reply other threads:[~2024-05-20 8:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 7:59 Li Xu [this message]
2024-05-20 8:15 ` juzhe.zhong
2024-05-21 14:58 ` Robin Dapp
2024-05-22 0:59 ` Li Xu
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=20240520075915.5538-1-xuli1@eswincomputing.com \
--to=xuli1@eswincomputing.com \
--cc=Richard.Sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pan2.li@intel.com \
--cc=richard.guenther@gmail.com \
--cc=tamar.christina@arm.com \
--cc=zhengyu@eswincomputing.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).