Modify the MVE polymorphic variant arguments to match the MVE intrinsic definition.
authorSrinath Parvathaneni <srinath.parvathaneni@arm.com>
Thu, 23 Apr 2020 09:53:59 +0000 (10:53 +0100)
committerSrinath Parvathaneni <srinath.parvathaneni@arm.com>
Thu, 23 Apr 2020 10:00:32 +0000 (11:00 +0100)
commitc6ffc89f6ef90707ac44240718e258c81f32c7e4
tree2a83a8c2ac0ef227b275cc9a8a37b766feb02c5b
parent66c2273714eb14bf8f6ba052e8c0e26c25709bc9
Modify the MVE polymorphic variant arguments to match the MVE intrinsic definition.

When MVE intrinsic's are called, few implicit typecasting are done on the formal arguments to match the intrinsic parameters.
But when same intrinsics are called through MVE polymorphic variants, _Generic feature used here does strict type checking and fails to match the exact intrinsic.
This patch corrects the behaviour of polymorphic variants and match the expected intrinsic by explicitly typecasting the polymorphic variant's arguments.

Please refer to M-profile Vector Extension (MVE) intrinsics [1]  for more details.
[1] https://developer.arm.com/architectures/instruction-sets/simd-isas/helium/mve-intrinsics

Regression tested on arm-none-eabi and found no regressions.

Ok for trunk?

Thanks,
Srinath.

gcc/ChangeLog:

2020-04-23  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

* config/arm/arm_mve.h (__arm_vbicq_n_u16): Modify function parameter's
datatype.
(__arm_vbicq_n_s16): Likewise.
(__arm_vbicq_n_u32): Likewise.
(__arm_vbicq_n_s32): Likewise.
(__arm_vbicq): Likewise.
(__arm_vbicq_n_s16): Modify MVE polymorphic variant argument's datatype.
(__arm_vbicq_n_s32): Likewise.
(__arm_vbicq_n_u16): Likewise.
(__arm_vbicq_n_u32): Likewise.
(__arm_vdupq_m_n_s8): Likewise.
(__arm_vdupq_m_n_s16): Likewise.
(__arm_vdupq_m_n_s32): Likewise.
(__arm_vdupq_m_n_u8): Likewise.
(__arm_vdupq_m_n_u16): Likewise.
(__arm_vdupq_m_n_u32): Likewise.
(__arm_vdupq_m_n_f16): Likewise.
(__arm_vdupq_m_n_f32): Likewise.
(__arm_vldrhq_gather_offset_s16): Likewise.
(__arm_vldrhq_gather_offset_s32): Likewise.
(__arm_vldrhq_gather_offset_u16): Likewise.
(__arm_vldrhq_gather_offset_u32): Likewise.
(__arm_vldrhq_gather_offset_f16): Likewise.
(__arm_vldrhq_gather_offset_z_s16): Likewise.
(__arm_vldrhq_gather_offset_z_s32): Likewise.
(__arm_vldrhq_gather_offset_z_u16): Likewise.
(__arm_vldrhq_gather_offset_z_u32): Likewise.
(__arm_vldrhq_gather_offset_z_f16): Likewise.
(__arm_vldrhq_gather_shifted_offset_s16): Likewise.
(__arm_vldrhq_gather_shifted_offset_s32): Likewise.
(__arm_vldrhq_gather_shifted_offset_u16): Likewise.
(__arm_vldrhq_gather_shifted_offset_u32): Likewise.
(__arm_vldrhq_gather_shifted_offset_f16): Likewise.
(__arm_vldrhq_gather_shifted_offset_z_s16): Likewise.
(__arm_vldrhq_gather_shifted_offset_z_s32): Likewise.
(__arm_vldrhq_gather_shifted_offset_z_u16): Likewise.
(__arm_vldrhq_gather_shifted_offset_z_u32): Likewise.
(__arm_vldrhq_gather_shifted_offset_z_f16): Likewise.
(__arm_vldrwq_gather_offset_s32): Likewise.
(__arm_vldrwq_gather_offset_u32): Likewise.
(__arm_vldrwq_gather_offset_f32): Likewise.
(__arm_vldrwq_gather_offset_z_s32): Likewise.
(__arm_vldrwq_gather_offset_z_u32): Likewise.
(__arm_vldrwq_gather_offset_z_f32): Likewise.
(__arm_vldrwq_gather_shifted_offset_s32): Likewise.
(__arm_vldrwq_gather_shifted_offset_u32): Likewise.
(__arm_vldrwq_gather_shifted_offset_f32): Likewise.
(__arm_vldrwq_gather_shifted_offset_z_s32): Likewise.
(__arm_vldrwq_gather_shifted_offset_z_u32): Likewise.
(__arm_vldrwq_gather_shifted_offset_z_f32): Likewise.
(__arm_vdwdupq_x_n_u8): Likewise.
(__arm_vdwdupq_x_n_u16): Likewise.
(__arm_vdwdupq_x_n_u32): Likewise.
(__arm_viwdupq_x_n_u8): Likewise.
(__arm_viwdupq_x_n_u16): Likewise.
(__arm_viwdupq_x_n_u32): Likewise.
(__arm_vidupq_x_n_u8): Likewise.
(__arm_vddupq_x_n_u8): Likewise.
(__arm_vidupq_x_n_u16): Likewise.
(__arm_vddupq_x_n_u16): Likewise.
(__arm_vidupq_x_n_u32): Likewise.
(__arm_vddupq_x_n_u32): Likewise.
(__arm_vldrdq_gather_offset_s64): Likewise.
(__arm_vldrdq_gather_offset_u64): Likewise.
(__arm_vldrdq_gather_offset_z_s64): Likewise.
(__arm_vldrdq_gather_offset_z_u64): Likewise.
(__arm_vldrdq_gather_shifted_offset_s64): Likewise.
(__arm_vldrdq_gather_shifted_offset_u64): Likewise.
(__arm_vldrdq_gather_shifted_offset_z_s64): Likewise.
(__arm_vldrdq_gather_shifted_offset_z_u64): Likewise.
(__arm_vidupq_m_n_u8): Likewise.
(__arm_vidupq_m_n_u16): Likewise.
(__arm_vidupq_m_n_u32): Likewise.
(__arm_vddupq_m_n_u8): Likewise.
(__arm_vddupq_m_n_u16): Likewise.
(__arm_vddupq_m_n_u32): Likewise.
(__arm_vidupq_n_u16): Likewise.
(__arm_vidupq_n_u32): Likewise.
(__arm_vidupq_n_u8): Likewise.
(__arm_vddupq_n_u16): Likewise.
(__arm_vddupq_n_u32): Likewise.
(__arm_vddupq_n_u8): Likewise.

gcc/testsuite/ChangeLog:

2020-04-23  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

* gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u16.c: New test.
* gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u32.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u8.c: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_s64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_u64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_z_s64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_z_u64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_s64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_u64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_z_s64.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_z_u64.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_f16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_s16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_u16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_f16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_s16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_u16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_f16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_s16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_u16.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_f16.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_s16.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_s32.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_u16.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_u32.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_f32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_f32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_f32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_s32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_u32.c:
Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_f32.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_s32.c
: Likewise.
* gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_u32.c
: Likewise.
66 files changed:
gcc/ChangeLog
gcc/config/arm/arm_mve.h
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_m_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vddupq_x_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vdwdupq_x_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_m_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vidupq_x_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_viwdupq_x_n_u8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_s64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_u64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_z_s64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_offset_z_u64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_s64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_u64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_z_s64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrdq_gather_shifted_offset_z_u64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_f16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_s16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_f16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_s16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_offset_z_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_f16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_s16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_f16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_s16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_u16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrhq_gather_shifted_offset_z_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_f32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_f32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_offset_z_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_f32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_u32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_f32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_s32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vldrwq_gather_shifted_offset_z_u32.c [new file with mode: 0644]