public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: HaoChen Gui <guihaoc@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-7793] rs6000: call vector load/store with length only on 64-bit Power10 Date: Tue, 12 Sep 2023 01:54:30 +0000 (GMT) [thread overview] Message-ID: <20230912015430.63FC73858D38@sourceware.org> (raw) https://gcc.gnu.org/g:f4358054dbaf7fb361e603e3693d9410312b88e7 commit r13-7793-gf4358054dbaf7fb361e603e3693d9410312b88e7 Author: Haochen Gui <guihaoc@gcc.gnu.org> Date: Tue Sep 12 09:54:03 2023 +0800 rs6000: call vector load/store with length only on 64-bit Power10 gcc/ PR target/96762 * config/rs6000/rs6000-string.cc (expand_block_move): Call vector load/store with length only on 64-bit Power10. gcc/testsuite/ PR target/96762 * gcc.target/powerpc/pr96762.c: New. (cherry picked from commit 946b8967b905257ac9f140225db744c9a6ab91be) Diff: --- gcc/config/rs6000/rs6000-string.cc | 14 ++++++++++---- gcc/testsuite/gcc.target/powerpc/pr96762.c | 13 +++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc index 75e6f8803a5c..44a946cd4536 100644 --- a/gcc/config/rs6000/rs6000-string.cc +++ b/gcc/config/rs6000/rs6000-string.cc @@ -2811,11 +2811,17 @@ expand_block_move (rtx operands[], bool might_overlap) gen_func.mov = gen_vsx_movv2di_64bit; } else if (TARGET_BLOCK_OPS_UNALIGNED_VSX - && TARGET_POWER10 && bytes < 16 + /* Only use lxvl/stxvl on 64bit POWER10. */ + && TARGET_POWER10 + && TARGET_64BIT + && bytes < 16 && orig_bytes > 16 - && !(bytes == 1 || bytes == 2 - || bytes == 4 || bytes == 8) - && (align >= 128 || !STRICT_ALIGNMENT)) + && !(bytes == 1 + || bytes == 2 + || bytes == 4 + || bytes == 8) + && (align >= 128 + || !STRICT_ALIGNMENT)) { /* Only use lxvl/stxvl if it could replace multiple ordinary loads+stores. Also don't use it unless we likely already diff --git a/gcc/testsuite/gcc.target/powerpc/pr96762.c b/gcc/testsuite/gcc.target/powerpc/pr96762.c new file mode 100644 index 000000000000..a59deb427386 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr96762.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ + +/* Verify there is no ICE on ilp32 env. */ + +extern void foo (char *); + +void +bar (void) +{ + char zj[] = "XXXXXXXXXXXXXXXX"; + foo (zj); +}
reply other threads:[~2023-09-12 1:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230912015430.63FC73858D38@sourceware.org \ --to=guihaoc@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).