Commit 0c64497d by Richard Sandiford Committed by Richard Sandiford

[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)

The SVE tests are split into code-quality compile tests and runtime
tests.  A lot of the former are geared towards LP64.  It would be
possible (but tedious!) to mark up every line that is expected to work
only for LP64, but I think it would be a constant source of problems.

Since the code has not been tuned for ILP32 yet, I think the best
thing is to select only the runtime tests for that combination.
They all pass on aarch64-elf and aarch64_be-elf except vec-cond-[34].c,
which are unsupported due to the lack of fenv support.

The patch also replaces uses of built-in types with stdint.h types
where possible.  (This excludes tests that change the endianness,
since we can't assume that system header files work in that case.)

2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
	PR testsuite/83846
	* gcc.target/aarch64/sve/aarch64-sve.exp: Only do *_run tests
	for ILP32.
	* gcc.target/aarch64/sve/clastb_2_run.c (main): Use TYPE instead
	of hard-coding the choice.
	* gcc.target/aarch64/sve/clastb_4_run.c (main): Likewise.
	* gcc.target/aarch64/sve/clastb_5_run.c (main): Likewise.
	* gcc.target/aarch64/sve/clastb_3_run.c (main): Likewise.  Generalize
	memset call.
	* gcc.target/aarch64/sve/const_pred_1.C: Include stdint.h and use
	stdint.h types.
	* gcc.target/aarch64/sve/const_pred_2.C: Likewise.
	* gcc.target/aarch64/sve/const_pred_3.C: Likewise.
	* gcc.target/aarch64/sve/const_pred_4.C: Likewise.
	* gcc.target/aarch64/sve/load_const_offset_2.c: Likewise.
	* gcc.target/aarch64/sve/logical_1.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_1.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_2.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_3.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_4.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_5.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_6.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_7.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_load_8.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_store_1.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_store_2.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
	* gcc.target/aarch64/sve/mask_struct_store_4.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_1.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_2.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_2_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_3.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_3_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_4.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_4_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_7.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_8.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_8_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_9.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_9_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_10.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_10_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_11.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_11_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_12.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_12_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_13.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_13_run.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_14.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_18.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_19.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_20.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_21.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_22.c: Likewise.
	* gcc.target/aarch64/sve/struct_vect_23.c: Likewise.
	* gcc.target/aarch64/sve/popcount_1.c (popcount_64): Use
	__builtin_popcountll rather than __builtin_popcountl.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>

From-SVN: r257290
parent 002092be
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org> 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
PR testsuite/83846
* gcc.target/aarch64/sve/aarch64-sve.exp: Only do *_run tests
for ILP32.
* gcc.target/aarch64/sve/clastb_2_run.c (main): Use TYPE instead
of hard-coding the choice.
* gcc.target/aarch64/sve/clastb_4_run.c (main): Likewise.
* gcc.target/aarch64/sve/clastb_5_run.c (main): Likewise.
* gcc.target/aarch64/sve/clastb_3_run.c (main): Likewise. Generalize
memset call.
* gcc.target/aarch64/sve/const_pred_1.C: Include stdint.h and use
stdint.h types.
* gcc.target/aarch64/sve/const_pred_2.C: Likewise.
* gcc.target/aarch64/sve/const_pred_3.C: Likewise.
* gcc.target/aarch64/sve/const_pred_4.C: Likewise.
* gcc.target/aarch64/sve/load_const_offset_2.c: Likewise.
* gcc.target/aarch64/sve/logical_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_2.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_3.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_4.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_5.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_6.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_7.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_8.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_2.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_4.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_1.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_2.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_2_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_3.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_3_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_4.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_4_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_7.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_8.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_8_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_9.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_9_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_10.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_10_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_11.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_11_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_12.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_12_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_13.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_13_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_14.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_18.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_19.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_20.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_21.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_22.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_23.c: Likewise.
* gcc.target/aarch64/sve/popcount_1.c (popcount_64): Use
__builtin_popcountll rather than __builtin_popcountl.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
* gcc.target/aarch64/sve/slp_2.c: Expect LD1RQ to be used instead * gcc.target/aarch64/sve/slp_2.c: Expect LD1RQ to be used instead
of LD1R[HWD] for multi-element constants on big-endian targets. of LD1R[HWD] for multi-element constants on big-endian targets.
* gcc.target/aarch64/sve/slp_3.c: Likewise. * gcc.target/aarch64/sve/slp_3.c: Likewise.
......
...@@ -44,8 +44,16 @@ if { [check_effective_target_aarch64_sve] } { ...@@ -44,8 +44,16 @@ if { [check_effective_target_aarch64_sve] } {
set sve_flags "-march=armv8.2-a+sve" set sve_flags "-march=armv8.2-a+sve"
} }
# Most of the code-quality tests are written for LP64. Just do the
# correctness tests for ILP32.
if { [check_effective_target_ilp32] } {
set pattern "*_run"
} else {
set pattern "*"
}
# Main loop. # Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/$pattern.\[cCS\]]] \
$sve_flags $DEFAULT_CFLAGS $sve_flags $DEFAULT_CFLAGS
# All done. # All done.
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1))) int __attribute__ ((optimize (1)))
main (void) main (void)
{ {
unsigned int a[N] = { TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32 31, 32
}; };
__builtin_memset (a + 32, 43, (N - 32) * sizeof (int)); __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
unsigned int ret = condition_reduction (a, 16); TYPE ret = condition_reduction (a, 16);
if (ret != 10) if (ret != 10)
__builtin_abort (); __builtin_abort ();
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1))) int __attribute__ ((optimize (1)))
main (void) main (void)
{ {
unsigned char a[N] = { TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32 31, 32
}; };
__builtin_memset (a + 32, 43, N - 32); __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
unsigned char ret = condition_reduction (a, 16); TYPE ret = condition_reduction (a, 16);
if (ret != 10) if (ret != 10)
__builtin_abort (); __builtin_abort ();
......
...@@ -8,15 +8,15 @@ extern void abort (void) __attribute__ ((noreturn)); ...@@ -8,15 +8,15 @@ extern void abort (void) __attribute__ ((noreturn));
int __attribute__ ((optimize (1))) int __attribute__ ((optimize (1)))
main (void) main (void)
{ {
short a[N] = { TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32 31, 32
}; };
__builtin_memset (a+32, 43, (N-32)*sizeof (short)); __builtin_memset (a+32, 43, (N-32)*sizeof (TYPE));
short ret = condition_reduction (a, 16); TYPE ret = condition_reduction (a, 16);
if (ret != 10) if (ret != 10)
abort (); abort ();
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1))) int __attribute__ ((optimize (1)))
main (void) main (void)
{ {
long a[N] = { TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32 31, 32
}; };
__builtin_memset (a + 32, 43, (N - 32) * sizeof (long)); __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
long ret = condition_reduction (a, 16); TYPE ret = condition_reduction (a, 16);
if (ret != 10) if (ret != 10)
__builtin_abort (); __builtin_abort ();
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -msve-vector-bits=256" } */ /* { dg-options "-O2 -msve-vector-bits=256" } */
typedef signed char vnx16qi __attribute__((vector_size(32))); #include <stdint.h>
typedef int8_t vnx16qi __attribute__((vector_size(32)));
vnx16qi vnx16qi
foo (vnx16qi x, vnx16qi y) foo (vnx16qi x, vnx16qi y)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -msve-vector-bits=256" } */ /* { dg-options "-O2 -msve-vector-bits=256" } */
typedef short vnx8hi __attribute__((vector_size(32))); #include <stdint.h>
typedef int16_t vnx8hi __attribute__((vector_size(32)));
vnx8hi vnx8hi
foo (vnx8hi x, vnx8hi y) foo (vnx8hi x, vnx8hi y)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -msve-vector-bits=256" } */ /* { dg-options "-O2 -msve-vector-bits=256" } */
typedef int vnx4si __attribute__((vector_size(32))); #include <stdint.h>
typedef int32_t vnx4si __attribute__((vector_size(32)));
vnx4si vnx4si
foo (vnx4si x, vnx4si y) foo (vnx4si x, vnx4si y)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -msve-vector-bits=256" } */ /* { dg-options "-O2 -msve-vector-bits=256" } */
typedef long long vnx2di __attribute__((vector_size(32))); #include <stdint.h>
typedef int64_t vnx2di __attribute__((vector_size(32)));
vnx2di vnx2di
foo (vnx2di x, vnx2di y) foo (vnx2di x, vnx2di y)
......
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize -save-temps" } */ /* { dg-options "-O2 -ftree-vectorize -save-temps" } */
#include <stdint.h>
void void
f (unsigned int *restrict a, signed char *restrict b, signed char mask, int n) f (uint32_t *restrict a, int8_t *restrict b, int8_t mask, int n)
{ {
for (int i = 0; i < n; ++i) for (int i = 0; i < n; ++i)
a[i] += (signed char) (b[i] | mask); a[i] += (int8_t) (b[i] | mask);
} }
/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+\]\n} 1 { xfail ilp32 } } } */
/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #1, mul vl\]\n} 1 } } */ /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #1, mul vl\]\n} 1 { xfail ilp32 } } } */
/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #2, mul vl\]\n} 1 } } */ /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #2, mul vl\]\n} 1 { xfail ilp32 } } } */
/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #3, mul vl\]\n} 1 } } */ /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #3, mul vl\]\n} 1 { xfail ilp32 } } } */
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O3 --save-temps" } */ /* { dg-options "-O3 --save-temps" } */
#include <stdint.h>
#define DO_CONSTANT(VALUE, TYPE, OP, NAME) \ #define DO_CONSTANT(VALUE, TYPE, OP, NAME) \
void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count) \ void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count) \
{ \ { \
...@@ -78,12 +80,12 @@ void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count) \ ...@@ -78,12 +80,12 @@ void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count) \
DO_CONSTANT (-8, TYPE, OP, NAME ## minus8) \ DO_CONSTANT (-8, TYPE, OP, NAME ## minus8) \
DO_CONSTANT (-9, TYPE, OP, NAME ## minus9) DO_CONSTANT (-9, TYPE, OP, NAME ## minus9)
DO_LOGICAL_OPS_BRIEF (char, &, and) DO_LOGICAL_OPS_BRIEF (int8_t, &, and)
DO_LOGICAL_OPS_BRIEF (long, &, and) DO_LOGICAL_OPS_BRIEF (int64_t, &, and)
DO_LOGICAL_OPS (int, &, and) DO_LOGICAL_OPS (int32_t, &, and)
DO_LOGICAL_OPS (int, |, or) DO_LOGICAL_OPS (int32_t, |, or)
DO_LOGICAL_OPS (int, ^, xor) DO_LOGICAL_OPS (int32_t, ^, xor)
/* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.d, z[0-9]+\.d, #0x1\n} 1 } } */ /* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.d, z[0-9]+\.d, #0x1\n} 1 } } */
/* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.s, z[0-9]+\.s, #0x1\n} 1 } } */ /* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.s, z[0-9]+\.s, #0x1\n} 1 } } */
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -14,22 +16,22 @@ ...@@ -14,22 +16,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -15,22 +17,22 @@ ...@@ -15,22 +17,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -12,22 +14,22 @@ ...@@ -12,22 +14,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -18,22 +20,22 @@ ...@@ -18,22 +20,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -19,22 +21,22 @@ ...@@ -19,22 +21,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -20,22 +22,22 @@ ...@@ -20,22 +22,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
#include <stdint.h>
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \ NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
...@@ -16,22 +18,22 @@ ...@@ -16,22 +18,22 @@
} }
#define TEST2(NAME, OUTTYPE, INTYPE) \ #define TEST2(NAME, OUTTYPE, INTYPE) \
TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \ TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double) TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \ #define TEST1(NAME, OUTTYPE) \
TEST2 (NAME##_i8, OUTTYPE, signed char) \ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
TEST2 (NAME##_i16, OUTTYPE, unsigned short) \ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
TEST2 (NAME##_i32, OUTTYPE, int) \ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
TEST2 (NAME##_i64, OUTTYPE, unsigned long) TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \ #define TEST(NAME) \
TEST1 (NAME##_i8, signed char) \ TEST1 (NAME##_i8, int8_t) \
TEST1 (NAME##_i16, unsigned short) \ TEST1 (NAME##_i16, uint16_t) \
TEST1 (NAME##_i32, int) \ TEST1 (NAME##_i32, int32_t) \
TEST1 (NAME##_i64, unsigned long) \ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \ TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \ TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double) TEST2 (NAME##_f64_f64, double, double)
......
...@@ -14,7 +14,7 @@ void __attribute__ ((noinline, noclone)) ...@@ -14,7 +14,7 @@ void __attribute__ ((noinline, noclone))
popcount_64 (unsigned int *restrict dst, uint64_t *restrict src, int size) popcount_64 (unsigned int *restrict dst, uint64_t *restrict src, int size)
{ {
for (int i = 0; i < size; ++i) for (int i = 0; i < size; ++i)
dst[i] = __builtin_popcountl (src[i]); dst[i] = __builtin_popcountll (src[i]);
} }
/* { dg-final { scan-assembler-times {\tcnt\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 1 } } */ /* { dg-final { scan-assembler-times {\tcnt\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 1 } } */
......
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#include <stdint.h>
#ifndef TYPE #ifndef TYPE
#define TYPE unsigned char #define TYPE uint8_t
#endif #endif
#ifndef NAME #ifndef NAME
......
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned long #define TYPE uint64_t
#define ITYPE long #define ITYPE int64_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned long #define TYPE uint64_t
#define ITYPE long #define ITYPE int64_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE _Float16 #define TYPE _Float16
#define ITYPE short #define ITYPE int16_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE _Float16 #define TYPE _Float16
#define ITYPE short #define ITYPE int16_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE float #define TYPE float
#define ITYPE int #define ITYPE int32_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE float #define TYPE float
#define ITYPE int #define ITYPE int32_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE double #define TYPE double
#define ITYPE long #define ITYPE int64_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE double #define TYPE double
#define ITYPE long #define ITYPE int64_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=256 --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=256 --save-temps" } */
#define TYPE unsigned char #define TYPE uint8_t
#define NAME(X) qi_##X #define NAME(X) qi_##X
#include "struct_vect_1.c" #include "struct_vect_1.c"
#undef NAME #undef NAME
#undef TYPE #undef TYPE
#define TYPE unsigned short #define TYPE uint16_t
#define NAME(X) hi_##X #define NAME(X) hi_##X
#include "struct_vect_1.c" #include "struct_vect_1.c"
#undef NAME #undef NAME
#undef TYPE #undef TYPE
#define TYPE unsigned int #define TYPE uint32_t
#define NAME(X) si_##X #define NAME(X) si_##X
#include "struct_vect_1.c" #include "struct_vect_1.c"
#undef NAME #undef NAME
#undef TYPE #undef TYPE
#define TYPE unsigned long #define TYPE uint64_t
#define NAME(X) di_##X #define NAME(X) di_##X
#include "struct_vect_1.c" #include "struct_vect_1.c"
#undef NAME #undef NAME
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define N 2000 #define N 2000
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
...@@ -12,8 +14,8 @@ ...@@ -12,8 +14,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \ NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
...@@ -10,8 +12,8 @@ ...@@ -10,8 +12,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned short #define TYPE uint16_t
#include "struct_vect_1.c" #include "struct_vect_1.c"
/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define N 2000 #define N 2000
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
...@@ -12,8 +14,8 @@ ...@@ -12,8 +14,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \ NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
...@@ -10,8 +12,8 @@ ...@@ -10,8 +12,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define N 2000 #define N 2000
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
...@@ -12,8 +14,8 @@ ...@@ -12,8 +14,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize" } */
#include <stdint.h>
#define TEST_LOOP(NAME, TYPE) \ #define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \ void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \ NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
...@@ -10,8 +12,8 @@ ...@@ -10,8 +12,8 @@
} }
#define TEST(NAME) \ #define TEST(NAME) \
TEST_LOOP (NAME##_i8, signed char) \ TEST_LOOP (NAME##_i8, int8_t) \
TEST_LOOP (NAME##_i16, unsigned short) \ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \ TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double) TEST_LOOP (NAME##_f64, double)
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned short #define TYPE uint16_t
#include "struct_vect_1_run.c" #include "struct_vect_1_run.c"
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned int #define TYPE uint32_t
#include "struct_vect_1.c" #include "struct_vect_1.c"
/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned int #define TYPE uint32_t
#include "struct_vect_1_run.c" #include "struct_vect_1_run.c"
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned long #define TYPE uint64_t
#include "struct_vect_1.c" #include "struct_vect_1.c"
/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned long #define TYPE uint64_t
#include "struct_vect_1_run.c" #include "struct_vect_1_run.c"
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#include <stdint.h>
#ifndef TYPE #ifndef TYPE
#define TYPE unsigned char #define TYPE uint8_t
#define ITYPE signed char #define ITYPE int8_t
#endif #endif
void __attribute__ ((noinline, noclone)) void __attribute__ ((noinline, noclone))
......
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned short #define TYPE uint16_t
#define ITYPE short #define ITYPE int16_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned short #define TYPE uint16_t
#define ITYPE short #define ITYPE int16_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
/* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned int #define TYPE uint32_t
#define ITYPE int #define ITYPE int32_t
#include "struct_vect_7.c" #include "struct_vect_7.c"
/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
......
/* { dg-do run { target aarch64_sve_hw } } */ /* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */ /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE unsigned int #define TYPE uint32_t
#define ITYPE int #define ITYPE int32_t
#include "struct_vect_7_run.c" #include "struct_vect_7_run.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment