From dc9c1b91e6be77b710751e935d6c1e09d1f289a1 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Wed, 24 Sep 2014 12:47:59 +0000 Subject: [PATCH] [AArch64] Use __aarch64_vget_lane* macros for getting the lane in some lane multiply intrinsics. * config/aarch64/arm_neon.h (vmuld_lane_f64): Use macro for getting the lane. (vmuld_laneq_f64): Likewise. (vmuls_lane_f32): Likewise. (vmuls_laneq_f32): Likewise. * gcc.target/aarch64/simd/vmul_lane_const_lane_1.c: New test. From-SVN: r215553 --- gcc/ChangeLog | 8 ++++++ gcc/config/aarch64/arm_neon.h | 8 +++--- gcc/testsuite/ChangeLog | 4 +++ .../aarch64/simd/vmul_lane_const_lane_1.c | 28 +++++++++++++++++++ 4 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/simd/vmul_lane_const_lane_1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a14d4f2d757..f87abcb54be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-09-24 Kyrylo Tkachov + + * config/aarch64/arm_neon.h (vmuld_lane_f64): Use macro for getting + the lane. + (vmuld_laneq_f64): Likewise. + (vmuls_lane_f32): Likewise. + (vmuls_laneq_f32): Likewise. + 2014-09-24 Kirill Yukhin PR bootstrap/63235 diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index e62c783e08e..feca00ea6b1 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -18611,13 +18611,13 @@ vmul_lane_u32 (uint32x2_t __a, uint32x2_t __b, const int __lane) __extension__ static __inline float64_t __attribute__ ((__always_inline__)) vmuld_lane_f64 (float64_t __a, float64x1_t __b, const int __lane) { - return __a * vget_lane_f64 (__b, __lane); + return __a * __aarch64_vget_lane_f64 (__b, __lane); } __extension__ static __inline float64_t __attribute__ ((__always_inline__)) vmuld_laneq_f64 (float64_t __a, float64x2_t __b, const int __lane) { - return __a * vgetq_lane_f64 (__b, __lane); + return __a * __aarch64_vgetq_lane_f64 (__b, __lane); } /* vmuls_lane */ @@ -18625,13 +18625,13 @@ vmuld_laneq_f64 (float64_t __a, float64x2_t __b, const int __lane) __extension__ static __inline float32_t __attribute__ ((__always_inline__)) vmuls_lane_f32 (float32_t __a, float32x2_t __b, const int __lane) { - return __a * vget_lane_f32 (__b, __lane); + return __a * __aarch64_vget_lane_f32 (__b, __lane); } __extension__ static __inline float32_t __attribute__ ((__always_inline__)) vmuls_laneq_f32 (float32_t __a, float32x4_t __b, const int __lane) { - return __a * vgetq_lane_f32 (__b, __lane); + return __a * __aarch64_vgetq_lane_f32 (__b, __lane); } /* vmul_laneq */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 357b049574a..a9e2849110d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-09-24 Kyrylo Tkachov + + * gcc.target/aarch64/simd/vmul_lane_const_lane_1.c: New test. + 2014-09-24 Jakub Jelinek PR sanitizer/63316 diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vmul_lane_const_lane_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vmul_lane_const_lane_1.c new file mode 100644 index 00000000000..245518178a5 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vmul_lane_const_lane_1.c @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +#include "arm_neon.h" + +float64_t +wrap_vmuld_lane_f64 (float64_t a, float64x1_t b) +{ + return vmuld_lane_f64 (a, b, 0); +} + +float64_t +wrap_vmuld_laneq_f64 (float64_t a, float64x2_t b) +{ + return vmuld_laneq_f64 (a, b, 0); +} + +float32_t +wrap_vmuls_lane_f32 (float32_t a, float32x2_t b) +{ + return vmuls_lane_f32 (a, b, 0); +} + +float32_t +wrap_vmuls_laneq_f32 (float32_t a, float32x4_t b) +{ + return vmuls_laneq_f32 (a, b, 0); +} -- 2.30.2