[PATCH] aarch64: Fix float <-> int errors in vld4[q]_lane intrinsics

Jonathan Wright Jonathan.Wright@arm.com
Wed Aug 18 12:59:08 GMT 2021


A previous commit "aarch64: Remove macros for vld4[q]_lane Neon
intrinsics" introduced some float <-> int type conversion errors.
This patch fixes those errors.

Bootstrapped and regression tested on aarch64-none-linux-gnu - no

Ok for master?




2021-08-18  Jonathan Wright  <jonathan.wright@arm.com>

	* config/aarch64/arm_neon.h (vld4_lane_f32): Use float RTL
	(vld4q_lane_f64): Use float type cast.

From: Andreas Schwab <schwab@linux-m68k.org>
Sent: 18 August 2021 13:09
To: Jonathan Wright via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Jonathan Wright <Jonathan.Wright@arm.com>; Richard Sandiford <Richard.Sandiford@arm.com>
Subject: Re: [PATCH 3/3] aarch64: Remove macros for vld4[q]_lane Neon intrinsics 
I think this patch breaks bootstrap.

In file included from ../../libcpp/lex.c:756:
/opt/gcc/gcc-20210818/Build/prev-gcc/include/arm_neon.h: In function 'float32x2x4_t vld4_lane_f32(const float32_t*, float32x2x4_t, int)':
/opt/gcc/gcc-20210818/Build/prev-gcc/include/arm_neon.h:21081:11: error: cannot convert 'float*' to 'const int*'
21081 |           (__builtin_aarch64_simd_sf *) __ptr, __o, __c);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           |
      |           float*
<built-in>: note:   initializing argument 1 of '__builtin_aarch64_simd_xi __builtin_aarch64_ld4_lanev2si(const int*, __builtin_aarch64_simd_xi, int)'
/opt/gcc/gcc-20210818/Build/prev-gcc/include/arm_neon.h: In function 'float64x2x4_t vld4q_lane_f64(const float64_t*, float64x2x4_t, int)':
/opt/gcc/gcc-20210818/Build/prev-gcc/include/arm_neon.h:21384:9: error: cannot convert 'long int*' to 'const double*'
21384 |         (__builtin_aarch64_simd_di *) __ptr, __o, __c);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         long int*
<built-in>: note:   initializing argument 1 of '__builtin_aarch64_simd_xi __builtin_aarch64_ld4_lanev2df(const double*, __builtin_aarch64_simd_xi, int)'


Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb14797.patch
Type: application/octet-stream
Size: 1474 bytes
Desc: rb14797.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210818/0c124705/attachment.obj>

More information about the Gcc-patches mailing list