[ARM] PR66791: Replace builtins in vld1
Prathamesh Kulkarni
prathamesh.kulkarni@linaro.org
Mon Jul 26 21:24:09 GMT 2021
Hi,
Similar to aarch64, this patch replaces call to builtin by
dereferencing __a in vld1_p64, vld1_s64 and vld1_u64.
The patch changes code-gen for the intrinsic as follows:
Before patch:
vld1.64 {d16}, [r0:64]
vmov r0, r1, d16 @ int
bx lr
After patch:
ldrd r0, [r0]
bx lr
I assume the code-gen after patch is correct, since it loads two
consecutive words from [r0] into r0 and r1 ?
Bootstrapped+tested on arm-linux-gnueabihf.
OK to commit ?
Thanks,
Prathamesh
-------------- next part --------------
2021-07-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/66791
* config/arm/arm_neon.h (vld1_p64): Replace call to builtin by
explicitly dereferencing __a.
(vld1_s64): Likewise.
(vld1_u64): Likewise.
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 41b596b5fc6..5a91d15bf75 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -10301,7 +10301,7 @@ __extension__ extern __inline poly64x1_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vld1_p64 (const poly64_t * __a)
{
- return (poly64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a);
+ return (poly64x1_t) { *__a };
}
#pragma GCC pop_options
@@ -10330,7 +10330,7 @@ __extension__ extern __inline int64x1_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vld1_s64 (const int64_t * __a)
{
- return (int64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a);
+ return (int64x1_t) { *__a };
}
#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -10374,7 +10374,7 @@ __extension__ extern __inline uint64x1_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vld1_u64 (const uint64_t * __a)
{
- return (uint64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a);
+ return (uint64x1_t) { *__a };
}
__extension__ extern __inline poly8x8_t
More information about the Gcc-patches
mailing list