new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv_zvfh -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(_Float16)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse16.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse16.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(float)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse32.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse32.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(double)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse64.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse64.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(int16_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse16.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse16.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(int32_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse32.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse32.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(int64_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse64.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse64.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(int8_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse8.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse8.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(uint16_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse16.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse16.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(uint32_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse32.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse32.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(uint64_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse64.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse64.v} 1 } } */
new file mode 100644
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -fdump-rtl-expand-details" } */
+
+#include "strided_ld_st.h"
+
+DEF_STRIDED_LD_ST_FORM_1(uint8_t)
+
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_LOAD " 4 "expand" } } */
+/* { dg-final { scan-rtl-dump-times ".MASK_LEN_STRIDED_STORE " 4 "expand" } } */
+/* { dg-final { scan-assembler-times {vlse8.v} 1 } } */
+/* { dg-final { scan-assembler-times {vsse8.v} 1 } } */
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T _Float16
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T float
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T double
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T int16_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T int32_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T int64_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T int8_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T uint16_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T uint32_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T uint64_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-do run { target { riscv_v } } } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model" } */
+
+#include "strided_ld_st.h"
+#include "strided_ld_st_data.h"
+
+#define T uint8_t
+
+DEF_STRIDED_LD_ST_FORM_1_WRAP(T)
+
+#define DATA TEST_STRIDED_LD_ST_DATA_WRAP(T)
+#define RUN_STRIDED_LD_ST(out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size)
+
+#include "strided_ld_st_run.h"
new file mode 100644
@@ -0,0 +1,22 @@
+#ifndef HAVE_DEFINED_STRIDED_H
+#define HAVE_DEFINED_STRIDED_H
+
+#include <stdint-gcc.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+#define DEF_STRIDED_LD_ST_FORM_1(T) \
+ void __attribute__((noinline)) \
+ vec_strided_load_store_##T##_form_1 (T *restrict out, T *restrict in, \
+ long stride, size_t size) \
+ { \
+ for (size_t i = 0; i < size; i++) \
+ out[i * stride] = in[i * stride]; \
+ }
+#define DEF_STRIDED_LD_ST_FORM_1_WRAP(T) DEF_STRIDED_LD_ST_FORM_1(T)
+#define RUN_STRIDED_LD_ST_FORM_1(T, out, in, stride, size) \
+ vec_strided_load_store_##T##_form_1 (out, in, stride, size)
+#define RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size) \
+ RUN_STRIDED_LD_ST_FORM_1(T, out, in, stride, size)
+
+#endif
new file mode 100644
@@ -0,0 +1,1145 @@
+#ifndef HAVE_DEFINED_STRIDED_DATA_H
+#define HAVE_DEFINED_STRIDED_DATA_H
+
+#include <stdint-gcc.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+#define N 32
+#define TEST_STRIDED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 127, 127, 127,
+ 127, 127, 127, 127,
+ -128, -128, -128, -128,
+ -128, -128, -128, -128,
+ -128, -128, -128, -128,
+ -128, -128, -128, -128,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 127, 0, 0, 0,
+ 127, 0, 0, 0,
+ 127, 0, 0, 0,
+ 127, 0, 0, 0,
+ -128, 0, 0, 0,
+ -128, 0, 0, 0,
+ -128, 0, 0, 0,
+ -128, 0, 0, 0,
+ },
+ },
+};
+
+int16_t TEST_STRIDED_LD_ST_DATA(int16_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 32767, 32767, 32767, 32767,
+ 32767, 32767, 32767, 32767,
+ 32767, 32767, 32767, 32767,
+ 32767, 32767, 32767, 32767,
+ -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 32767, 0, 0, 0,
+ 32767, 0, 0, 0,
+ 32767, 0, 0, 0,
+ 32767, 0, 0, 0,
+ -32768, 0, 0, 0,
+ -32768, 0, 0, 0,
+ -32768, 0, 0, 0,
+ -32768, 0, 0, 0,
+ },
+ },
+};
+
+int32_t TEST_STRIDED_LD_ST_DATA(int32_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 2147483647, 2147483647, 2147483647, 2147483647,
+ 2147483647, 2147483647, 2147483647, 2147483647,
+ 2147483647, 2147483647, 2147483647, 2147483647,
+ 2147483647, 2147483647, 2147483647, 2147483647,
+ -2147483648, -2147483648, -2147483648, -2147483648,
+ -2147483648, -2147483648, -2147483648, -2147483648,
+ -2147483648, -2147483648, -2147483648, -2147483648,
+ -2147483648, -2147483648, -2147483648, -2147483648,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2147483647, 0, 0, 0,
+ 2147483647, 0, 0, 0,
+ 2147483647, 0, 0, 0,
+ 2147483647, 0, 0, 0,
+ -2147483648, 0, 0, 0,
+ -2147483648, 0, 0, 0,
+ -2147483648, 0, 0, 0,
+ -2147483648, 0, 0, 0,
+ },
+ },
+};
+
+int64_t TEST_STRIDED_LD_ST_DATA(int64_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll,
+ 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll,
+ 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll,
+ 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll, 9223372036854775807ll,
+ -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull,
+ -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull,
+ -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull,
+ -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull, -9223372036854775808ull,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 9223372036854775807ll, 0, 0, 0,
+ 9223372036854775807ll, 0, 0, 0,
+ 9223372036854775807ll, 0, 0, 0,
+ 9223372036854775807ll, 0, 0, 0,
+ -9223372036854775808ull, 0, 0, 0,
+ -9223372036854775808ull, 0, 0, 0,
+ -9223372036854775808ull, 0, 0, 0,
+ -9223372036854775808ull, 0, 0, 0,
+ },
+ },
+};
+
+uint8_t TEST_STRIDED_LD_ST_DATA(uint8_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 254, 254, 254, 254,
+ 254, 254, 254, 254,
+ 254, 254, 254, 254,
+ 254, 254, 254, 254,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 255, 0, 0, 0,
+ 255, 0, 0, 0,
+ 255, 0, 0, 0,
+ 255, 0, 0, 0,
+ 254, 0, 0, 0,
+ 254, 0, 0, 0,
+ 254, 0, 0, 0,
+ 254, 0, 0, 0,
+ },
+ },
+};
+
+uint16_t TEST_STRIDED_LD_ST_DATA(uint16_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 65535, 65535, 65535, 65535,
+ 65535, 65535, 65535, 65535,
+ 65535, 65535, 65535, 65535,
+ 65535, 65535, 65535, 65535,
+ 65534, 65534, 65534, 65534,
+ 65534, 65534, 65534, 65534,
+ 65534, 65534, 65534, 65534,
+ 65534, 65534, 65534, 65534,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0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, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 4294967295, 4294967295, 4294967295, 4294967295,
+ 4294967295, 4294967295, 4294967295, 4294967295,
+ 4294967295, 4294967295, 4294967295, 4294967295,
+ 4294967295, 4294967295, 4294967295, 4294967295,
+ 4294967294, 4294967294, 4294967294, 4294967294,
+ 4294967294, 4294967294, 4294967294, 4294967294,
+ 4294967294, 4294967294, 4294967294, 4294967294,
+ 4294967294, 4294967294, 4294967294, 4294967294,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 4294967295, 0, 0, 0,
+ 4294967295, 0, 0, 0,
+ 4294967295, 0, 0, 0,
+ 4294967295, 0, 0, 0,
+ 4294967294, 0, 0, 0,
+ 4294967294, 0, 0, 0,
+ 4294967294, 0, 0, 0,
+ 4294967294, 0, 0, 0,
+ },
+ },
+};
+
+uint64_t TEST_STRIDED_LD_ST_DATA(uint64_t)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ 2, 3, 9, 7,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ 2, 0, 9, 0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull,
+ 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull,
+ 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull,
+ 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull, 18446744073709551615ull,
+ 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull,
+ 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull,
+ 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull,
+ 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull, 18446744073709551614ull,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 18446744073709551615ull, 0, 0, 0,
+ 18446744073709551615ull, 0, 0, 0,
+ 18446744073709551615ull, 0, 0, 0,
+ 18446744073709551615ull, 0, 0, 0,
+ 18446744073709551614ull, 0, 0, 0,
+ 18446744073709551614ull, 0, 0, 0,
+ 18446744073709551614ull, 0, 0, 0,
+ 18446744073709551614ull, 0, 0, 0,
+ },
+ },
+};
+
+_Float16 TEST_STRIDED_LD_ST_DATA(_Float16)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1.4, 0.2, 0.8, 0.8,
+ 0.4, 1.2, 0.8, 0.8,
+ 0.4, 0.2, 1.8, 0.8,
+ 0.4, 0.2, 0.8, 1.8,
+ 1.4, 0.2, 0.8, 0.8,
+ 0.4, 1.2, 0.8, 0.8,
+ 0.4, 0.2, 1.8, 0.8,
+ 0.4, 0.2, 0.8, 1.8,
+ },
+ { /* output */
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ },
+ { /* expect */
+ 1.4, 0.2, 0.8, 0.8,
+ 0.4, 1.2, 0.8, 0.8,
+ 0.4, 0.2, 1.8, 0.8,
+ 0.4, 0.2, 0.8, 1.8,
+ 1.4, 0.2, 0.8, 0.8,
+ 0.4, 1.2, 0.8, 0.8,
+ 0.4, 0.2, 1.8, 0.8,
+ 0.4, 0.2, 0.8, 1.8,
+ },
+ },
+ {
+ { 2 }, /* stride */
+ { /* input */
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ 2.6, 3.1, 9.4, 7.8,
+ },
+ { /* output */
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ },
+ { /* expect */
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 127.8, 127.8, 127.8, 127.8,
+ 127.8, 127.8, 127.8, 127.8,
+ 127.8, 127.8, 127.8, 127.8,
+ 127.8, 127.8, 127.8, 127.8,
+ -128.2, -128.2, -128.2, -128.2,
+ -128.2, -128.2, -128.2, -128.2,
+ -128.2, -128.2, -128.2, -128.2,
+ -128.2, -128.2, -128.2, -128.2,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 127.8, 0, 0, 0,
+ 127.8, 0, 0, 0,
+ 127.8, 0, 0, 0,
+ 127.8, 0, 0, 0,
+ -128.2, 0, 0, 0,
+ -128.2, 0, 0, 0,
+ -128.2, 0, 0, 0,
+ -128.2, 0, 0, 0,
+ },
+ },
+};
+
+float TEST_STRIDED_LD_ST_DATA(float)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+ { /* input */
+ 1.4,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.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0,
+ 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0,
+ 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0,
+ 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0, 148885872271752691712.0,
+ -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0,
+ -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0,
+ -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0,
+ -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0, -639460027801474761417333669888.0,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 148885872271752691712.0, 0, 0, 0,
+ 148885872271752691712.0, 0, 0, 0,
+ 148885872271752691712.0, 0, 0, 0,
+ 148885872271752691712.0, 0, 0, 0,
+ -639460027801474761417333669888.0, 0, 0, 0,
+ -639460027801474761417333669888.0, 0, 0, 0,
+ -639460027801474761417333669888.0, 0, 0, 0,
+ -639460027801474761417333669888.0, 0, 0, 0,
+ },
+ },
+};
+
+double TEST_STRIDED_LD_ST_DATA(double)[][4][N] =
+{
+ {
+ { 1 }, /* stride */
+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.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ 2.6, 0.0, 9.4, 0.0,
+ },
+ },
+ {
+ { 4 }, /* stride */
+ { /* input */
+ 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0,
+ 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0,
+ 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0,
+ 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0, 98789784453484056064183762944.0,
+ -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0,
+ -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0,
+ -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0,
+ -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0, -1507412482505555054690304.0,
+ },
+ { /* output */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ },
+ { /* expect */
+ 98789784453484056064183762944.0, 0, 0, 0,
+ 98789784453484056064183762944.0, 0, 0, 0,
+ 98789784453484056064183762944.0, 0, 0, 0,
+ 98789784453484056064183762944.0, 0, 0, 0,
+ -1507412482505555054690304.0, 0, 0, 0,
+ -1507412482505555054690304.0, 0, 0, 0,
+ -1507412482505555054690304.0, 0, 0, 0,
+ -1507412482505555054690304.0, 0, 0, 0,
+ },
+ },
+};
+
+#endif
new file mode 100644
@@ -0,0 +1,27 @@
+#ifndef HAVE_DEFINE_STRIDED_LD_ST_H
+#define HAVE_DEFINE_STRIDED_LD_ST_H
+
+int
+main ()
+{
+ unsigned i, k;
+
+ for (i = 0; i < sizeof (DATA) / sizeof (DATA[0]); i++)
+ {
+ T stride = DATA[i][0][0];
+ T *in = DATA[i][1];
+ T *out = DATA[i][2];
+ T *expect = DATA[i][3];
+
+ RUN_STRIDED_LD_ST (out, in, stride, N / stride);
+
+ for (k = 0; k < N; k = k + stride)
+ if (out[k] != expect[k])
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+#endif
+
@@ -120,6 +120,8 @@ set AUTOVEC_TEST_OPTS [list \
foreach op $AUTOVEC_TEST_OPTS {
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/autovec/gather-scatter/*.\[cS\]]] \
"" "$op"
+ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/autovec/strided/*.\[cS\]]] \
+ "" "$op"
}
# All done.