public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics
@ 2020-12-03 10:50 Prathamesh Kulkarni
  2020-12-03 11:20 ` Kyrylo Tkachov
  0 siblings, 1 reply; 5+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-03 10:50 UTC (permalink / raw)
  To: gcc Patches, Kyrill Tkachov

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

Hi,
This patch replaces calls to __builtin_neon_vcreate* builtins for
vcreate intrinsics in arm_neon.h.
Cross-tested on arm*-*-*.
OK to commit ?

Thanks,
Prathamesh

[-- Attachment #2: vcreate-1.diff --]
[-- Type: application/octet-stream, Size: 3087 bytes --]

diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 9569e1a4c9c..49195fdb4cc 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -6539,28 +6539,28 @@ __extension__ extern __inline int8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s8 (uint64_t __a)
 {
-  return (int8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (int8x8_t) __a;
 }
 
 __extension__ extern __inline int16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s16 (uint64_t __a)
 {
-  return (int16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (int16x4_t) __a;
 }
 
 __extension__ extern __inline int32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s32 (uint64_t __a)
 {
-  return (int32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a);
+  return (int32x2_t) __a;
 }
 
 __extension__ extern __inline int64x1_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s64 (uint64_t __a)
 {
-  return (int64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a);
+  return (int64x1_t) {__a};
 }
 
 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -6576,49 +6576,49 @@ __extension__ extern __inline float32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_f32 (uint64_t __a)
 {
-  return (float32x2_t)__builtin_neon_vcreatev2sf ((__builtin_neon_di) __a);
+  return (float32x2_t) __a;
 }
 
 __extension__ extern __inline uint8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u8 (uint64_t __a)
 {
-  return (uint8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (uint8x8_t) __a;
 }
 
 __extension__ extern __inline uint16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u16 (uint64_t __a)
 {
-  return (uint16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (uint16x4_t) __a;
 }
 
 __extension__ extern __inline uint32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u32 (uint64_t __a)
 {
-  return (uint32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a);
+  return (uint32x2_t) __a;
 }
 
 __extension__ extern __inline uint64x1_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u64 (uint64_t __a)
 {
-  return (uint64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a);
+  return (uint64x1_t) {__a};
 }
 
 __extension__ extern __inline poly8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_p8 (uint64_t __a)
 {
-  return (poly8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (poly8x8_t) __a;
 }
 
 __extension__ extern __inline poly16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_p16 (uint64_t __a)
 {
-  return (poly16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (poly16x4_t) __a;
 }
 
 __extension__ extern __inline int8x8_t

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics
  2020-12-03 10:50 [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics Prathamesh Kulkarni
@ 2020-12-03 11:20 ` Kyrylo Tkachov
  2020-12-04 10:56   ` Prathamesh Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Kyrylo Tkachov @ 2020-12-03 11:20 UTC (permalink / raw)
  To: Prathamesh Kulkarni, gcc Patches

Hi Prathamesh,

> -----Original Message-----
> From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> Sent: 03 December 2020 10:50
> To: gcc Patches <gcc-patches@gcc.gnu.org>; Kyrylo Tkachov
> <Kyrylo.Tkachov@arm.com>
> Subject: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate
> intrinsics
> 
> Hi,
> This patch replaces calls to __builtin_neon_vcreate* builtins for
> vcreate intrinsics in arm_neon.h.
> Cross-tested on arm*-*-*.
> OK to commit ?

Just remembered for this and the previous patch...
Do we need to remove the builtins from being created in the backend if they are now unused?

Thanks,
Kyrill

> 
> Thanks,
> Prathamesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics
  2020-12-03 11:20 ` Kyrylo Tkachov
@ 2020-12-04 10:56   ` Prathamesh Kulkarni
  2020-12-08  9:40     ` Prathamesh Kulkarni
  0 siblings, 1 reply; 5+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-04 10:56 UTC (permalink / raw)
  To: Kyrylo Tkachov; +Cc: gcc Patches

On Thu, 3 Dec 2020 at 16:50, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> wrote:
>
> Hi Prathamesh,
>
> > -----Original Message-----
> > From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> > Sent: 03 December 2020 10:50
> > To: gcc Patches <gcc-patches@gcc.gnu.org>; Kyrylo Tkachov
> > <Kyrylo.Tkachov@arm.com>
> > Subject: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate
> > intrinsics
> >
> > Hi,
> > This patch replaces calls to __builtin_neon_vcreate* builtins for
> > vcreate intrinsics in arm_neon.h.
> > Cross-tested on arm*-*-*.
> > OK to commit ?
>
> Just remembered for this and the previous patch...
> Do we need to remove the builtins from being created in the backend if they are now unused?
Hi Kyrill,
Indeed, I will resend patch(es) with builtins removed (if they're not
used in other places).

Thanks,
Prathamesh
>
> Thanks,
> Kyrill
>
> >
> > Thanks,
> > Prathamesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics
  2020-12-04 10:56   ` Prathamesh Kulkarni
@ 2020-12-08  9:40     ` Prathamesh Kulkarni
  2020-12-11 11:43       ` Kyrylo Tkachov
  0 siblings, 1 reply; 5+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-08  9:40 UTC (permalink / raw)
  To: Kyrylo Tkachov; +Cc: gcc Patches

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Fri, 4 Dec 2020 at 16:26, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Thu, 3 Dec 2020 at 16:50, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> wrote:
> >
> > Hi Prathamesh,
> >
> > > -----Original Message-----
> > > From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> > > Sent: 03 December 2020 10:50
> > > To: gcc Patches <gcc-patches@gcc.gnu.org>; Kyrylo Tkachov
> > > <Kyrylo.Tkachov@arm.com>
> > > Subject: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate
> > > intrinsics
> > >
> > > Hi,
> > > This patch replaces calls to __builtin_neon_vcreate* builtins for
> > > vcreate intrinsics in arm_neon.h.
> > > Cross-tested on arm*-*-*.
> > > OK to commit ?
> >
> > Just remembered for this and the previous patch...
> > Do we need to remove the builtins from being created in the backend if they are now unused?
> Hi Kyrill,
> Indeed, I will resend patch(es) with builtins removed (if they're not
> used in other places).
Hi Kyrill,
Does attached patch for vcreate look OK ?

Thanks,
Prathamesh
>
> Thanks,
> Prathamesh
> >
> > Thanks,
> > Kyrill
> >
> > >
> > > Thanks,
> > > Prathamesh

[-- Attachment #2: vcreate-2.diff --]
[-- Type: application/octet-stream, Size: 3681 bytes --]

diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 9569e1a4c9c..49195fdb4cc 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -6539,28 +6539,28 @@ __extension__ extern __inline int8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s8 (uint64_t __a)
 {
-  return (int8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (int8x8_t) __a;
 }
 
 __extension__ extern __inline int16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s16 (uint64_t __a)
 {
-  return (int16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (int16x4_t) __a;
 }
 
 __extension__ extern __inline int32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s32 (uint64_t __a)
 {
-  return (int32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a);
+  return (int32x2_t) __a;
 }
 
 __extension__ extern __inline int64x1_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_s64 (uint64_t __a)
 {
-  return (int64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a);
+  return (int64x1_t) {__a};
 }
 
 #if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -6576,49 +6576,49 @@ __extension__ extern __inline float32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_f32 (uint64_t __a)
 {
-  return (float32x2_t)__builtin_neon_vcreatev2sf ((__builtin_neon_di) __a);
+  return (float32x2_t) __a;
 }
 
 __extension__ extern __inline uint8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u8 (uint64_t __a)
 {
-  return (uint8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (uint8x8_t) __a;
 }
 
 __extension__ extern __inline uint16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u16 (uint64_t __a)
 {
-  return (uint16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (uint16x4_t) __a;
 }
 
 __extension__ extern __inline uint32x2_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u32 (uint64_t __a)
 {
-  return (uint32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a);
+  return (uint32x2_t) __a;
 }
 
 __extension__ extern __inline uint64x1_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_u64 (uint64_t __a)
 {
-  return (uint64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a);
+  return (uint64x1_t) {__a};
 }
 
 __extension__ extern __inline poly8x8_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_p8 (uint64_t __a)
 {
-  return (poly8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a);
+  return (poly8x8_t) __a;
 }
 
 __extension__ extern __inline poly16x4_t
 __attribute__  ((__always_inline__, __gnu_inline__, __artificial__))
 vcreate_p16 (uint64_t __a)
 {
-  return (poly16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a);
+  return (poly16x4_t) __a;
 }
 
 __extension__ extern __inline int8x8_t
diff --git a/gcc/config/arm/arm_neon_builtins.def b/gcc/config/arm/arm_neon_builtins.def
index 0ff0494b5da..1560e28d065 100644
--- a/gcc/config/arm/arm_neon_builtins.def
+++ b/gcc/config/arm/arm_neon_builtins.def
@@ -218,7 +218,6 @@ VAR10 (GETLANE, vget_lane,
 VAR6 (GETLANE, vget_laneu, v8qi, v4hi, v2si, v16qi, v8hi, v4si)
 VAR10 (SETLANE, vset_lane,
 	 v8qi, v4hi, v2si, v2sf, di, v16qi, v8hi, v4si, v4sf, v2di)
-VAR5 (UNOP, vcreate, v8qi, v4hi, v2si, v2sf, di)
 VAR10 (UNOP, vdup_n,
 	 v8qi, v4hi, v2si, v2sf, di, v16qi, v8hi, v4si, v4sf, v2di)
 VAR4 (UNOP, vdup_n, v8hf, v4hf, v8bf, v4bf)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics
  2020-12-08  9:40     ` Prathamesh Kulkarni
@ 2020-12-11 11:43       ` Kyrylo Tkachov
  0 siblings, 0 replies; 5+ messages in thread
From: Kyrylo Tkachov @ 2020-12-11 11:43 UTC (permalink / raw)
  To: Prathamesh Kulkarni; +Cc: gcc Patches



> -----Original Message-----
> From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> Sent: 08 December 2020 09:41
> To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Cc: gcc Patches <gcc-patches@gcc.gnu.org>
> Subject: Re: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate
> intrinsics
> 
> On Fri, 4 Dec 2020 at 16:26, Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > On Thu, 3 Dec 2020 at 16:50, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> wrote:
> > >
> > > Hi Prathamesh,
> > >
> > > > -----Original Message-----
> > > > From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> > > > Sent: 03 December 2020 10:50
> > > > To: gcc Patches <gcc-patches@gcc.gnu.org>; Kyrylo Tkachov
> > > > <Kyrylo.Tkachov@arm.com>
> > > > Subject: [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate
> > > > intrinsics
> > > >
> > > > Hi,
> > > > This patch replaces calls to __builtin_neon_vcreate* builtins for
> > > > vcreate intrinsics in arm_neon.h.
> > > > Cross-tested on arm*-*-*.
> > > > OK to commit ?
> > >
> > > Just remembered for this and the previous patch...
> > > Do we need to remove the builtins from being created in the backend if
> they are now unused?
> > Hi Kyrill,
> > Indeed, I will resend patch(es) with builtins removed (if they're not
> > used in other places).
> Hi Kyrill,
> Does attached patch for vcreate look OK ?

Ok.
Thanks,
Kyrill

> 
> Thanks,
> Prathamesh
> >
> > Thanks,
> > Prathamesh
> > >
> > > Thanks,
> > > Kyrill
> > >
> > > >
> > > > Thanks,
> > > > Prathamesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-11 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 10:50 [PR66791][ARM] Replace __builtin_neon_vcreate* for vcreate intrinsics Prathamesh Kulkarni
2020-12-03 11:20 ` Kyrylo Tkachov
2020-12-04 10:56   ` Prathamesh Kulkarni
2020-12-08  9:40     ` Prathamesh Kulkarni
2020-12-11 11:43       ` 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).