* [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
@ 2020-11-02 9:01 Andrea Corallo
2020-11-03 10:31 ` Kyrylo Tkachov
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Corallo @ 2020-11-02 9:01 UTC (permalink / raw)
To: gcc-patches; +Cc: Kyrylo Tkachov, Richard Earnshaw, nd
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
Hi all,
Forth patch of the serie here adding vst1_bf16, vst1q_bf16 bfloat16
related neon intrinsics.
Please see refer to:
ACLE <https://developer.arm.com/docs/101028/latest>
ISA <https://developer.arm.com/docs/ddi0596/latest>
Regtested and bootstrapped.
Thanks!
Andrea
gcc/ChangeLog
2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
* config/arm/arm_neon.h (vst1_bf16, vst1q_bf16): Add intrinsics.
* config/arm/arm_neon_builtins.def : Touch for:
__builtin_neon_vst1v4bf, __builtin_neon_vst1v8bf.
gcc/testsuite/ChangeLog
2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
* gcc.target/arm/simd/vst1_bf16_1.c: New test.
[-- Attachment #2: 0004-arm-Add-vst1_bf16-vst1q_bf16-intrinsics.patch --]
[-- Type: text/plain, Size: 3420 bytes --]
From e7b261dcab943401bac777ed3149bd6c5e9b3599 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Thu, 29 Oct 2020 15:11:37 +0100
Subject: [PATCH 4/6] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
gcc/ChangeLog
2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
* config/arm/arm_neon.h (vst1_bf16, vst1q_bf16): Add intrinsics.
* config/arm/arm_neon_builtins.def : Touch for:
__builtin_neon_vst1v4bf, __builtin_neon_vst1v8bf.
gcc/testsuite/ChangeLog
2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
* gcc.target/arm/simd/vst1_bf16_1.c: New test.
---
gcc/config/arm/arm_neon.h | 14 +++++++++
gcc/config/arm/arm_neon_builtins.def | 5 ++--
.../gcc.target/arm/simd/vst1_bf16_1.c | 29 +++++++++++++++++++
3 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/arm/simd/vst1_bf16_1.c
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index b77175eaa3e..24aad3370f6 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -19509,6 +19509,20 @@ vbfmlaltq_laneq_f32 (float32x4_t __r, bfloat16x8_t __a, bfloat16x8_t __b,
return __builtin_neon_vfmat_laneqv8bf (__r, __a, __b, __index);
}
+__extension__ extern __inline void
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+vst1_bf16 (bfloat16_t * __a, bfloat16x4_t __b)
+{
+ __builtin_neon_vst1v4bf (__a, __b);
+}
+
+__extension__ extern __inline void
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+vst1q_bf16 (bfloat16_t * __a, bfloat16x8_t __b)
+{
+ __builtin_neon_vst1v8bf (__a, __b);
+}
+
__extension__ extern __inline void
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vst2_bf16 (bfloat16_t * __ptr, bfloat16x4x2_t __val)
diff --git a/gcc/config/arm/arm_neon_builtins.def b/gcc/config/arm/arm_neon_builtins.def
index 07eda44cc58..e3ab6281497 100644
--- a/gcc/config/arm/arm_neon_builtins.def
+++ b/gcc/config/arm/arm_neon_builtins.def
@@ -317,8 +317,9 @@ VAR12 (LOAD1LANE, vld1_lane,
v8qi, v4hi, v2si, v2sf, di, v16qi, v8hi, v4si, v4sf, v2di, v4bf, v8bf)
VAR10 (LOAD1, vld1_dup,
v8qi, v4hi, v2si, v2sf, di, v16qi, v8hi, v4si, v4sf, v2di)
-VAR12 (STORE1, vst1,
- v8qi, v4hi, v4hf, v2si, v2sf, di, v16qi, v8hi, v8hf, v4si, v4sf, v2di)
+VAR14 (STORE1, vst1,
+ v8qi, v4hi, v4hf, v2si, v2sf, di, v16qi, v8hi, v8hf, v4si, v4sf, v2di,
+ v4bf, v8bf)
VAR14 (STORE1LANE, vst1_lane,
v8qi, v4hi, v4hf, v2si, v2sf, di, v16qi, v8hi, v8hf, v4si, v4sf, v2di, v4bf, v8bf)
VAR13 (LOAD1, vld2,
diff --git a/gcc/testsuite/gcc.target/arm/simd/vst1_bf16_1.c b/gcc/testsuite/gcc.target/arm/simd/vst1_bf16_1.c
new file mode 100644
index 00000000000..06fb58ecd79
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/simd/vst1_bf16_1.c
@@ -0,0 +1,29 @@
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
+/* { dg-add-options arm_v8_2a_bf16_neon } */
+/* { dg-additional-options "-save-temps -O2 -mfloat-abi=hard" } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+#include "arm_neon.h"
+
+/*
+**test_vst1_bf16:
+** vst1.16 {d0}, \[r0\]
+** bx lr
+*/
+void
+test_vst1_bf16 (bfloat16_t *a, bfloat16x4_t b)
+{
+ vst1_bf16 (a, b);
+}
+
+/*
+**test_vst1q_bf16:
+** vst1.16 {d0-d1}, \[r0\]
+** bx lr
+*/
+void
+test_vst1q_bf16 (bfloat16_t *a, bfloat16x8_t b)
+{
+ vst1q_bf16 (a, b);
+}
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
2020-11-02 9:01 [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics Andrea Corallo
@ 2020-11-03 10:31 ` Kyrylo Tkachov
2020-11-03 11:00 ` Andrea Corallo
0 siblings, 1 reply; 4+ messages in thread
From: Kyrylo Tkachov @ 2020-11-03 10:31 UTC (permalink / raw)
To: Andrea Corallo, gcc-patches; +Cc: Richard Earnshaw, nd
Hi Andrea,
> -----Original Message-----
> From: Andrea Corallo <Andrea.Corallo@arm.com>
> Sent: 02 November 2020 09:02
> To: gcc-patches@gcc.gnu.org
> Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; Richard Earnshaw
> <Richard.Earnshaw@arm.com>; nd <nd@arm.com>
> Subject: [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
>
> Hi all,
>
> Forth patch of the serie here adding vst1_bf16, vst1q_bf16 bfloat16
> related neon intrinsics.
>
> Please see refer to:
> ACLE <https://developer.arm.com/docs/101028/latest>
> ISA <https://developer.arm.com/docs/ddi0596/latest>
>
> Regtested and bootstrapped.
>
> Thanks!
>
> Andrea
>
> gcc/ChangeLog
>
> 2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
>
> * config/arm/arm_neon.h (vst1_bf16, vst1q_bf16): Add intrinsics.
> * config/arm/arm_neon_builtins.def : Touch for:
> __builtin_neon_vst1v4bf, __builtin_neon_vst1v8bf.
>
I see this patch also has the hunk:
diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index 33e8015b140..6dc5df93216 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -946,6 +946,9 @@ typedef struct {
#define VAR13(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
VAR12 (T, N, A, B, C, D, E, F, G, H, I, J, K, L) \
VAR1 (T, N, M)
+#define VAR14(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M, O) \
+ VAR13 (T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
+ VAR1 (T, N, O)
/* The builtin data can be found in arm_neon_builtins.def, arm_vfp_builtins.def
and arm_acle_builtins.def. The entries in arm_neon_builtins.def require
That is a duplicate from a previous patch in the series and doesn't appear in the ChangeLog here.
I think it's in here by mistake?
Otherwise ok.
Thanks,
Kyrill
> gcc/testsuite/ChangeLog
>
> 2020-10-29 Andrea Corallo <andrea.corallo@arm.com>
>
> * gcc.target/arm/simd/vst1_bf16_1.c: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
2020-11-03 10:31 ` Kyrylo Tkachov
@ 2020-11-03 11:00 ` Andrea Corallo
2020-11-03 11:14 ` Kyrylo Tkachov
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Corallo @ 2020-11-03 11:00 UTC (permalink / raw)
To: Kyrylo Tkachov; +Cc: gcc-patches, Richard Earnshaw, nd
Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> writes:
[...]
> I see this patch also has the hunk:
> diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
> index 33e8015b140..6dc5df93216 100644
> --- a/gcc/config/arm/arm-builtins.c
> +++ b/gcc/config/arm/arm-builtins.c
> @@ -946,6 +946,9 @@ typedef struct {
> #define VAR13(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
> VAR12 (T, N, A, B, C, D, E, F, G, H, I, J, K, L) \
> VAR1 (T, N, M)
> +#define VAR14(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M, O) \
> + VAR13 (T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
> + VAR1 (T, N, O)
>
> /* The builtin data can be found in arm_neon_builtins.def, arm_vfp_builtins.def
> and arm_acle_builtins.def. The entries in arm_neon_builtins.def require
>
> That is a duplicate from a previous patch in the series and doesn't appear in the ChangeLog here.
> I think it's in here by mistake?
> Otherwise ok.
> Thanks,
> Kyrill
Hi Kyrill,
thanks for reviewing this.
Unless I'm wrong I see this hunk present in 3/x but not in 4/x.
Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
2020-11-03 11:00 ` Andrea Corallo
@ 2020-11-03 11:14 ` Kyrylo Tkachov
0 siblings, 0 replies; 4+ messages in thread
From: Kyrylo Tkachov @ 2020-11-03 11:14 UTC (permalink / raw)
To: Andrea Corallo; +Cc: gcc-patches, Richard Earnshaw, nd
> -----Original Message-----
> From: Andrea Corallo <Andrea.Corallo@arm.com>
> Sent: 03 November 2020 11:01
> To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Cc: gcc-patches@gcc.gnu.org; Richard Earnshaw
> <Richard.Earnshaw@arm.com>; nd <nd@arm.com>
> Subject: Re: [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics
>
> Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> writes:
> [...]
> > I see this patch also has the hunk:
> > diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
> > index 33e8015b140..6dc5df93216 100644
> > --- a/gcc/config/arm/arm-builtins.c
> > +++ b/gcc/config/arm/arm-builtins.c
> > @@ -946,6 +946,9 @@ typedef struct {
> > #define VAR13(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
> > VAR12 (T, N, A, B, C, D, E, F, G, H, I, J, K, L) \
> > VAR1 (T, N, M)
> > +#define VAR14(T, N, A, B, C, D, E, F, G, H, I, J, K, L, M, O) \
> > + VAR13 (T, N, A, B, C, D, E, F, G, H, I, J, K, L, M) \
> > + VAR1 (T, N, O)
> >
> > /* The builtin data can be found in arm_neon_builtins.def,
> arm_vfp_builtins.def
> > and arm_acle_builtins.def. The entries in arm_neon_builtins.def require
> >
> > That is a duplicate from a previous patch in the series and doesn't appear
> in the ChangeLog here.
> > I think it's in here by mistake?
> > Otherwise ok.
> > Thanks,
> > Kyrill
>
> Hi Kyrill,
>
> thanks for reviewing this.
>
> Unless I'm wrong I see this hunk present in 3/x but not in 4/x.
Ah, you're right, I confused my views.
I need a better editor...
This is ok,
Kyrill
>
> Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-03 11:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 9:01 [PATCH 4/x] arm: Add vst1_bf16 + vst1q_bf16 intrinsics Andrea Corallo
2020-11-03 10:31 ` Kyrylo Tkachov
2020-11-03 11:00 ` Andrea Corallo
2020-11-03 11:14 ` Kyrylo Tkachov
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).