===================================================================
@@ -44,8 +44,16 @@ if { [check_effective_target_aarch64_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.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/$pattern.\[cCS\]]] \
$sve_flags $DEFAULT_CFLAGS
# All done.
===================================================================
@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1)))
main (void)
{
- unsigned int a[N] = {
+ TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
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)
__builtin_abort ();
===================================================================
@@ -8,15 +8,15 @@ extern void abort (void) __attribute__ (
int __attribute__ ((optimize (1)))
main (void)
{
- short a[N] = {
+ TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
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)
abort ();
===================================================================
@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1)))
main (void)
{
- long a[N] = {
+ TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
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)
__builtin_abort ();
===================================================================
@@ -6,15 +6,15 @@
int __attribute__ ((optimize (1)))
main (void)
{
- unsigned char a[N] = {
+ TYPE a[N] = {
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
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)
__builtin_abort ();
===================================================================
@@ -1,7 +1,9 @@
/* { dg-do compile } */
/* { 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
foo (vnx16qi x, vnx16qi y)
===================================================================
@@ -1,7 +1,9 @@
/* { dg-do compile } */
/* { 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
foo (vnx8hi x, vnx8hi y)
===================================================================
@@ -1,7 +1,9 @@
/* { dg-do compile } */
/* { 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
foo (vnx4si x, vnx4si y)
===================================================================
@@ -1,7 +1,9 @@
/* { dg-do compile } */
/* { 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
foo (vnx2di x, vnx2di y)
===================================================================
@@ -1,14 +1,16 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize -save-temps" } */
+#include <stdint.h>
+
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)
- 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]+, #1, 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 } } */
-/* { 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]+\]\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 { xfail ilp32 } } } */
+/* { 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 { xfail ilp32 } } } */
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O3 --save-temps" } */
+#include <stdint.h>
+
#define DO_CONSTANT(VALUE, TYPE, OP, NAME) \
void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count) \
{ \
@@ -78,12 +80,12 @@ #define DO_LOGICAL_OPS(TYPE, OP, NAME)
DO_CONSTANT (-8, TYPE, OP, NAME ## minus8) \
DO_CONSTANT (-9, TYPE, OP, NAME ## minus9)
-DO_LOGICAL_OPS_BRIEF (char, &, and)
-DO_LOGICAL_OPS_BRIEF (long, &, and)
+DO_LOGICAL_OPS_BRIEF (int8_t, &, and)
+DO_LOGICAL_OPS_BRIEF (int64_t, &, and)
-DO_LOGICAL_OPS (int, &, and)
-DO_LOGICAL_OPS (int, |, or)
-DO_LOGICAL_OPS (int, ^, xor)
+DO_LOGICAL_OPS (int32_t, &, and)
+DO_LOGICAL_OPS (int32_t, |, or)
+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]+\.s, z[0-9]+\.s, #0x1\n} 1 } } */
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -14,22 +16,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -15,22 +17,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -18,22 +20,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -19,22 +21,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -20,22 +22,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
@@ -16,22 +18,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
- TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
- TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+ TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+ TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
#define TEST1(NAME, OUTTYPE) \
- TEST2 (NAME##_i8, OUTTYPE, signed char) \
- TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
- TEST2 (NAME##_i32, OUTTYPE, int) \
- TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+ TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+ TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+ TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+ TEST2 (NAME##_i64, OUTTYPE, uint64_t)
#define TEST(NAME) \
- TEST1 (NAME##_i8, signed char) \
- TEST1 (NAME##_i16, unsigned short) \
- TEST1 (NAME##_i32, int) \
- TEST1 (NAME##_i64, unsigned long) \
+ TEST1 (NAME##_i8, int8_t) \
+ TEST1 (NAME##_i16, uint16_t) \
+ TEST1 (NAME##_i32, int32_t) \
+ TEST1 (NAME##_i64, uint64_t) \
TEST2 (NAME##_f16_f16, _Float16, _Float16) \
TEST2 (NAME##_f32_f32, float, float) \
TEST2 (NAME##_f64_f64, double, double)
===================================================================
@@ -1,8 +1,10 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
+#include <stdint.h>
+
#ifndef TYPE
-#define TYPE unsigned char
+#define TYPE uint8_t
#endif
#ifndef NAME
===================================================================
@@ -1,7 +1,7 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned short
+#define TYPE uint16_t
#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} } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned short
+#define TYPE uint16_t
#include "struct_vect_1_run.c"
===================================================================
@@ -1,7 +1,7 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned int
+#define TYPE uint32_t
#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} } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned int
+#define TYPE uint32_t
#include "struct_vect_1_run.c"
===================================================================
@@ -1,7 +1,7 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned long
+#define TYPE uint64_t
#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} } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned long
+#define TYPE uint64_t
#include "struct_vect_1_run.c"
===================================================================
@@ -1,9 +1,11 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
+#include <stdint.h>
+
#ifndef TYPE
-#define TYPE unsigned char
-#define ITYPE signed char
+#define TYPE uint8_t
+#define ITYPE int8_t
#endif
void __attribute__ ((noinline, noclone))
===================================================================
@@ -1,8 +1,8 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned short
-#define ITYPE short
+#define TYPE uint16_t
+#define ITYPE int16_t
#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} } } */
===================================================================
@@ -1,6 +1,6 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned short
-#define ITYPE short
+#define TYPE uint16_t
+#define ITYPE int16_t
#include "struct_vect_7_run.c"
===================================================================
@@ -1,8 +1,8 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned int
-#define ITYPE int
+#define TYPE uint32_t
+#define ITYPE int32_t
#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} } } */
===================================================================
@@ -1,6 +1,6 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned int
-#define ITYPE int
+#define TYPE uint32_t
+#define ITYPE int32_t
#include "struct_vect_7_run.c"
===================================================================
@@ -1,8 +1,8 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned long
-#define ITYPE long
+#define TYPE uint64_t
+#define ITYPE int64_t
#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} } } */
===================================================================
@@ -1,6 +1,6 @@
/* { dg-do run { target aarch64_sve_hw } } */
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
-#define TYPE unsigned long
-#define ITYPE long
+#define TYPE uint64_t
+#define ITYPE int64_t
#include "struct_vect_7_run.c"
===================================================================
@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE _Float16
-#define ITYPE short
+#define ITYPE int16_t
#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} } } */
===================================================================
@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE _Float16
-#define ITYPE short
+#define ITYPE int16_t
#include "struct_vect_7_run.c"
===================================================================
@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE float
-#define ITYPE int
+#define ITYPE int32_t
#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} } } */
===================================================================
@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE float
-#define ITYPE int
+#define ITYPE int32_t
#include "struct_vect_7_run.c"
===================================================================
@@ -2,7 +2,7 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE double
-#define ITYPE long
+#define ITYPE int64_t
#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} } } */
===================================================================
@@ -2,5 +2,5 @@
/* { dg-options "-O2 -ftree-vectorize --save-temps" } */
#define TYPE double
-#define ITYPE long
+#define ITYPE int64_t
#include "struct_vect_7_run.c"
===================================================================
@@ -1,25 +1,25 @@
/* { dg-do assemble { target aarch64_asm_sve_ok } } */
/* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=256 --save-temps" } */
-#define TYPE unsigned char
+#define TYPE uint8_t
#define NAME(X) qi_##X
#include "struct_vect_1.c"
#undef NAME
#undef TYPE
-#define TYPE unsigned short
+#define TYPE uint16_t
#define NAME(X) hi_##X
#include "struct_vect_1.c"
#undef NAME
#undef TYPE
-#define TYPE unsigned int
+#define TYPE uint32_t
#define NAME(X) si_##X
#include "struct_vect_1.c"
#undef NAME
#undef TYPE
-#define TYPE unsigned long
+#define TYPE uint64_t
#define NAME(X) di_##X
#include "struct_vect_1.c"
#undef NAME
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define N 2000
#define TEST_LOOP(NAME, TYPE) \
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define N 2000
#define TEST_LOOP(NAME, TYPE) \
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define N 2000
#define TEST_LOOP(NAME, TYPE) \
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */
+#include <stdint.h>
+
#define TEST_LOOP(NAME, TYPE) \
void __attribute__ ((noinline, noclone)) \
NAME (TYPE *restrict dest, TYPE *restrict src, int n) \
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE) \
}
#define TEST(NAME) \
- TEST_LOOP (NAME##_i8, signed char) \
- TEST_LOOP (NAME##_i16, unsigned short) \
+ TEST_LOOP (NAME##_i8, int8_t) \
+ TEST_LOOP (NAME##_i16, uint16_t) \
TEST_LOOP (NAME##_f32, float) \
TEST_LOOP (NAME##_f64, double)
===================================================================
@@ -14,7 +14,7 @@ void __attribute__ ((noinline, noclone))
popcount_64 (unsigned int *restrict dst, uint64_t *restrict src, int size)
{
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 } } */