Re: [PATCH AArch64] Rename [u]int32x1_t to [u]int32_t (resp 16x1, 8x1) in arm_neon.h

2014-09-02 Thread Marcus Shawcroft
On 24 July 2014 11:18, Alan Lawrence alan.lawre...@arm.com wrote:
 The ACLE spec does not mention the int32x1_t, uint32x1_t, int16x1_t,
 uint16x1_t, int8x1_t or uint8x1_t types currently in arm_neon.h, but just
 'standard' types int32_t, int16_t, etc. This patch is a global
 search-and-replace across arm_neon.h (and the tests that depend on it).

 Regressed (check-gcc and check-g++) on aarch64-none-elf.


OK for trunk.

 The question of backporting to 4.9 has been raised internally. There is no
 ABI issue, as int32x1_t was merely a typedef to int32_t (etc.). However
 there is a source code compatibility issue; code mentioning the 32x1 types,
 i.e. not conforming to the ACLE spec, which previously compiled, will no
 longer do so. My personal feeling is therefore not to backport this, but I
 would welcome input from maintainers (and others)...?

I doubt that there is currently much code out there that will be
affected by this change and that it would be better to back port and
hence limit the amount of code written against the broken arm_neon.h
during the life of the 4.9.x series. If there are no objections to
back porting in the next couple of days then go ahead.

/Marcus


[PATCH AArch64] Rename [u]int32x1_t to [u]int32_t (resp 16x1, 8x1) in arm_neon.h

2014-07-24 Thread Alan Lawrence
The ACLE spec does not mention the int32x1_t, uint32x1_t, int16x1_t, uint16x1_t, 
int8x1_t or uint8x1_t types currently in arm_neon.h, but just 'standard' types 
int32_t, int16_t, etc. This patch is a global search-and-replace across 
arm_neon.h (and the tests that depend on it).


Regressed (check-gcc and check-g++) on aarch64-none-elf.

The question of backporting to 4.9 has been raised internally. There is no ABI 
issue, as int32x1_t was merely a typedef to int32_t (etc.). However there is a 
source code compatibility issue; code mentioning the 32x1 types, i.e. not 
conforming to the ACLE spec, which previously compiled, will no longer do so. My 
personal feeling is therefore not to backport this, but I would welcome input 
from maintainers (and others)...?


Cheers, Alan

gcc/ChangeLog:

* config/aarch64/arm_neon.h (int32x1_t, int16x1_t, int8x1_t,
uint32x1_t, uint16x1_t, uint8x1_t): Remove typedefs.

(vqabsb_s8, vqabsh_s16, vqabss_s32, vqaddb_s8, vqaddh_s16, vqadds_s32,
vqaddb_u8, vqaddh_u16, vqadds_u32, vqdmlalh_s16, vqdmlalh_lane_s16,
vqdmlals_s32, vqdmlals_lane_s32, vqdmlslh_s16, vqdmlslh_lane_s16,
vqdmlsls_s32, vqdmlsls_lane_s32, vqdmulhh_s16, vqdmulhh_lane_s16,
vqdmulhs_s32, vqdmulhs_lane_s32, vqdmullh_s16, vqdmullh_lane_s16,
vqdmulls_s32, vqdmulls_lane_s32, vqmovnh_s16, vqmovns_s32,
vqmovnh_u16, vqmovns_u32, vqmovunh_s16, vqmovuns_s32, vqnegb_s8,
vqnegh_s16, vqnegs_s32, vqrdmulhh_s16, vqrdmulhh_lane_s16,
vqrdmulhs_s32, vqrdmulhs_lane_s32, vqrshlb_s8, vqrshlh_s16,
vqrshls_s32, vqrshlb_u8, vqrshlh_u16, vqrshls_u32, vqrshrnh_n_s16,
vqrshrns_n_s32, vqrshrnh_n_u16, vqrshrns_n_u32, vqrshrunh_n_s16,
vqrshruns_n_s32, vqshlb_s8, vqshlh_s16, vqshls_s32, vqshlb_u8,
vqshlh_u16, vqshls_u32, vqshlb_n_s8, vqshlh_n_s16, vqshls_n_s32,
vqshlb_n_u8, vqshlh_n_u16, vqshls_n_u32, vqshlub_n_s8, vqshluh_n_s16,
vqshlus_n_s32, vqshrnh_n_s16, vqshrns_n_s32, vqshrnh_n_u16,
vqshrns_n_u32, vqshrunh_n_s16, vqshruns_n_s32, vqsubb_s8, vqsubh_s16,
vqsubs_s32, vqsubb_u8, vqsubh_u16, vqsubs_u32, vsqaddb_u8,
vsqaddh_u16, vsqadds_u32, vuqaddb_s8, vuqaddh_s16, vuqadds_s32):
Replace all int{32,16,8}x1_t with int{32,16,8}_t.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/scalar_intrinsics.c (*): Replace all
int{32,16,8}x1_t with int{32,16,8}_t.
* gcc.target/aarch64/simd/vqdmlalh_lane_s16.c: Likewise.
* gcc.target/aarch64/simd/vqdmlals_lane_s32.c: Likewise.
* gcc.target/aarch64/simd/vqdmlslh_lane_s16.c: Likewise.
* gcc.target/aarch64/simd/vqdmlsls_lane_s32.c: Likewise.
* gcc.target/aarch64/simd/vqdmullh_lane_s16.c: Likewise.
* gcc.target/aarch64/simd/vqdmulls_lane_s32.c: Likewise.diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
index 83ac5e96d422ceccadcb212ec792665b78c03fae..2e54c01aa068c1680b068592bbdfd011ee4b7cf8 100644
--- a/gcc/config/aarch64/arm_neon.h
+++ b/gcc/config/aarch64/arm_neon.h
@@ -40,9 +40,6 @@ typedef __builtin_aarch64_simd_si int32x2_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_di int64x1_t
   __attribute__ ((__vector_size__ (8)));
-typedef int32_t int32x1_t;
-typedef int16_t int16x1_t;
-typedef int8_t int8x1_t;
 typedef __builtin_aarch64_simd_df float64x1_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_sf float32x2_t
@@ -59,9 +56,6 @@ typedef __builtin_aarch64_simd_usi uint32x2_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_udi uint64x1_t
   __attribute__ ((__vector_size__ (8)));
-typedef uint32_t uint32x1_t;
-typedef uint16_t uint16x1_t;
-typedef uint8_t uint8x1_t;
 typedef __builtin_aarch64_simd_qi int8x16_t
   __attribute__ ((__vector_size__ (16)));
 typedef __builtin_aarch64_simd_hi int16x8_t
@@ -19203,22 +19197,22 @@ vqabsq_s64 (int64x2_t __a)
   return (int64x2_t) __builtin_aarch64_sqabsv2di (__a);
 }
 
-__extension__ static __inline int8x1_t __attribute__ ((__always_inline__))
-vqabsb_s8 (int8x1_t __a)
+__extension__ static __inline int8_t __attribute__ ((__always_inline__))
+vqabsb_s8 (int8_t __a)
 {
-  return (int8x1_t) __builtin_aarch64_sqabsqi (__a);
+  return (int8_t) __builtin_aarch64_sqabsqi (__a);
 }
 
-__extension__ static __inline int16x1_t __attribute__ ((__always_inline__))
-vqabsh_s16 (int16x1_t __a)
+__extension__ static __inline int16_t __attribute__ ((__always_inline__))
+vqabsh_s16 (int16_t __a)
 {
-  return (int16x1_t) __builtin_aarch64_sqabshi (__a);
+  return (int16_t) __builtin_aarch64_sqabshi (__a);
 }
 
-__extension__ static __inline int32x1_t __attribute__ ((__always_inline__))
-vqabss_s32 (int32x1_t __a)
+__extension__ static __inline int32_t __attribute__ ((__always_inline__))
+vqabss_s32 (int32_t __a)
 {
-  return (int32x1_t) __builtin_aarch64_sqabssi (__a);
+  return (int32_t) __builtin_aarch64_sqabssi (__a);
 }
 
 __extension__ static