arm: MVE: Fix polymorphism for scalars and constants

This patch merges some polymorphic functions that were uncorrectly separating
scalar variants. It also simplifies the way we detect scalars and constants in
mve_typeid.

I also fixed some polymorphic intrinsics that were splitting of scalar cases.

gcc/ChangeLog:
2020-04-07  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/arm_mve.h (vsubq_n): Merge with...
	(vsubq): ... this.
	(vmulq_n): Merge with...
	(vmulq): ... this.
	(__ARM_mve_typeid): Simplify scalar and constant detection.

gcc/testsuite/ChangeLog:
2020-04-07  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* gcc.target/arm/mve/intrinsics/vmulq_n_f16.c: Fix test.
	* gcc.target/arm/mve/intrinsics/vmulq_n_f32.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_s16.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_s32.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_s8.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_u16.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_u32.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vmulq_n_u8.c: Likewise.
This commit is contained in:
Andre Simoes Dias Vieira 2020-04-07 11:13:42 +01:00 committed by Andre Vieira
parent 434fe1a409
commit 0f3cc1b399
9 changed files with 730 additions and 848 deletions

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ foo (float16x8_t a, float16_t b)
float16x8_t
foo1 (float16x8_t a, float16_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.f16" } } */

View File

@ -15,7 +15,7 @@ foo (float32x4_t a, float32_t b)
float32x4_t
foo1 (float32x4_t a, float32_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.f32" } } */

View File

@ -15,7 +15,7 @@ foo (int16x8_t a, int16_t b)
int16x8_t
foo1 (int16x8_t a, int16_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i16" } } */

View File

@ -15,7 +15,7 @@ foo (int32x4_t a, int32_t b)
int32x4_t
foo1 (int32x4_t a, int32_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i32" } } */

View File

@ -15,7 +15,7 @@ foo (int8x16_t a, int8_t b)
int8x16_t
foo1 (int8x16_t a, int8_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i8" } } */

View File

@ -15,7 +15,7 @@ foo (uint16x8_t a, uint16_t b)
uint16x8_t
foo1 (uint16x8_t a, uint16_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i16" } } */

View File

@ -15,7 +15,7 @@ foo (uint32x4_t a, uint32_t b)
uint32x4_t
foo1 (uint32x4_t a, uint32_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i32" } } */

View File

@ -15,7 +15,7 @@ foo (uint8x16_t a, uint8_t b)
uint8x16_t
foo1 (uint8x16_t a, uint8_t b)
{
return vmulq_n (a, b);
return vmulq (a, b);
}
/* { dg-final { scan-assembler "vmul.i8" } } */