From: Jonathan Wright <Jonathan.Wright@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Richard Sandiford <Richard.Sandiford@arm.com>,
Christophe Lyon <christophe.lyon.oss@gmail.com>
Subject: [PATCH] testsuite: aarch64: Fix failing vector structure tests on big-endian
Date: Wed, 4 Aug 2021 10:05:18 +0000 [thread overview]
Message-ID: <DB9PR08MB69598A1B8E644C5DC4AB8087EBF19@DB9PR08MB6959.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAKhMtSKPkM2O=KtWH21Ez4-L9uTon4-R44t=cf+e7=LFAb_SXg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2929 bytes --]
Hi,
Recent refactoring of the arm_neon.h header enabled better code
generation for intrinsics that manipulate vector structures. New
tests were also added to verify the benefit of these changes. It now
transpires that the code generation improvements are observed only on
little-endian systems. This patch restricts the code generation tests
to little-endian targets (for now.)
Ok for master?
Thanks,
Jonathan
---
gcc/testsuite/ChangeLog:
2021-08-04 Jonathan Wright <jonathan.wright@arm.com>
* gcc.target/aarch64/vector_structure_intrinsics.c: Restrict
tests to little-endian targets.
From: Christophe Lyon <christophe.lyon.oss@gmail.com>
Sent: 03 August 2021 10:42
To: Jonathan Wright <Jonathan.Wright@arm.com>
Cc: gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>; Richard Sandiford <Richard.Sandiford@arm.com>
Subject: Re: [PATCH 1/8] aarch64: Use memcpy to copy vector tables in vqtbl[234] intrinsics
On Fri, Jul 23, 2021 at 10:22 AM Jonathan Wright via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
Hi,
This patch uses __builtin_memcpy to copy vector structures instead of
building a new opaque structure one vector at a time in each of the
vqtbl[234] Neon intrinsics in arm_neon.h. This simplifies the header file
and also improves code generation - superfluous move instructions
were emitted for every register extraction/set in this additional
structure.
Add new code generation tests to verify that superfluous move
instructions are no longer generated for the vqtbl[234] intrinsics.
Regression tested and bootstrapped on aarch64-none-linux-gnu - no
issues.
Ok for master?
Thanks,
Jonathan
---
gcc/ChangeLog:
2021-07-08 Jonathan Wright <jonathan.wright@arm.com>
* config/aarch64/arm_neon.h (vqtbl2_s8): Use __builtin_memcpy
instead of constructing __builtin_aarch64_simd_oi one vector
at a time.
(vqtbl2_u8): Likewise.
(vqtbl2_p8): Likewise.
(vqtbl2q_s8): Likewise.
(vqtbl2q_u8): Likewise.
(vqtbl2q_p8): Likewise.
(vqtbl3_s8): Use __builtin_memcpy instead of constructing
__builtin_aarch64_simd_ci one vector at a time.
(vqtbl3_u8): Likewise.
(vqtbl3_p8): Likewise.
(vqtbl3q_s8): Likewise.
(vqtbl3q_u8): Likewise.
(vqtbl3q_p8): Likewise.
(vqtbl4_s8): Use __builtin_memcpy instead of constructing
__builtin_aarch64_simd_xi one vector at a time.
(vqtbl4_u8): Likewise.
(vqtbl4_p8): Likewise.
(vqtbl4q_s8): Likewise.
(vqtbl4q_u8): Likewise.
(vqtbl4q_p8): Likewise.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/vector_structure_intrinsics.c: New test.
Hi,
This new test fails on aarch64_be:
FAIL: gcc.target/aarch64/vector_structure_intrinsics.c scan-assembler-not mov\\t
Can you check?
Thanks
Christophe
[-- Attachment #2: rb14749.patch --]
[-- Type: application/octet-stream, Size: 826 bytes --]
diff --git a/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
index 60c53bc27f8378c78b119576ed19fde0e5743894..a8e31ab85d6fd2a045c8efaf2cbc42b5f40d2411 100644
--- a/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
+++ b/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
@@ -197,7 +197,8 @@ TEST_ST1x3 (vst1q, uint64x2x3_t, uint64_t*, u64, x3);
TEST_ST1x3 (vst1q, poly64x2x3_t, poly64_t*, p64, x3);
TEST_ST1x3 (vst1q, float64x2x3_t, float64_t*, f64, x3);
-/* { dg-final { scan-assembler-not "mov\\t" } } */
+/* { dg-final { scan-assembler-not {"mov\\t"} {
+ target { aarch64_little_endian } } ) } */
/* { dg-final { scan-assembler-times "tbl\\t" 18} } */
/* { dg-final { scan-assembler-times "tbx\\t" 18} } */
next prev parent reply other threads:[~2021-08-04 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 8:21 [PATCH 1/8] aarch64: Use memcpy to copy vector tables in vqtbl[234] intrinsics Jonathan Wright
2021-07-23 9:15 ` Kyrylo Tkachov
2021-08-03 9:42 ` Christophe Lyon
2021-08-04 10:05 ` Jonathan Wright [this message]
2021-08-06 12:24 ` [PATCH] testsuite: aarch64: Fix failing vector structure tests on big-endian Richard Sandiford
2021-08-09 8:41 ` Jonathan Wright
2021-08-09 8:43 ` Richard Sandiford
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=DB9PR08MB69598A1B8E644C5DC4AB8087EBF19@DB9PR08MB6959.eurprd08.prod.outlook.com \
--to=jonathan.wright@arm.com \
--cc=Richard.Sandiford@arm.com \
--cc=christophe.lyon.oss@gmail.com \
--cc=gcc-patches@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: 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).