diff options
author | Stam Markianos-Wright <stam.markianos-wright@arm.com> | 2022-11-10 15:02:47 +0000 |
---|---|---|
committer | Andrea Corallo <andrea.corallo@arm.com> | 2022-11-28 10:06:15 +0100 |
commit | e0dd75fe90ef4cda94f431747d239d6cfcf5656f (patch) | |
tree | 1a2b7984bd6e90daea0503bec727c79d3837a42b /gcc/ada | |
parent | ff2bf3dc61f453c2fe206cd8e9489300a1ca2763 (diff) | |
download | gcc-e0dd75fe90ef4cda94f431747d239d6cfcf5656f.zip gcc-e0dd75fe90ef4cda94f431747d239d6cfcf5656f.tar.gz gcc-e0dd75fe90ef4cda94f431747d239d6cfcf5656f.tar.bz2 |
arm: further fix overloading of MVE vaddq[_m]_n intrinsic
It was observed that in tests `vaddq_m_n_[s/u][8/16/32].c`, the _Generic
resolution would fall back to the `__ARM_undef` failure state.
This is a regression since `dc39db873670bea8d8e655444387ceaa53a01a79` and
`6bd4ce64eb48a72eca300cb52773e6101d646004`, but it previously wasn't
identified, because the tests were not checking for this kind of failure.
The above commits changed the definitions of the intrinsics from using
`[u]int[8/16/32]_t` types for the scalar argument to using `int`. This
allowed `int` to be supported in user code through the overloaded
`#defines`, but seems to have broken the `[u]int[8/16/32]_t` types
The solution implemented by this patch is to explicitly use a new
_Generic mapping from all the `[u]int[8/16/32]_t` types for int. With this
change, both `int` and `[u]int[8/16/32]_t` parameters are supported from
user code and are handled by the overloading mechanism correctly.
Note that in these scalar cases it is safe to pass the raw p<n>, rather
than the typeof-ed __p<n>, because we are not at risk of the _Generics
being exponentially expanded on the `n` scalar argument to an `_n`
intrinsic. Using p<n> instead will give a more accurate error message
to the user, should something be wrong with that argument.
gcc/ChangeLog:
PR target/96795
* config/arm/arm_mve.h (__arm_vaddq_m_n_s8): Change types.
(__arm_vaddq_m_n_s32): Likewise.
(__arm_vaddq_m_n_s16): Likewise.
(__arm_vaddq_m_n_u8): Likewise.
(__arm_vaddq_m_n_u32): Likewise.
(__arm_vaddq_m_n_u16): Likewise.
(__arm_vaddq_m): Fix Overloading.
(__ARM_mve_coerce3): New.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions