Projects
Mega:24.03:SP1:Everything
gcc
_service:tar_scm:LoongArch-Add-tests-for-ASX-ve...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:LoongArch-Add-tests-for-ASX-vector-xvadd-xvadda-xvad.patch of Package gcc
From a6d51c0d69572f800f63c3215b7de6665024104c Mon Sep 17 00:00:00 2001 From: Xiaolong Chen <chenxiaolong@loongson.cn> Date: Tue, 12 Sep 2023 15:15:40 +0800 Subject: [PATCH 099/124] LoongArch: Add tests for ASX vector xvadd/xvadda/xvaddi/xvaddwev/ xvaddwodxvsadd instructions. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/lasx-xvadd.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvadda.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddi.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwev-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwev-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwev-3.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwod-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwod-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvaddwod-3.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsadd-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsadd-2.c: New test. Signed-off-by: Peng Fan <fanpeng@loongson.cn> Signed-off-by: ticat_fp <fanpeng@loongson.cn> --- .../loongarch/vector/lasx/lasx-xvadd.c | 725 ++++++++++++++++ .../loongarch/vector/lasx/lasx-xvadda.c | 785 ++++++++++++++++++ .../loongarch/vector/lasx/lasx-xvaddi.c | 427 ++++++++++ .../loongarch/vector/lasx/lasx-xvaddwev-1.c | 740 +++++++++++++++++ .../loongarch/vector/lasx/lasx-xvaddwev-2.c | 485 +++++++++++ .../loongarch/vector/lasx/lasx-xvaddwev-3.c | 515 ++++++++++++ .../loongarch/vector/lasx/lasx-xvaddwod-1.c | 530 ++++++++++++ .../loongarch/vector/lasx/lasx-xvaddwod-2.c | 560 +++++++++++++ .../loongarch/vector/lasx/lasx-xvaddwod-3.c | 485 +++++++++++ .../loongarch/vector/lasx/lasx-xvsadd-1.c | 650 +++++++++++++++ .../loongarch/vector/lasx/lasx-xvsadd-2.c | 350 ++++++++ 11 files changed, 6252 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadd.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadda.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddi.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-3.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-3.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-2.c diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadd.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadd.c new file mode 100644 index 000000000..293295723 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadd.c @@ -0,0 +1,725 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xfffffefefffffefe; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x41cfe01dde000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x41cfe01dde000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x41cfe01dde000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x41cfe01dde000000; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000004000000040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000004000000040; + __m256i_out = __lasx_xvadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffefffefffefffe; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000200; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7f8000007f800000; + *((unsigned long *)&__m256i_op0[2]) = 0x7f8000007f800000; + *((unsigned long *)&__m256i_op0[1]) = 0x7f8000007f800000; + *((unsigned long *)&__m256i_op0[0]) = 0x7f8000007f800000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x7f8000007f7fffff; + *((unsigned long *)&__m256i_result[2]) = 0x7f8000007f7fffff; + *((unsigned long *)&__m256i_result[1]) = 0x7f8000007f7fffff; + *((unsigned long *)&__m256i_result[0]) = 0x7f8000007f7fffff; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffff900000800; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffff900000800; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00b213171dff0606; + *((unsigned long *)&__m256i_op1[2]) = 0x00e9a80014ff0000; + *((unsigned long *)&__m256i_op1[1]) = 0x00b213171dff0606; + *((unsigned long *)&__m256i_op1[0]) = 0x00e9a80014ff0000; + *((unsigned long *)&__m256i_result[3]) = 0x00b213171dff0606; + *((unsigned long *)&__m256i_result[2]) = 0x00e9a80014ff0000; + *((unsigned long *)&__m256i_result[1]) = 0x00b213171dff0606; + *((unsigned long *)&__m256i_result[0]) = 0x00e9a80014ff0000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000956a; + *((unsigned long *)&__m256i_op0[2]) = 0x000000004efffe00; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000956a; + *((unsigned long *)&__m256i_op0[0]) = 0x000000004efffe00; + *((unsigned long *)&__m256i_op1[3]) = 0x007fffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xb500000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x007fffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xb500000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x007fffffffff9569; + *((unsigned long *)&__m256i_result[2]) = 0xb50000004efffe00; + *((unsigned long *)&__m256i_result[1]) = 0x007fffffffff9569; + *((unsigned long *)&__m256i_result[0]) = 0xb50000004efffe00; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_result[3]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_result[1]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ff01; + __m256i_out = __lasx_xvadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000ffff8000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x06f880008000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[0]) = 0x800080008000b8f1; + *((unsigned long *)&__m256i_op1[3]) = 0x8000010180000101; + *((unsigned long *)&__m256i_op1[2]) = 0xfa08800080000101; + *((unsigned long *)&__m256i_op1[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[0]) = 0x800080008000480f; + *((unsigned long *)&__m256i_result[3]) = 0x0001010000010100; + *((unsigned long *)&__m256i_result[2]) = 0x0101000000010100; + *((unsigned long *)&__m256i_result[1]) = 0x0001000000010000; + *((unsigned long *)&__m256i_result[0]) = 0x0001000000010100; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00ffffffffff605a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00ffffffffff605a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ffffffffff605a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00ffffffffff605a; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x5555555536aaaaac; + *((unsigned long *)&__m256i_op0[2]) = 0x55555555aaaaaaac; + *((unsigned long *)&__m256i_op0[1]) = 0x5555555536aaaaac; + *((unsigned long *)&__m256i_op0[0]) = 0x55555555aaaaaaac; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x5555555536aaaaac; + *((unsigned long *)&__m256i_result[2]) = 0x55555555aaaaaaac; + *((unsigned long *)&__m256i_result[1]) = 0x5555555536aaaaac; + *((unsigned long *)&__m256i_result[0]) = 0x55555555aaaaaaac; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000154dc84; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000089; + *((unsigned long *)&__m256i_result[3]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_result[2]) = 0x000000000154dc84; + *((unsigned long *)&__m256i_result[1]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000089; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000014402080144; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000014402080144; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000014402080144; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000014402080144; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000800000008; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000008; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0202010202020102; + *((unsigned long *)&__m256i_op0[2]) = 0x0202010202020102; + *((unsigned long *)&__m256i_op0[1]) = 0x0202010202020102; + *((unsigned long *)&__m256i_op0[0]) = 0x0202010202020102; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0202010202020102; + *((unsigned long *)&__m256i_result[2]) = 0x0202010202020102; + *((unsigned long *)&__m256i_result[1]) = 0x0202010202020102; + *((unsigned long *)&__m256i_result[0]) = 0x0202010202020102; + __m256i_out = __lasx_xvadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003fff3fff; + *((unsigned long *)&__m256i_op0[1]) = 0x3fff3fff3fff4000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000403f3fff; + *((unsigned long *)&__m256i_op1[3]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000003fff3fff; + *((unsigned long *)&__m256i_op1[1]) = 0x3fff3fff3fff4000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000403f3fff; + *((unsigned long *)&__m256i_result[3]) = 0x7ffe7ffe7ffe7ffe; + *((unsigned long *)&__m256i_result[2]) = 0x000000007ffe7ffe; + *((unsigned long *)&__m256i_result[1]) = 0x7ffe7ffe7ffe8000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000807e7ffe; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[2]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[1]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[0]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[3]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[2]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[1]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[0]) = 0x6161616161616161; + *((unsigned long *)&__m256i_result[3]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[2]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[1]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[0]) = 0xc2c2c2c2c2c2c2c2; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_op1[1]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[0]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[3]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_result[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[1]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_result[0]) = 0x7f807f007f7f817f; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op1[3]) = 0x000000006040190d; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000000006040190d; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000860601934; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_result[1]) = 0x0000000860601934; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800200028; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010001; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000045; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000d0005; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000045; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000d0005; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000045; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000d0005; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000045; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000d0005; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op0[2]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op0[1]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op0[0]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000c0000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000040000000; + *((unsigned long *)&__m256i_result[3]) = 0x0020001f001f001e; + *((unsigned long *)&__m256i_result[2]) = 0x001f001fc01f001f; + *((unsigned long *)&__m256i_result[1]) = 0x0020001f001f001e; + *((unsigned long *)&__m256i_result[0]) = 0x001f001f401f001f; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x7fff7ffeffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7ffeffffffff; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[2]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[0]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[2]) = 0x800000ff800000ff; + *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_result[0]) = 0x800000ff800000ff; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000010000080040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000010000080040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000080040; + *((unsigned long *)&__m256i_result[2]) = 0x0000010000080040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000080040; + *((unsigned long *)&__m256i_result[0]) = 0x0000010000080040; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffff0000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffff0000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffeffff0000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffeffff0000; + __m256i_out = __lasx_xvadd_q (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadda.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadda.c new file mode 100644 index 000000000..d6b57d1cd --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvadda.c @@ -0,0 +1,785 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0101000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0101000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000008000000080; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000008000000080; + *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[2]) = 0x0101008000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[0]) = 0x0101008000000080; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000401000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000401000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000401000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000401000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000402000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000402000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000402000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000402000000; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffffeffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000101; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100010102; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000102; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000102; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xefefefefefefefef; + *((unsigned long *)&__m256i_op0[2]) = 0xefefefefefefefef; + *((unsigned long *)&__m256i_op0[1]) = 0xefefefefefefef6e; + *((unsigned long *)&__m256i_op0[0]) = 0xeeeeeeeeeeeeeeee; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x1010101010101012; + *((unsigned long *)&__m256i_result[2]) = 0x1010101010101012; + *((unsigned long *)&__m256i_result[1]) = 0x1010101010101093; + *((unsigned long *)&__m256i_result[0]) = 0x1111111111111113; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op1[3]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0110000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0110000000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0110000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0110000000000080; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xf000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xf000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xf000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x1000000000000000; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xce7ffffffffffffe; + *((unsigned long *)&__m256i_op1[2]) = 0x6300000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xce7ffffffffffffe; + *((unsigned long *)&__m256i_op1[0]) = 0x6300000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x327f010101010102; + *((unsigned long *)&__m256i_result[2]) = 0x6300000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x327f010101010102; + *((unsigned long *)&__m256i_result[0]) = 0x6300000000000000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffff5556aaaa; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff5556aaaa; + *((unsigned long *)&__m256i_op1[3]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0002000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0002000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_result[2]) = 0x00020000aaa95556; + *((unsigned long *)&__m256i_result[1]) = 0x0006ffff0004ffff; + *((unsigned long *)&__m256i_result[0]) = 0x00020000aaa95556; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xdb801b6d0962003f; + *((unsigned long *)&__m256i_op1[2]) = 0xdb8a3109fe0f0024; + *((unsigned long *)&__m256i_op1[1]) = 0x9a7f997fff01ffff; + *((unsigned long *)&__m256i_op1[0]) = 0xbe632a4f1c3c5653; + *((unsigned long *)&__m256i_result[3]) = 0x247fe49409620040; + *((unsigned long *)&__m256i_result[2]) = 0x2475cef801f0ffdd; + *((unsigned long *)&__m256i_result[1]) = 0x6580668200fe0002; + *((unsigned long *)&__m256i_result[0]) = 0x419cd5b11c3c5654; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x017e01fe01fe01fe; + *((unsigned long *)&__m256i_op0[2]) = 0x0586060601fe0202; + *((unsigned long *)&__m256i_op0[1]) = 0x017e01fe01fe0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0586060601fe0004; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op1[2]) = 0x0010001000100001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op1[0]) = 0x0010001000100001; + *((unsigned long *)&__m256i_result[3]) = 0x017f01fe01ff01fe; + *((unsigned long *)&__m256i_result[2]) = 0x05960616020e0203; + *((unsigned long *)&__m256i_result[1]) = 0x017f01fe01ff0000; + *((unsigned long *)&__m256i_result[0]) = 0x05960616020e0005; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000045; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000d0005; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000045; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000d0005; + *((unsigned long *)&__m256i_op1[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010146; + *((unsigned long *)&__m256i_result[2]) = 0x01010101010e0106; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010146; + *((unsigned long *)&__m256i_result[0]) = 0x01010101010e0106; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[2]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[1]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[0]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[2]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[1]) = 0x0010000000100000; + *((unsigned long *)&__m256i_result[0]) = 0x0010000000100000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffffb79fb74; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffffffffffa; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffffb79fb74; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffffffffffa; + *((unsigned long *)&__m256i_result[3]) = 0x000000010486048c; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000006; + *((unsigned long *)&__m256i_result[1]) = 0x000000010486048c; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000006; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000020000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000004411; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000004411; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00040000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x00010001000c4411; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100044411; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000002000000018; + *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000019; + *((unsigned long *)&__m256i_op0[1]) = 0x000000200000001e; + *((unsigned long *)&__m256i_op0[0]) = 0x0000002000000019; + *((unsigned long *)&__m256i_op1[3]) = 0x223d76f09f3881ff; + *((unsigned long *)&__m256i_op1[2]) = 0x3870ca8d013e76a0; + *((unsigned long *)&__m256i_op1[1]) = 0x223d76f09f37e357; + *((unsigned long *)&__m256i_op1[0]) = 0x43ec0a1b2aba7ed0; + *((unsigned long *)&__m256i_result[3]) = 0x223d771060c77e19; + *((unsigned long *)&__m256i_result[2]) = 0x3870caad013e76b9; + *((unsigned long *)&__m256i_result[1]) = 0x223d771060c81cc7; + *((unsigned long *)&__m256i_result[0]) = 0x43ec0a3b2aba7ee9; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xdbcbdbcbecececec; + *((unsigned long *)&__m256i_op0[2]) = 0xdbcbdbcb0000dbcb; + *((unsigned long *)&__m256i_op0[1]) = 0xdbcbdbcbecececec; + *((unsigned long *)&__m256i_op0[0]) = 0xdbcbdbcb0000dbcb; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x2535253514141414; + *((unsigned long *)&__m256i_result[2]) = 0x2535253500002535; + *((unsigned long *)&__m256i_result[1]) = 0x2535253514141414; + *((unsigned long *)&__m256i_result[0]) = 0x2535253500002535; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0020000f0000000f; + *((unsigned long *)&__m256i_op0[2]) = 0x0010000f0000000f; + *((unsigned long *)&__m256i_op0[1]) = 0x0020000f0000000f; + *((unsigned long *)&__m256i_op0[0]) = 0x0010000f0000000f; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0020000f0000000f; + *((unsigned long *)&__m256i_result[2]) = 0x0010000f0000000f; + *((unsigned long *)&__m256i_result[1]) = 0x0020000f0000000f; + *((unsigned long *)&__m256i_result[0]) = 0x0010000f0000000f; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000504f00002361; + *((unsigned long *)&__m256i_op0[2]) = 0xffff8f81000040e4; + *((unsigned long *)&__m256i_op0[1]) = 0x0000504f00002361; + *((unsigned long *)&__m256i_op0[0]) = 0xffff8f81000040e4; + *((unsigned long *)&__m256i_op1[3]) = 0x000007ff000007ff; + *((unsigned long *)&__m256i_op1[2]) = 0x000007ff00000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000007ff000007ff; + *((unsigned long *)&__m256i_op1[0]) = 0x000007ff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000584e00002b60; + *((unsigned long *)&__m256i_result[2]) = 0x0000787dffffbf1c; + *((unsigned long *)&__m256i_result[1]) = 0x0000584e00002b60; + *((unsigned long *)&__m256i_result[0]) = 0x0000787dffffbf1c; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffe00000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffe00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010200000000; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010200000000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fefffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op1[1]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_op1[0]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_result[3]) = 0x7fef010000010100; + *((unsigned long *)&__m256i_result[2]) = 0x7fef010000010100; + *((unsigned long *)&__m256i_result[1]) = 0x7fef010000010100; + *((unsigned long *)&__m256i_result[0]) = 0x7fef010000010100; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000000001fe; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x40b2bf4d30313031; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fffa2bea2be; + *((unsigned long *)&__m256i_op0[1]) = 0x40b2bf4d30313031; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fffa2bea2be; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x40b240b330313031; + *((unsigned long *)&__m256i_result[2]) = 0x7fff7fff5d425d42; + *((unsigned long *)&__m256i_result[1]) = 0x40b240b330313031; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7fff5d425d42; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000100040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000100040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000100040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000100040; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000100040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000100040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000100080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000100080; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff896099cbdbfff1; + *((unsigned long *)&__m256i_op0[2]) = 0xc987ffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xff896099cbdbfff1; + *((unsigned long *)&__m256i_op0[0]) = 0xc987ffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00769f673424000f; + *((unsigned long *)&__m256i_result[2]) = 0x3678000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x00769f673424000f; + *((unsigned long *)&__m256i_result[0]) = 0x3678000100000001; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadda_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000007ffffffce; + *((unsigned long *)&__m256i_op0[1]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000007ffffffce; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000500000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000700000032; + *((unsigned long *)&__m256i_result[1]) = 0x0000000500000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000700000032; + __m256i_out = __lasx_xvadda_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000400000004000; + *((unsigned long *)&__m256i_op1[3]) = 0x00003feec0108022; + *((unsigned long *)&__m256i_op1[2]) = 0x00003fe9c015802c; + *((unsigned long *)&__m256i_op1[1]) = 0x00003feec0108022; + *((unsigned long *)&__m256i_op1[0]) = 0x00003fe9c015802c; + *((unsigned long *)&__m256i_result[3]) = 0x00007f124010c022; + *((unsigned long *)&__m256i_result[2]) = 0x00007f174015c02c; + *((unsigned long *)&__m256i_result[1]) = 0x00007f124010c022; + *((unsigned long *)&__m256i_result[0]) = 0x00007f174015c02c; + __m256i_out = __lasx_xvadda_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0xfa15fa15fa15fa14; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0xfa15fa15fa15fa14; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x05ea05ea05ea05ec; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x05ea05ea05ea05ec; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000010101010101; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000010101010101; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000010101010101; + *((unsigned long *)&__m256i_op1[2]) = 0x0101000000010000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000010101010101; + *((unsigned long *)&__m256i_op1[0]) = 0x0101000000010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000020202020202; + *((unsigned long *)&__m256i_result[2]) = 0x0101000000010000; + *((unsigned long *)&__m256i_result[1]) = 0x0000020202020202; + *((unsigned long *)&__m256i_result[0]) = 0x0101000000010000; + __m256i_out = __lasx_xvadda_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddi.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddi.c new file mode 100644 index 000000000..054bf6e55 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddi.c @@ -0,0 +1,427 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x44bb2cd3a35c2fd0; + *((unsigned long *)&__m256i_op0[0]) = 0xca355ba46a95e31c; + *((unsigned long *)&__m256i_result[3]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_result[2]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_result[1]) = 0x61d849f0c0794ced; + *((unsigned long *)&__m256i_result[0]) = 0xe75278c187b20039; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffbf7f7fff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffe651bfff; + *((unsigned long *)&__m256i_result[3]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_result[2]) = 0x1d1d1d1ddd9d9d1d; + *((unsigned long *)&__m256i_result[1]) = 0x1d1d1d1d1d1d1d1d; + *((unsigned long *)&__m256i_result[0]) = 0x1d1d1d1d046fdd1d; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1515151515151515; + *((unsigned long *)&__m256i_result[2]) = 0x1515151515151515; + *((unsigned long *)&__m256i_result[1]) = 0x1515151515151515; + *((unsigned long *)&__m256i_result[0]) = 0x1515151515151515; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1818181818181818; + *((unsigned long *)&__m256i_result[2]) = 0x1818181818181818; + *((unsigned long *)&__m256i_result[1]) = 0x1818181818181818; + *((unsigned long *)&__m256i_result[0]) = 0x1818181818181818; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00007fff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00007fff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0202020202020202; + *((unsigned long *)&__m256i_result[2]) = 0x0202810102020202; + *((unsigned long *)&__m256i_result[1]) = 0x0202020202020202; + *((unsigned long *)&__m256i_result[0]) = 0x0202810102020202; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[2]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[1]) = 0x0909090909090909; + *((unsigned long *)&__m256i_result[0]) = 0x0909090909090909; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ffce20; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ffce20; + *((unsigned long *)&__m256i_result[3]) = 0x1514151415141514; + *((unsigned long *)&__m256i_result[2]) = 0x151415141514e335; + *((unsigned long *)&__m256i_result[1]) = 0x1514151415141514; + *((unsigned long *)&__m256i_result[0]) = 0x151415141514e335; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0606060606060606; + *((unsigned long *)&__m256i_result[2]) = 0x0606060606060606; + *((unsigned long *)&__m256i_result[1]) = 0x0606060606060606; + *((unsigned long *)&__m256i_result[0]) = 0x0606060606060606; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1212121212121212; + *((unsigned long *)&__m256i_result[2]) = 0x1212121212121212; + *((unsigned long *)&__m256i_result[1]) = 0x1212121212121212; + *((unsigned long *)&__m256i_result[0]) = 0x1212121212121212; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000001200000012; + *((unsigned long *)&__m256i_op0[2]) = 0x0000001200000012; + *((unsigned long *)&__m256i_op0[1]) = 0x0000001200000012; + *((unsigned long *)&__m256i_op0[0]) = 0x0000001200000012; + *((unsigned long *)&__m256i_result[3]) = 0x1a1a1a2c1a1a1a2c; + *((unsigned long *)&__m256i_result[2]) = 0x1a1a1a2c1a1a1a2c; + *((unsigned long *)&__m256i_result[1]) = 0x1a1a1a2c1a1a1a2c; + *((unsigned long *)&__m256i_result[0]) = 0x1a1a1a2c1a1a1a2c; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x1d1d1d1e1d1d1d1e; + *((unsigned long *)&__m256i_result[2]) = 0x1d1d1d1e1d1d1d1e; + *((unsigned long *)&__m256i_result[1]) = 0x1d1d1d1e1d1d1d1e; + *((unsigned long *)&__m256i_result[0]) = 0x1d1d1d1e1d1d1d1e; + __m256i_out = __lasx_xvaddi_bu (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x5980000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x5980000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[2]) = 0x5982000200020002; + *((unsigned long *)&__m256i_result[1]) = 0x0002000200020002; + *((unsigned long *)&__m256i_result[0]) = 0x5982000200020002; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000002a54290; + *((unsigned long *)&__m256i_result[3]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_result[2]) = 0x001f001f02c442af; + *((unsigned long *)&__m256i_result[1]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_result[0]) = 0x001f001f02c442af; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[2]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[1]) = 0x0010001000100010; + *((unsigned long *)&__m256i_result[0]) = 0x0010001000100010; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x807e80fd80fe80fd; + *((unsigned long *)&__m256i_op0[2]) = 0x80938013800d8002; + *((unsigned long *)&__m256i_op0[1]) = 0x807e80fd80fe0000; + *((unsigned long *)&__m256i_op0[0]) = 0x80938013800d0005; + *((unsigned long *)&__m256i_result[3]) = 0x8091811081118110; + *((unsigned long *)&__m256i_result[2]) = 0x80a6802680208015; + *((unsigned long *)&__m256i_result[1]) = 0x8091811081110013; + *((unsigned long *)&__m256i_result[0]) = 0x80a6802680200018; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000003f00390035; + *((unsigned long *)&__m256i_op0[2]) = 0x8015003f0006001f; + *((unsigned long *)&__m256i_op0[1]) = 0x0000003f00390035; + *((unsigned long *)&__m256i_op0[0]) = 0x8015003f0006001f; + *((unsigned long *)&__m256i_result[3]) = 0x000b004a00440040; + *((unsigned long *)&__m256i_result[2]) = 0x8020004a0011002a; + *((unsigned long *)&__m256i_result[1]) = 0x000b004a00440040; + *((unsigned long *)&__m256i_result[0]) = 0x8020004a0011002a; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0016001600160016; + *((unsigned long *)&__m256i_result[2]) = 0x0016001600160016; + *((unsigned long *)&__m256i_result[1]) = 0x0016001600160016; + *((unsigned long *)&__m256i_result[0]) = 0x0016001600160016; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xa1a1a1a1a1a1a1a1; + *((unsigned long *)&__m256i_op0[2]) = 0xa1a1a1a15e5e5e5e; + *((unsigned long *)&__m256i_op0[1]) = 0xa1a1a1a1a1a1a1a1; + *((unsigned long *)&__m256i_op0[0]) = 0xa1a1a1a15e5e5e5e; + *((unsigned long *)&__m256i_result[3]) = 0xa1bfa1bfa1bfa1bf; + *((unsigned long *)&__m256i_result[2]) = 0xa1bfa1bf5e7c5e7c; + *((unsigned long *)&__m256i_result[1]) = 0xa1bfa1bfa1bfa1bf; + *((unsigned long *)&__m256i_result[0]) = 0xa1bfa1bf5e7c5e7c; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000100080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000100080; + *((unsigned long *)&__m256i_result[3]) = 0x001a001a001a009a; + *((unsigned long *)&__m256i_result[2]) = 0x001a001a002a009a; + *((unsigned long *)&__m256i_result[1]) = 0x001a001a001a009a; + *((unsigned long *)&__m256i_result[0]) = 0x001a001a002a009a; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[3]) = 0x001c001c001c001c; + *((unsigned long *)&__m256i_result[2]) = 0x001c001c001c001c; + *((unsigned long *)&__m256i_result[1]) = 0x001c001c001c001c; + *((unsigned long *)&__m256i_result[0]) = 0x001c001c001d001d; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7200000072000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7200000072000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7200000072000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7200000072000000; + *((unsigned long *)&__m256i_result[3]) = 0x721e001e721e001e; + *((unsigned long *)&__m256i_result[2]) = 0x721e001e721e001e; + *((unsigned long *)&__m256i_result[1]) = 0x721e001e721e001e; + *((unsigned long *)&__m256i_result[0]) = 0x721e001e721e001e; + __m256i_out = __lasx_xvaddi_hu (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[2]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[1]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[0]) = 0x0000001900000019; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x19); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000600000006; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[2]) = 0x0000001a0000001a; + *((unsigned long *)&__m256i_result[1]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[0]) = 0x0000001a0000001a; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[2]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[1]) = 0x0000001900000019; + *((unsigned long *)&__m256i_result[0]) = 0x0000001900000019; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x19); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000001d0000001d; + *((unsigned long *)&__m256i_result[2]) = 0x0000001d0000001d; + *((unsigned long *)&__m256i_result[1]) = 0x0000001d0000001d; + *((unsigned long *)&__m256i_result[0]) = 0x0000001d0000001d; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000600000006; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000001fffd; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000001fffd; + *((unsigned long *)&__m256i_result[3]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[2]) = 0x0000000700020004; + *((unsigned long *)&__m256i_result[1]) = 0x0000000600000006; + *((unsigned long *)&__m256i_result[0]) = 0x0000000700020004; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000800000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000008; + __m256i_out = __lasx_xvaddi_wu (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000019410000e69a; + *((unsigned long *)&__m256i_op0[2]) = 0xf259905a0c126604; + *((unsigned long *)&__m256i_op0[1]) = 0x0000883a00000f20; + *((unsigned long *)&__m256i_op0[0]) = 0x6d3c2d3aa1c82947; + *((unsigned long *)&__m256i_result[3]) = 0x000019410000e6aa; + *((unsigned long *)&__m256i_result[2]) = 0xf259905a0c126614; + *((unsigned long *)&__m256i_result[1]) = 0x0000883a00000f30; + *((unsigned long *)&__m256i_result[0]) = 0x6d3c2d3aa1c82957; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0x10); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000000d; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000000d; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000000d; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000d; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff0fff0ff01ff01; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0fff0fff0fff0; + *((unsigned long *)&__m256i_op0[1]) = 0xfff0fff0ff01ff01; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0fff0fff0fff0; + *((unsigned long *)&__m256i_result[3]) = 0xfff0fff0ff01ff14; + *((unsigned long *)&__m256i_result[2]) = 0xfff0fff0fff10003; + *((unsigned long *)&__m256i_result[1]) = 0xfff0fff0ff01ff14; + *((unsigned long *)&__m256i_result[0]) = 0xfff0fff0fff10003; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000504fffff3271; + *((unsigned long *)&__m256i_op0[2]) = 0xffff47b4ffff5879; + *((unsigned long *)&__m256i_op0[1]) = 0x0000504fffff3271; + *((unsigned long *)&__m256i_op0[0]) = 0xffff47b4ffff5879; + *((unsigned long *)&__m256i_result[3]) = 0x0000504fffff3271; + *((unsigned long *)&__m256i_result[2]) = 0xffff47b4ffff5879; + *((unsigned long *)&__m256i_result[1]) = 0x0000504fffff3271; + *((unsigned long *)&__m256i_result[0]) = 0xffff47b4ffff5879; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0fffffff0fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0fffffff0fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0fffffff0fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0fffffff0fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0fffffff10000006; + *((unsigned long *)&__m256i_result[2]) = 0x0fffffff10000006; + *((unsigned long *)&__m256i_result[1]) = 0x0fffffff10000006; + *((unsigned long *)&__m256i_result[0]) = 0x0fffffff10000006; + __m256i_out = __lasx_xvaddi_du (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-1.c new file mode 100644 index 000000000..70f3bf783 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-1.c @@ -0,0 +1,740 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[2]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[1]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[0]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffeffffff88; + *((unsigned long *)&__m256i_op1[2]) = 0x61e0000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffeffffff88; + *((unsigned long *)&__m256i_op1[0]) = 0x61e0000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_result[2]) = 0xfff1ffca0011ffcb; + *((unsigned long *)&__m256i_result[1]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_result[0]) = 0xfff1ffca0011ffcb; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffe90ffffff80; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffe90ffffff80; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffff90ffffff80; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffff90ffffff80; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000005; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000005; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000005; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000005; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffefffefffefffe; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000023; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000023; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000023; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000023; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x01c601c6fe3afe3a; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x01c601c6fe3afe3a; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffc6ffc6003a003a; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffc6ffc6003a003a; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000011; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000011; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x457db03e457db03e; + *((unsigned long *)&__m256i_op0[2]) = 0x457db03e45a87310; + *((unsigned long *)&__m256i_op0[1]) = 0x457db03e457db03e; + *((unsigned long *)&__m256i_op0[0]) = 0x457db03e45a87310; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x007d003e007d003e; + *((unsigned long *)&__m256i_result[2]) = 0x007d003effa80010; + *((unsigned long *)&__m256i_result[1]) = 0x007d003e007d003e; + *((unsigned long *)&__m256i_result[0]) = 0x007d003effa80010; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x386000003df80000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x386000003df80000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0c6a240000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0c6a240000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ca0000fff80000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00ca0000fff80000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x372e9d75e8aab100; + *((unsigned long *)&__m256i_op0[2]) = 0x5464fbfc416b9f71; + *((unsigned long *)&__m256i_op0[1]) = 0x31730b5beb7c99f5; + *((unsigned long *)&__m256i_op0[0]) = 0x0d8264202b8ea3f0; + *((unsigned long *)&__m256i_op1[3]) = 0x80c72fcd40fb3bc0; + *((unsigned long *)&__m256i_op1[2]) = 0x84bd087966d4ace0; + *((unsigned long *)&__m256i_op1[1]) = 0x26aa68b274dc1322; + *((unsigned long *)&__m256i_op1[0]) = 0xe072db2bb9d4cd40; + *((unsigned long *)&__m256i_result[3]) = 0xffffcd42ffffecc0; + *((unsigned long *)&__m256i_result[2]) = 0x00000475ffff4c51; + *((unsigned long *)&__m256i_result[1]) = 0x0000740dffffad17; + *((unsigned long *)&__m256i_result[0]) = 0x00003f4bffff7130; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ff80; + *((unsigned long *)&__m256i_op0[2]) = 0x0000468600007f79; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000f3280000dfff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000022; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffff80; + *((unsigned long *)&__m256i_result[2]) = 0x0000468600008078; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xfffff328ffffe021; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[2]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[1]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op0[0]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op1[3]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op1[2]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op1[1]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_op1[0]) = 0x98111cca98111cca; + *((unsigned long *)&__m256i_result[3]) = 0x0000399400003994; + *((unsigned long *)&__m256i_result[2]) = 0x0000399400003994; + *((unsigned long *)&__m256i_result[1]) = 0x0000399400003994; + *((unsigned long *)&__m256i_result[0]) = 0x0000399400003994; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_op1[2]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_op1[1]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_op1[0]) = 0xe161616161614f61; + *((unsigned long *)&__m256i_result[3]) = 0x0000616100004f61; + *((unsigned long *)&__m256i_result[2]) = 0x0000616100004f61; + *((unsigned long *)&__m256i_result[1]) = 0x0000616100004f61; + *((unsigned long *)&__m256i_result[0]) = 0x0000616100004f61; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000050504c4c2362; + *((unsigned long *)&__m256i_op1[2]) = 0x000b8f81b8c840e4; + *((unsigned long *)&__m256i_op1[1]) = 0x000050504c4c2362; + *((unsigned long *)&__m256i_op1[0]) = 0x000b8f81b8c840e4; + *((unsigned long *)&__m256i_result[3]) = 0x0000504f00002361; + *((unsigned long *)&__m256i_result[2]) = 0xffff8f81000040e4; + *((unsigned long *)&__m256i_result[1]) = 0x0000504f00002361; + *((unsigned long *)&__m256i_result[0]) = 0xffff8f81000040e4; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000009; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000012; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000012; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffa3; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000165a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffa3; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000165a; + *((unsigned long *)&__m256i_op1[3]) = 0x40b240b330313031; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff7fff5d425d42; + *((unsigned long *)&__m256i_op1[1]) = 0x40b240b330313031; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff7fff5d425d42; + *((unsigned long *)&__m256i_result[3]) = 0x000040b200002fd4; + *((unsigned long *)&__m256i_result[2]) = 0x00007fff0000739c; + *((unsigned long *)&__m256i_result[1]) = 0x000040b200002fd4; + *((unsigned long *)&__m256i_result[0]) = 0x00007fff0000739c; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00003fef00003fea; + *((unsigned long *)&__m256i_op0[2]) = 0x00003ff000003ff0; + *((unsigned long *)&__m256i_op0[1]) = 0x00003fef00003fea; + *((unsigned long *)&__m256i_op0[0]) = 0x00003ff000003ff0; + *((unsigned long *)&__m256i_op1[3]) = 0x00003fef00003fea; + *((unsigned long *)&__m256i_op1[2]) = 0x00003ff000003ff0; + *((unsigned long *)&__m256i_op1[1]) = 0x00003fef00003fea; + *((unsigned long *)&__m256i_op1[0]) = 0x00003ff000003ff0; + *((unsigned long *)&__m256i_result[3]) = 0x00007fde00007fd4; + *((unsigned long *)&__m256i_result[2]) = 0x00007fe000007fe0; + *((unsigned long *)&__m256i_result[1]) = 0x00007fde00007fd4; + *((unsigned long *)&__m256i_result[0]) = 0x00007fe000007fe0; + __m256i_out = __lasx_xvaddwev_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002e2100; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000001000010; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x00000000012e2110; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[2]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[1]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op0[0]) = 0x0010000000100000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000483800; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000483800; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000583800; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000100000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000583800; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000100000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op0[2]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op0[0]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000007bbbbbbb; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000007bbbbbbb; + *((unsigned long *)&__m256i_result[3]) = 0x0000000044444443; + *((unsigned long *)&__m256i_result[2]) = 0x0000000073333333; + *((unsigned long *)&__m256i_result[1]) = 0x0000000044444443; + *((unsigned long *)&__m256i_result[0]) = 0x0000000073333333; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x007f807f007e8080; + *((unsigned long *)&__m256i_op0[2]) = 0x007f807f007e806f; + *((unsigned long *)&__m256i_op0[1]) = 0x007f807f007e8080; + *((unsigned long *)&__m256i_op0[0]) = 0x007f807f007e806f; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000023; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000023; + *((unsigned long *)&__m256i_result[3]) = 0x00000000007e8080; + *((unsigned long *)&__m256i_result[2]) = 0x00000000007e8092; + *((unsigned long *)&__m256i_result[1]) = 0x00000000007e8080; + *((unsigned long *)&__m256i_result[0]) = 0x00000000007e8092; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000062d4; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000064; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000006338; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0010000100000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0010000100000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0010000100000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0010000100000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffff800080000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffff800080000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff80000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff80000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfe01fe01fc01fc01; + *((unsigned long *)&__m256i_op1[2]) = 0x000000003fc03bbc; + *((unsigned long *)&__m256i_op1[1]) = 0xfe01fe01fc01fc01; + *((unsigned long *)&__m256i_op1[0]) = 0x000000003fc03bbc; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffc01fc01; + *((unsigned long *)&__m256i_result[2]) = 0x000000003fc03bbc; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffc01fc01; + *((unsigned long *)&__m256i_result[0]) = 0x000000003fc03bbc; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x1b9763952fc4c101; + *((unsigned long *)&__m256i_op1[2]) = 0xe37affb42fc05f69; + *((unsigned long *)&__m256i_op1[1]) = 0x18b988e64facb558; + *((unsigned long *)&__m256i_op1[0]) = 0xe5fb66c81da8e5bb; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xe37affb42fc05f69; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x65fb66c81da8e5ba; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x1010101010101012; + *((unsigned long *)&__m256i_op1[2]) = 0x1010101010101012; + *((unsigned long *)&__m256i_op1[1]) = 0x1010101010101093; + *((unsigned long *)&__m256i_op1[0]) = 0x1111111111111113; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x1010101110101011; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x1111111211111112; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x5980000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x5980000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x5980000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x5980000000000000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffefe00000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xfffffefe00000000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000002800000010; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000002800000010; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff000c0000; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00040000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff0127000c0010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00ff012700040010; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xc0008000c0008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xc0008000c0008000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xc0008000c0008000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xc0008000c0008000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x8001000180010000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x8001000180010000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff800200000002; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffff800200000002; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000020000000200; + *((unsigned long *)&__m256i_op0[2]) = 0x0000020000000200; + *((unsigned long *)&__m256i_op0[1]) = 0x0000020000000200; + *((unsigned long *)&__m256i_op0[0]) = 0x0000020000000200; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000020000000200; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000020000000200; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op0[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_op0[1]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op0[0]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xfffe97c020010001; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000001e001e001e0; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000001e001e001e0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-2.c new file mode 100644 index 000000000..22528a14f --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-2.c @@ -0,0 +1,485 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0010100000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0010100000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0010000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0010000000000000; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffc0003fffa0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x01fb010201f900ff; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000005554; + *((unsigned long *)&__m256i_op1[2]) = 0xaaaa0000aaacfffe; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000005554; + *((unsigned long *)&__m256i_op1[0]) = 0xaaaa0000aaacfffe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000054; + *((unsigned long *)&__m256i_result[2]) = 0x00aa000000ac00fe; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000054; + *((unsigned long *)&__m256i_result[0]) = 0x00aa000000ac00fe; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x017f01fe01ff01fe; + *((unsigned long *)&__m256i_op0[2]) = 0x05960616020e0203; + *((unsigned long *)&__m256i_op0[1]) = 0x017f01fe01ff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x05960616020e0005; + *((unsigned long *)&__m256i_op1[3]) = 0x017f01fe01ff01fe; + *((unsigned long *)&__m256i_op1[2]) = 0x05960616020e0203; + *((unsigned long *)&__m256i_op1[1]) = 0x017f01fe01ff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x05960616020e0005; + *((unsigned long *)&__m256i_result[3]) = 0x00fe01fc01fe01fc; + *((unsigned long *)&__m256i_result[2]) = 0x012c002c001c0006; + *((unsigned long *)&__m256i_result[1]) = 0x00fe01fc01fe0000; + *((unsigned long *)&__m256i_result[0]) = 0x012c002c001c000a; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xd207e90001fb16ef; + *((unsigned long *)&__m256i_op0[2]) = 0xc8eab25698f97e90; + *((unsigned long *)&__m256i_op0[1]) = 0xd207e90001fb16ef; + *((unsigned long *)&__m256i_op0[0]) = 0xc8eab25698f97e90; + *((unsigned long *)&__m256i_op1[3]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op1[2]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op1[1]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op1[0]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_result[3]) = 0x0007000000fb00ef; + *((unsigned long *)&__m256i_result[2]) = 0x00ea005600f90090; + *((unsigned long *)&__m256i_result[1]) = 0x0007000000fb00ef; + *((unsigned long *)&__m256i_result[0]) = 0x00ea005600f90090; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffc03b1fc5e050; + *((unsigned long *)&__m256i_op0[2]) = 0x6a9e3fa2603a2000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffc03b1fc5e050; + *((unsigned long *)&__m256i_op0[0]) = 0x6a9e3fa2603a2000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffc03fffffffc0; + *((unsigned long *)&__m256i_op1[2]) = 0xffffc00000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffc03fffffffc0; + *((unsigned long *)&__m256i_op1[0]) = 0xffffc00000000000; + *((unsigned long *)&__m256i_result[3]) = 0x01fe007a01c40110; + *((unsigned long *)&__m256i_result[2]) = 0x019d00a2003a0000; + *((unsigned long *)&__m256i_result[1]) = 0x01fe007a01c40110; + *((unsigned long *)&__m256i_result[0]) = 0x019d00a2003a0000; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fe36364661af18f; + *((unsigned long *)&__m256i_op0[2]) = 0x7fe363637fe36363; + *((unsigned long *)&__m256i_op0[1]) = 0x7fe36364661af18f; + *((unsigned long *)&__m256i_op0[0]) = 0x7fe363637fe36363; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00e30064001a008f; + *((unsigned long *)&__m256i_result[2]) = 0x00e3006300e30063; + *((unsigned long *)&__m256i_result[1]) = 0x00e30064001a008f; + *((unsigned long *)&__m256i_result[0]) = 0x00e3006300e30063; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000013; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000013; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000013; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000013; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000013; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000013; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op1[2]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_op1[1]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op1[0]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_result[3]) = 0x000000010000005e; + *((unsigned long *)&__m256i_result[2]) = 0x000000a400ff004f; + *((unsigned long *)&__m256i_result[1]) = 0x000000010000005e; + *((unsigned long *)&__m256i_result[0]) = 0x000000a400ff004f; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0002ffff00020002; + *((unsigned long *)&__m256i_op0[2]) = 0x04f504f104f504f5; + *((unsigned long *)&__m256i_op0[1]) = 0x0002ffff00020002; + *((unsigned long *)&__m256i_op0[0]) = 0x04f504f104f504f5; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000200ff00020002; + *((unsigned long *)&__m256i_result[2]) = 0x00f500f100f500f5; + *((unsigned long *)&__m256i_result[1]) = 0x000200ff00020002; + *((unsigned long *)&__m256i_result[0]) = 0x00f500f100f500f5; + __m256i_out = __lasx_xvaddwev_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000019410000e69a; + *((unsigned long *)&__m256i_op0[2]) = 0xf259905a0c126604; + *((unsigned long *)&__m256i_op0[1]) = 0x0000883a00000f20; + *((unsigned long *)&__m256i_op0[0]) = 0x6d3c2d3aa1c82947; + *((unsigned long *)&__m256i_op1[3]) = 0x372e9d75e8aab100; + *((unsigned long *)&__m256i_op1[2]) = 0xc5c085372cfabfba; + *((unsigned long *)&__m256i_op1[1]) = 0x31730b5beb7c99f5; + *((unsigned long *)&__m256i_op1[0]) = 0x0658f2dc0eb21e3c; + *((unsigned long *)&__m256i_result[3]) = 0x0000b6b60001979a; + *((unsigned long *)&__m256i_result[2]) = 0x00011591000125be; + *((unsigned long *)&__m256i_result[1]) = 0x000093950000a915; + *((unsigned long *)&__m256i_result[0]) = 0x0001201600004783; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffff6ff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xfffff6ff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000f6ff00000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000f6ff00000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8011ffee804c004c; + *((unsigned long *)&__m256i_op0[2]) = 0x00faff0500c3ff3c; + *((unsigned long *)&__m256i_op0[1]) = 0x80f900f980780078; + *((unsigned long *)&__m256i_op0[0]) = 0x0057ffa800ceff31; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000ff00; + *((unsigned long *)&__m256i_op1[2]) = 0xff000000ff000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ff000000ff00; + *((unsigned long *)&__m256i_op1[0]) = 0xff000000ff000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffee0000ff4c; + *((unsigned long *)&__m256i_result[2]) = 0x0000ff050000ff3c; + *((unsigned long *)&__m256i_result[1]) = 0x0000fff90000ff78; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffa80000ff31; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000fffc7f7f; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffc000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000fffc7f7f; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffc000; + *((unsigned long *)&__m256i_op1[3]) = 0x8001b0b1b4b5dd9f; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x8001b0b1b4b5dd9f; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000b0b100015d1e; + *((unsigned long *)&__m256i_result[2]) = 0x0001fffe0001bfff; + *((unsigned long *)&__m256i_result[1]) = 0x0000b0b100015d1e; + *((unsigned long *)&__m256i_result[0]) = 0x0001fffe0001bfff; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffe20001dfe1f; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffe20001dfe1f; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000fe200000fe1f; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000fe200000fe1f; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffc0ffc1; + *((unsigned long *)&__m256i_op0[2]) = 0x003f00000000003f; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffc0ffc1; + *((unsigned long *)&__m256i_op0[0]) = 0x003f00000000003f; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0001fffe0001ffc0; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff0001003e; + *((unsigned long *)&__m256i_result[1]) = 0x0001fffe0001ffc0; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff0001003e; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0020010101610000; + *((unsigned long *)&__m256i_op0[2]) = 0x0061200000610000; + *((unsigned long *)&__m256i_op0[1]) = 0x0020010101610000; + *((unsigned long *)&__m256i_op0[0]) = 0x0061200000610000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x000101000000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x00011fff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x000101000000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x00011fff0000ffff; + __m256i_out = __lasx_xvaddwev_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000013ffffffec; + *((unsigned long *)&__m256i_op1[2]) = 0x00000013ffffebd8; + *((unsigned long *)&__m256i_op1[1]) = 0x00000013ffffffec; + *((unsigned long *)&__m256i_op1[0]) = 0x00000013ffffebd8; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffec; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffebd8; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffec; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffebd8; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000c0007; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000c0007; + *((unsigned long *)&__m256i_op1[3]) = 0x3abb3abbbabababa; + *((unsigned long *)&__m256i_op1[2]) = 0x0080000000800080; + *((unsigned long *)&__m256i_op1[1]) = 0x3abb3abbbabababa; + *((unsigned long *)&__m256i_op1[0]) = 0x0080000000800080; + *((unsigned long *)&__m256i_result[3]) = 0x00000000babababa; + *((unsigned long *)&__m256i_result[2]) = 0x00000000008c0087; + *((unsigned long *)&__m256i_result[1]) = 0x00000000babababa; + *((unsigned long *)&__m256i_result[0]) = 0x00000000008c0087; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvaddwev_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000003ff000003ff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000003ff000003ff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000010000000a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000010000000a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000010000000a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000010000000a; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8060000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8060000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffff0000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffff0000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x805f0000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x805f0000ffffffff; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfe01fe010000fd02; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_op0[1]) = 0xfe01fe010000fd02; + *((unsigned long *)&__m256i_op0[0]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_op1[3]) = 0xfe01fe010000fd02; + *((unsigned long *)&__m256i_op1[2]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_op1[1]) = 0xfe01fe010000fd02; + *((unsigned long *)&__m256i_op1[0]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000007f807f80; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000007f807f80; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op0[2]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op0[1]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op0[0]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xff1cff1cff1cff1c; + __m256i_out = __lasx_xvaddwev_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-3.c new file mode 100644 index 000000000..38a0a53d7 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwev-3.c @@ -0,0 +1,515 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[3]) = 0x0036003200360032; + *((unsigned long *)&__m256i_result[2]) = 0x0036003200360032; + *((unsigned long *)&__m256i_result[1]) = 0x0036003200360032; + *((unsigned long *)&__m256i_result[0]) = 0x0036003200360032; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000170017; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000017; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000170017; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000170017; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000017; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000170017; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001fffe0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0001fffe00010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001fffe0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0001fffe00010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000100fe000000ff; + *((unsigned long *)&__m256i_result[2]) = 0x000100fe00010001; + *((unsigned long *)&__m256i_result[1]) = 0x000100fe000000ff; + *((unsigned long *)&__m256i_result[0]) = 0x000100fe00010001; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffe20001dfe1f; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffe20001dfe1f; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwev_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6100000800060005; + *((unsigned long *)&__m256i_op0[2]) = 0x5ee1c073b800c916; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x5ff00007fff9fff3; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0209fefb08140000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0003fffc00060000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000800000004; + *((unsigned long *)&__m256i_result[2]) = 0x0000bf6e0000c916; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000030000fff3; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000b004a00440040; + *((unsigned long *)&__m256i_op0[2]) = 0x8020004a0011002a; + *((unsigned long *)&__m256i_op0[1]) = 0x000b004a00440040; + *((unsigned long *)&__m256i_op0[0]) = 0x8020004a0011002a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000004a00000040; + *((unsigned long *)&__m256i_result[2]) = 0x0000004a0000002a; + *((unsigned long *)&__m256i_result[1]) = 0x0000004a00000040; + *((unsigned long *)&__m256i_result[0]) = 0x0000004a0000002a; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_op1[2]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_op1[1]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_op1[0]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_result[3]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_result[2]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_result[1]) = 0x00001fff00001fff; + *((unsigned long *)&__m256i_result[0]) = 0x00001fff00001fff; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0808080808080808; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0808080808080808; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000080800000808; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000080800000808; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x001a001a001a009a; + *((unsigned long *)&__m256i_op0[2]) = 0x001a001a002a009a; + *((unsigned long *)&__m256i_op0[1]) = 0x001a001a001a009a; + *((unsigned long *)&__m256i_op0[0]) = 0x001a001a002a009a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[3]) = 0x0000001a000000da; + *((unsigned long *)&__m256i_result[2]) = 0x0000001a000000da; + *((unsigned long *)&__m256i_result[1]) = 0x0000001a000000da; + *((unsigned long *)&__m256i_result[0]) = 0x0000001a000000da; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff0000ffff; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000007ffffffce; + *((unsigned long *)&__m256i_op1[1]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000007ffffffce; + *((unsigned long *)&__m256i_result[3]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000007ffffffce; + *((unsigned long *)&__m256i_result[1]) = 0x00000005ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000007ffffffce; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_result[3]) = 0x00000000000001fe; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000001ce; + *((unsigned long *)&__m256i_result[1]) = 0x00000000000001fe; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000001ce; + __m256i_out = __lasx_xvaddwev_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000ff0000; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_result[2]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_result[1]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_result[0]) = 0x000000007fffffff; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010000; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff000000010000; + *((unsigned long *)&__m256i_op1[3]) = 0x8011ffae800c000c; + *((unsigned long *)&__m256i_op1[2]) = 0x00baff050083ff3c; + *((unsigned long *)&__m256i_op1[1]) = 0x80b900b980380038; + *((unsigned long *)&__m256i_op1[0]) = 0x0017ffa8008eff31; + *((unsigned long *)&__m256i_result[3]) = 0xffffffff800c000c; + *((unsigned long *)&__m256i_result[2]) = 0x000000000084ff3c; + *((unsigned long *)&__m256i_result[1]) = 0xffffffff80380038; + *((unsigned long *)&__m256i_result[0]) = 0x00000000008fff31; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x001f001f001f001f; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000001001f001e; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000001001f001e; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000ff00ff; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff10000fff10000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff10000fff10000; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100f000ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100f000ff; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff88ff88ff880000; + *((unsigned long *)&__m256i_op0[2]) = 0xff88ff88ff880000; + *((unsigned long *)&__m256i_op0[1]) = 0xff88ff88ff880000; + *((unsigned long *)&__m256i_op0[0]) = 0xff88ff88ff880000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000ffc0; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000fff0ffc0; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000000ffc0; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000fff0ffc0; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ff88ffc0; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ff78ffc0; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ff88ffc0; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ff78ffc0; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000016e00; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000016e00; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000016e00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000016e00; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op1[2]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op1[1]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_op1[0]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffff1cff1c; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffff1cff1c; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffff1cff1c; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffff1cff1c; + __m256i_out = __lasx_xvaddwev_d_wu_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffff1f; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffffffeff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffff1f; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffffeff; + *((unsigned long *)&__m256i_op1[3]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_op1[2]) = 0xfff1ffca0011ffcb; + *((unsigned long *)&__m256i_op1[1]) = 0x0010ffc80010ff52; + *((unsigned long *)&__m256i_op1[0]) = 0xfff1ffca0011ffcb; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfff1ffca0011feca; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfff1ffca0011feca; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff00000002; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff00000002; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000002; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007fff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007fff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000017fff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000017fff; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000004000000040; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000004000000040; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000004000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000004000000040; + __m256i_out = __lasx_xvaddwev_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-1.c new file mode 100644 index 000000000..a4dc565e9 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-1.c @@ -0,0 +1,530 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x9240000000008025; + *((unsigned long *)&__m256i_op0[2]) = 0xfffff24affff8025; + *((unsigned long *)&__m256i_op0[1]) = 0xb2c0000000008006; + *((unsigned long *)&__m256i_op0[0]) = 0xffffb341ffff8006; + *((unsigned long *)&__m256i_op1[3]) = 0x9240000000008025; + *((unsigned long *)&__m256i_op1[2]) = 0xfffff24affff8025; + *((unsigned long *)&__m256i_op1[1]) = 0xb2c0000000008006; + *((unsigned long *)&__m256i_op1[0]) = 0xffffb341ffff8006; + *((unsigned long *)&__m256i_result[3]) = 0xff2400000000ff00; + *((unsigned long *)&__m256i_result[2]) = 0xfffeffe4fffeff00; + *((unsigned long *)&__m256i_result[1]) = 0xff6400000000ff00; + *((unsigned long *)&__m256i_result[0]) = 0xfffeff66fffeff00; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[2]) = 0xff04ff00ff00ff00; + *((unsigned long *)&__m256i_op0[1]) = 0xff00ff00ff00ff00; + *((unsigned long *)&__m256i_op0[0]) = 0xff04ff00ff00ff00; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffefffefffefffe; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[2]) = 0xfffe0000fffe0002; + *((unsigned long *)&__m256i_op1[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[0]) = 0xfffe0000fffe0002; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff0000fffeffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffff0000fffeffff; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_op0[2]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_op0[0]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffc0003fffc0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffc0003fffc0; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff0000ffff; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7ffeffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7ffeffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000fc300000fc40; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000fc300000fc40; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x007f007bfffffffb; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x007f007bfffffffb; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000201220001011c; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000201220001011c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffe0ffe000000001; + *((unsigned long *)&__m256i_op0[2]) = 0x7fa0001fff808000; + *((unsigned long *)&__m256i_op0[1]) = 0xffe0ffe000000001; + *((unsigned long *)&__m256i_op0[0]) = 0x7fa0001fff808000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffff0000; + *((unsigned long *)&__m256i_result[2]) = 0x007f0000ffffff80; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffff0000; + *((unsigned long *)&__m256i_result[0]) = 0x007f0000ffffff80; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff0002fffd; + *((unsigned long *)&__m256i_op1[2]) = 0x04f104f104f504ed; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0002fffd; + *((unsigned long *)&__m256i_op1[0]) = 0x04f104f104f504ed; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0004000400040004; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0004000400040004; + __m256i_out = __lasx_xvaddwod_h_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00007ff000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00007ff000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00007ff000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000001fe; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000001fe; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000d24; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000d24; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op1[3]) = 0x4ffc3f7800000000; + *((unsigned long *)&__m256i_op1[2]) = 0x3fc03f6400000000; + *((unsigned long *)&__m256i_op1[1]) = 0x4ffc3f7800000000; + *((unsigned long *)&__m256i_op1[0]) = 0x3fc03f6400000000; + *((unsigned long *)&__m256i_result[3]) = 0x000050fd00000101; + *((unsigned long *)&__m256i_result[2]) = 0x000040c100000101; + *((unsigned long *)&__m256i_result[1]) = 0x000050fd00000101; + *((unsigned long *)&__m256i_result[0]) = 0x000040c100000101; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000c9; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_w_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000007fff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000007fff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000007fff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000007fff; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000006d; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000400008; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000006d; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000400008; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000800080000000; + *((unsigned long *)&__m256i_op0[1]) = 0xc9d8080067f50020; + *((unsigned long *)&__m256i_op0[0]) = 0xc70000020000c000; + *((unsigned long *)&__m256i_op1[3]) = 0x7ffffffffffff7ff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffe06df0d7; + *((unsigned long *)&__m256i_op1[1]) = 0x7ffffffffffff7ff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffbe8b470f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00007ffffffff7ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x49d8080067f4f81f; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ff80; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ff80; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffff605a; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffff5f5c; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffff605a; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffebeb8; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffebeb8; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x1111111111111111; + *((unsigned long *)&__m256i_op1[2]) = 0x1111111111111111; + *((unsigned long *)&__m256i_op1[1]) = 0x1111111111111111; + *((unsigned long *)&__m256i_op1[0]) = 0x1111111111111111; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x1111111111111111; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x1111111111111111; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffeffffffdd; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffdc; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000d6d6d; + __m256i_out = __lasx_xvaddwod_q_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-2.c new file mode 100644 index 000000000..a2fbe9ed0 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-2.c @@ -0,0 +1,560 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0006000000040000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7ffe00007f000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff017e01fe; + *((unsigned long *)&__m256i_result[1]) = 0x017e00ff017e00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff017e01fe; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xb70036db12c4007e; + *((unsigned long *)&__m256i_op0[2]) = 0xb7146213fc1e0049; + *((unsigned long *)&__m256i_op0[1]) = 0x000000fefe02fffe; + *((unsigned long *)&__m256i_op0[0]) = 0xb71c413b199d04b5; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00b7003600120000; + *((unsigned long *)&__m256i_result[2]) = 0x00b7006200fc0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000fe00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00b7004100190004; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007aff7c00; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffd017d00; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007aff7c00; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffd017d00; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000008e7c00; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000067751500; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000008e7c00; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000067751500; + *((unsigned long *)&__m256i_result[3]) = 0x00000000007a00f8; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff01640092; + *((unsigned long *)&__m256i_result[1]) = 0x00000000007a00f8; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff01640092; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[2]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_op1[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[0]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff000000ff0000; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff000000ff0000; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00ff00ff; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff008000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff008000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00ff008000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00ff008000000000; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffff0020; + *((unsigned long *)&__m256i_op0[2]) = 0xffff8001ffff0001; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0020; + *((unsigned long *)&__m256i_op0[0]) = 0xffff8001ffff0001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff008000ff0000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[0]) = 0x00ff008000ff0000; + __m256i_out = __lasx_xvaddwod_h_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffff000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffff000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff00000000; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000804000004141; + *((unsigned long *)&__m256i_op0[1]) = 0x00017fff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00007fff0000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op1[2]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000044444443; + *((unsigned long *)&__m256i_op1[0]) = 0x7bbbbbbbf7777778; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000004444; + *((unsigned long *)&__m256i_result[2]) = 0x00007bbb0000f777; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000004444; + *((unsigned long *)&__m256i_result[0]) = 0x00007bbb0000f777; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x4010000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x3e6ce7d9cb7afb62; + *((unsigned long *)&__m256i_op0[1]) = 0x4010000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x3e6ce7d9cb7afb62; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000401000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00003e6c0000cb7a; + *((unsigned long *)&__m256i_result[1]) = 0x0000401000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00003e6c0000cb7a; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x3aadec4f6c7975b1; + *((unsigned long *)&__m256i_op0[2]) = 0x3abac5447fffca89; + *((unsigned long *)&__m256i_op0[1]) = 0x3aadec4f6c7975b1; + *((unsigned long *)&__m256i_op0[0]) = 0x3abac5447fffca89; + *((unsigned long *)&__m256i_op1[3]) = 0x3aadec4f6c7975b1; + *((unsigned long *)&__m256i_op1[2]) = 0x3abac5447fffca89; + *((unsigned long *)&__m256i_op1[1]) = 0x3aadec4f6c7975b1; + *((unsigned long *)&__m256i_op1[0]) = 0x3abac5447fffca89; + *((unsigned long *)&__m256i_result[3]) = 0x0000755a0000d8f2; + *((unsigned long *)&__m256i_result[2]) = 0x000075740000fffe; + *((unsigned long *)&__m256i_result[1]) = 0x0000755a0000d8f2; + *((unsigned long *)&__m256i_result[0]) = 0x000075740000fffe; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000002000000020; + *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000020; + *((unsigned long *)&__m256i_op0[1]) = 0x0000002000000020; + *((unsigned long *)&__m256i_op0[0]) = 0x0000002000000020; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffee00ba; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffee00ba; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff0000ffee; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff0000ffee; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x9ffffd8020010001; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffff9fffffff9; + *((unsigned long *)&__m256i_op1[1]) = 0x9ffffd8020010001; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffff9fffffff9; + *((unsigned long *)&__m256i_result[3]) = 0x00009fff00002001; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x00009fff00002001; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffff0000ffff; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvaddwod_w_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000001a00000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000900000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000001a00000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000900000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000001a; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000009; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000001a; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000009; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000800000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000800000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100010000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100010000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100010000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100010000; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffee; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffee; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffee; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffee; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000003f0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000030007; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000003f0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000030007; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00153f1594ea02ff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffffffff0100; + *((unsigned long *)&__m256i_op1[0]) = 0xff15c1ea95ea02ff; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000153f15; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ff15c1ea; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff040000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff040000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00ff00ff00fe00fe; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff00fe00fe; + *((unsigned long *)&__m256i_op1[1]) = 0x00ff00ff00fe00fe; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff00fe00fe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000100fe04ff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100fe04ff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000ff00ff; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000003ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ffff; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00f9f9f900000002; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00f9f9f900000002; + *((unsigned long *)&__m256i_op1[3]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op1[2]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op1[1]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op1[0]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_result[3]) = 0x00000000f9f9f9f9; + *((unsigned long *)&__m256i_result[2]) = 0x00000000faf3f3f2; + *((unsigned long *)&__m256i_result[1]) = 0x00000000f9f9f9f9; + *((unsigned long *)&__m256i_result[0]) = 0x00000000faf3f3f2; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000001fff000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000029170; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000001fff000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000029170; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_d_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7fffffff7fffffff; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xc3f0c3f0c3f0c3f0; + *((unsigned long *)&__m256i_op0[2]) = 0xc3f0c3f0c3f0c3f0; + *((unsigned long *)&__m256i_op0[1]) = 0xc3f0c3f0c3f0c3f0; + *((unsigned long *)&__m256i_op0[0]) = 0xc3f0c3f0c3f0c3f0; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xc3f0c3f0c3f0c3f0; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xc3f0c3f0c3f0c3f0; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00ff00ff00ef32; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ff00ff00ef32; + *((unsigned long *)&__m256i_op0[1]) = 0xff00ff00ff00ef32; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ff00ff00ef32; + *((unsigned long *)&__m256i_op1[3]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op1[2]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op1[1]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_op1[0]) = 0xe7e7e7e7e7e7e7e7; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0xe6e8e6e8e6e8d719; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0xe6e8e6e8e6e8d719; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000800400010006d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000800400010006d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000800400010006d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000800400010006d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000003fffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000003fffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_q_du (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-3.c new file mode 100644 index 000000000..8c98fc4be --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvaddwod-3.c @@ -0,0 +1,485 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000033e87ef1; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000002e2100; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000033007e; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000021; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op0[2]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op0[1]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op0[0]) = 0x2020202020202020; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000020202020; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000020202020; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000020202020; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000020202020; + *((unsigned long *)&__m256i_result[3]) = 0x0020002000400040; + *((unsigned long *)&__m256i_result[2]) = 0x0020002000400040; + *((unsigned long *)&__m256i_result[1]) = 0x0020002000400040; + *((unsigned long *)&__m256i_result[0]) = 0x0020002000400040; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000f000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000f000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x007fc0083fc7c007; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x007fc0083fc7c007; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffc0003fffc0; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffc0003fffc0; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffdbbbcf; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffb8579f; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffdbbbcf; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffb8579f; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000ff00bb; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000ff0057; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000ff00bb; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000ff0057; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00ff00ff; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000005060503; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000073737; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000050007; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000039; + __m256i_out = __lasx_xvaddwod_h_bu_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ff80; + *((unsigned long *)&__m256i_op0[2]) = 0x0000468600007f79; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000f3280000dfff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000007070707; + *((unsigned long *)&__m256i_op1[2]) = 0x0102040000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000020100; + *((unsigned long *)&__m256i_op1[0]) = 0x0703020000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000707; + *((unsigned long *)&__m256i_result[2]) = 0x0000010200000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000070300000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00007fffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00007fffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffff800000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op0[2]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op0[1]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op0[0]) = 0x7c007c007c007c00; + *((unsigned long *)&__m256i_op1[3]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op1[2]) = 0x000100640000ff92; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op1[0]) = 0x000100640000ff92; + *((unsigned long *)&__m256i_result[3]) = 0x00007c0100007c01; + *((unsigned long *)&__m256i_result[2]) = 0x00007c0100007c00; + *((unsigned long *)&__m256i_result[1]) = 0x00007c0100007c01; + *((unsigned long *)&__m256i_result[0]) = 0x00007c0100007c00; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000001ffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xfe00000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000001ffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xfe00000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_result[2]) = 0xfffffe0000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_result[0]) = 0xfffffe0000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000048; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000007d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000048; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000007d; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000800400010006d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000800400010006d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000010; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op0[2]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_op0[1]) = 0xfffeb6839ffffd80; + *((unsigned long *)&__m256i_op0[0]) = 0xfffe97c020010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000fffe00009fff; + *((unsigned long *)&__m256i_result[2]) = 0x0000fffe00002001; + *((unsigned long *)&__m256i_result[1]) = 0x0000fffe00009fff; + *((unsigned long *)&__m256i_result[0]) = 0x0000fffe00002001; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000027; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000027; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000100010080; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010080; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_w_hu_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000007f00; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7ffe7fffeffe; + *((unsigned long *)&__m256i_op0[1]) = 0xffffd84900000849; + *((unsigned long *)&__m256i_op0[0]) = 0x07fffc670800f086; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x311d9b643ec1fe01; + *((unsigned long *)&__m256i_op1[0]) = 0x344ade20fe00fd01; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000007f00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x311d73ad3ec2064a; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff80cbfffffdf8; + *((unsigned long *)&__m256i_op1[2]) = 0x0000081500000104; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffa4fffffffd; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000700000002; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff80cbfffffdf8; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffa4fffffffd; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000008050501; + *((unsigned long *)&__m256i_op1[2]) = 0x0100000100000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000008050501; + *((unsigned long *)&__m256i_op1[0]) = 0x0100000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000008050501; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000008050501; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x01fe007a01c40110; + *((unsigned long *)&__m256i_op0[2]) = 0x019d00a20039fff9; + *((unsigned long *)&__m256i_op0[1]) = 0x01fe007a01c40110; + *((unsigned long *)&__m256i_op0[0]) = 0x019d00a2003a0000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000003ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x01fe007a01c40110; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x01fe007a01c40110; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x001ffffe00200000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x001ffffe00200000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffff0020001d001f; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000fef0ff0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000fef0ff0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[3]) = 0x8000400080ffc080; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000080ff0080; + *((unsigned long *)&__m256i_op1[1]) = 0x8000400080ffc080; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000080ff0080; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x8000400080ffc080; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x8000400080ffc080; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x007f010000000100; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x007f010000000100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvaddwod_q_du_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-1.c new file mode 100644 index 000000000..2a4f29b50 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-1.c @@ -0,0 +1,650 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x003f003f003f003f; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x003f003f003f003f; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xff3eff3eff3eff3e; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xff3eff3eff3eff3e; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xa020202020202020; + *((unsigned long *)&__m256i_op1[2]) = 0xa020202020206431; + *((unsigned long *)&__m256i_op1[1]) = 0xa020202020202020; + *((unsigned long *)&__m256i_op1[0]) = 0xa020202020206431; + *((unsigned long *)&__m256i_result[3]) = 0xa020202020202020; + *((unsigned long *)&__m256i_result[2]) = 0xa020202020206431; + *((unsigned long *)&__m256i_result[1]) = 0xa020202020202020; + *((unsigned long *)&__m256i_result[0]) = 0xa020202020206431; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffee0000ff4c; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ff050000ff3c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000fff90000ff78; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffa80000ff31; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffee0000ff4c; + *((unsigned long *)&__m256i_result[2]) = 0x0000ff050000ff3c; + *((unsigned long *)&__m256i_result[1]) = 0x0000fff90000ff78; + *((unsigned long *)&__m256i_result[0]) = 0x0000ffa80000ff31; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ff810011; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ff810011; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ff810011; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ff810011; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_op0[2]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_op0[0]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000200000008; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000200000008; + *((unsigned long *)&__m256i_result[3]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_result[2]) = 0xff00000200000008; + *((unsigned long *)&__m256i_result[1]) = 0xffffff00ffffff00; + *((unsigned long *)&__m256i_result[0]) = 0xff00000200000008; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffff8000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffff8000; + *((unsigned long *)&__m256i_result[2]) = 0x7efefefe80ffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7efefefe80ffffff; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00007fde00007fd4; + *((unsigned long *)&__m256i_op0[2]) = 0x00007fe000007fe0; + *((unsigned long *)&__m256i_op0[1]) = 0x00007fde00007fd4; + *((unsigned long *)&__m256i_op0[0]) = 0x00007fe000007fe0; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffff7eddffff7ed3; + *((unsigned long *)&__m256i_result[2]) = 0xffff7edfffff7edf; + *((unsigned long *)&__m256i_result[1]) = 0xffff7eddffff7ed3; + *((unsigned long *)&__m256i_result[0]) = 0xffff7edfffff7edf; + __m256i_out = __lasx_xvsadd_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffc81aca; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003a0a9512; + *((unsigned long *)&__m256i_op0[1]) = 0x280ac9da313863f4; + *((unsigned long *)&__m256i_op0[0]) = 0xe032c739adcc6bbd; + *((unsigned long *)&__m256i_op1[3]) = 0xfffe000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff00010000; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100020001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000fffffffffffe; + *((unsigned long *)&__m256i_result[3]) = 0xfffdffffffc81aca; + *((unsigned long *)&__m256i_result[2]) = 0x0000ffff3a0b9512; + *((unsigned long *)&__m256i_result[1]) = 0x280bc9db313a63f5; + *((unsigned long *)&__m256i_result[0]) = 0xe032c738adcb6bbb; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[3]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x1fe01e0000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1fe01e0100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x1fe01e0100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000fffffffa; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000fffffffa; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000fffffffa; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fffffffa; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf800d0d8ffffeecf; + *((unsigned long *)&__m256i_op0[2]) = 0x0000383fffffdf0d; + *((unsigned long *)&__m256i_op0[1]) = 0xf800d0d8ffffeecf; + *((unsigned long *)&__m256i_op0[0]) = 0x0000383fffffdf0d; + *((unsigned long *)&__m256i_op1[3]) = 0xf000f000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xf000f000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xe800c0d8fffeeece; + *((unsigned long *)&__m256i_result[2]) = 0xffff383efffedf0c; + *((unsigned long *)&__m256i_result[1]) = 0xe800c0d8fffeeece; + *((unsigned long *)&__m256i_result[0]) = 0xffff383efffedf0c; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffff0000ffff0001; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffff0000ffff0001; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffff0000ffff0001; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffff0000ffff0001; + *((unsigned long *)&__m256i_result[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[2]) = 0xfffe0000fffe0002; + *((unsigned long *)&__m256i_result[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_result[0]) = 0xfffe0000fffe0002; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[2]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[1]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[0]) = 0x7575757575757575; + *((unsigned long *)&__m256i_result[3]) = 0x7575757575757575; + *((unsigned long *)&__m256i_result[2]) = 0x7575757575757575; + *((unsigned long *)&__m256i_result[1]) = 0x7575757575757575; + *((unsigned long *)&__m256i_result[0]) = 0x7575757575757575; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfc003802fc000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000fc00fc00; + *((unsigned long *)&__m256i_op1[1]) = 0xfc003802fc000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000fc00fc00; + *((unsigned long *)&__m256i_result[3]) = 0xfc003802fc000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000fc00fc00; + *((unsigned long *)&__m256i_result[1]) = 0xfc003802fc000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fc00fc00; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000004; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000004; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000007b00f9007e; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000007b00f9007e; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000007b00f9007e; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000007b00f9007e; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000f601f200fc; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000f601f200fc; + __m256i_out = __lasx_xvsadd_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000007f00000022; + *((unsigned long *)&__m256i_op1[0]) = 0x0000007f00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000007f00000022; + *((unsigned long *)&__m256i_result[0]) = 0x0000007f00000000; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op0[0]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[2]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[1]) = 0x1c1b1a191c1b1a19; + *((unsigned long *)&__m256i_result[0]) = 0x1c1b1a191c1b1a19; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0002ff80ffb70000; + *((unsigned long *)&__m256i_op0[2]) = 0xffb7ff80ffd0ffd8; + *((unsigned long *)&__m256i_op0[1]) = 0x00010000002fff9e; + *((unsigned long *)&__m256i_op0[0]) = 0xffb5ff80ffd0ffd8; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0002ff80ffb70000; + *((unsigned long *)&__m256i_result[2]) = 0xffb7ff80ffd0ffd8; + *((unsigned long *)&__m256i_result[1]) = 0x00010000002fff9e; + *((unsigned long *)&__m256i_result[0]) = 0xffb5ff80ffd0ffd8; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffff800000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffff800000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffff800000000000; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000008; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvsadd_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003fff3fff; + *((unsigned long *)&__m256i_op0[1]) = 0x3fff3fff3fff4000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000403f3fff; + *((unsigned long *)&__m256i_op1[3]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000003fff3fff; + *((unsigned long *)&__m256i_op1[1]) = 0x3fff3fff3fff4000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000403f3fff; + *((unsigned long *)&__m256i_result[3]) = 0x7ffe7ffe7ffe7ffe; + *((unsigned long *)&__m256i_result[2]) = 0x000000007ffe7ffe; + *((unsigned long *)&__m256i_result[1]) = 0x7ffe7ffe7ffe8000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000807e7ffe; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[2]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[1]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op0[0]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[3]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[2]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[1]) = 0x6161616161616161; + *((unsigned long *)&__m256i_op1[0]) = 0x6161616161616161; + *((unsigned long *)&__m256i_result[3]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[2]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[1]) = 0xc2c2c2c2c2c2c2c2; + *((unsigned long *)&__m256i_result[0]) = 0xc2c2c2c2c2c2c2c2; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_op1[1]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_op1[0]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[3]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_result[2]) = 0x7f807f007f7f817f; + *((unsigned long *)&__m256i_result[1]) = 0x9ff87ef07f7f817f; + *((unsigned long *)&__m256i_result[0]) = 0x7f807f007f7f817f; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffff0020001d001f; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000800200027; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000800200028; + *((unsigned long *)&__m256i_op1[3]) = 0x000000006040190d; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000000006040190d; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000860601934; + *((unsigned long *)&__m256i_result[2]) = 0x0000000800200028; + *((unsigned long *)&__m256i_result[1]) = 0x0000000860601934; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800200028; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010001; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvadd_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-2.c new file mode 100644 index 000000000..a3afc9811 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsadd-2.c @@ -0,0 +1,350 @@ +/* { dg-do run } */ +/* { dg-options "-mlasx -w -fno-strict-aliasing" } */ +#include "../simd_correctness_check.h" +#include <lasxintrin.h> + +int +main () +{ + __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result; + __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result; + __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result; + + int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; + long int long_op0, long_op1, long_op2, lont_out, lont_result; + long int long_int_out, long_int_result; + unsigned int unsigned_int_out, unsigned_int_result; + unsigned long int unsigned_long_int_out, unsigned_long_int_result; + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000001700080; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000001700080; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000001700080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000001700080; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op1[2]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op1[1]) = 0x8080808080808080; + *((unsigned long *)&__m256i_op1[0]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[3]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[2]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[1]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op0[0]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[2]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[1]) = 0xf7f7f7f7f7f7f7f7; + *((unsigned long *)&__m256i_result[0]) = 0xf7f7f7f7f7f7f7f7; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000200000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000000; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x43d03bfff827ea21; + *((unsigned long *)&__m256i_op0[2]) = 0x43dac1f2a3804ff0; + *((unsigned long *)&__m256i_op0[1]) = 0x43d03bfff827e9f9; + *((unsigned long *)&__m256i_op0[0]) = 0x43e019c657c7d050; + *((unsigned long *)&__m256i_op1[3]) = 0x43d03bfff827ea21; + *((unsigned long *)&__m256i_op1[2]) = 0x43dac1f2a3804ff0; + *((unsigned long *)&__m256i_op1[1]) = 0x43d03bfff827e9f9; + *((unsigned long *)&__m256i_op1[0]) = 0x43e019c657c7d050; + *((unsigned long *)&__m256i_result[3]) = 0x86ff76ffff4eff42; + *((unsigned long *)&__m256i_result[2]) = 0x86ffffffffff9eff; + *((unsigned long *)&__m256i_result[1]) = 0x86ff76ffff4effff; + *((unsigned long *)&__m256i_result[0]) = 0x86ff32ffaeffffa0; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffff8910ffff7e01; + *((unsigned long *)&__m256i_op1[2]) = 0xffff3573ffff8960; + *((unsigned long *)&__m256i_op1[1]) = 0xffff8910ffff1ca9; + *((unsigned long *)&__m256i_op1[0]) = 0xfffff5e5ffff8130; + *((unsigned long *)&__m256i_result[3]) = 0xffff8910ffff7e01; + *((unsigned long *)&__m256i_result[2]) = 0xffff3573ffff8960; + *((unsigned long *)&__m256i_result[1]) = 0xffff8910ffff1ca9; + *((unsigned long *)&__m256i_result[0]) = 0xfffff5e5ffff8130; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000f90; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000f90; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000f90; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000f90; + __m256i_out = __lasx_xvsadd_bu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffe200000020; + *((unsigned long *)&__m256i_op0[2]) = 0x0000fffe00008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffe200000020; + *((unsigned long *)&__m256i_op0[0]) = 0x0000fffe00008000; + *((unsigned long *)&__m256i_op1[3]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[2]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[1]) = 0x7575757575757575; + *((unsigned long *)&__m256i_op1[0]) = 0x7575757575757575; + *((unsigned long *)&__m256i_result[3]) = 0x7575ffff75757595; + *((unsigned long *)&__m256i_result[2]) = 0x7575ffff7575f575; + *((unsigned long *)&__m256i_result[1]) = 0x7575ffff75757595; + *((unsigned long *)&__m256i_result[0]) = 0x7575ffff7575f575; + __m256i_out = __lasx_xvsadd_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000f0f0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000f0f0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000f0f0; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000f0f0; + __m256i_out = __lasx_xvsadd_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000001400; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000003c01ff9; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000003c01ff9; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000001400; + *((unsigned long *)&__m256i_result[2]) = 0x0000000003c01ff9; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000003c01ff9; + __m256i_out = __lasx_xvsadd_hu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xc5c5c5c4c5c5c5c4; + *((unsigned long *)&__m256i_op0[2]) = 0x45c5c5c545c5c5c5; + *((unsigned long *)&__m256i_op0[1]) = 0xc5c5c5c4c5c5c5c4; + *((unsigned long *)&__m256i_op0[0]) = 0x45c5c5c545c5c5c5; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xc5c5c5c4c5c5c5c4; + *((unsigned long *)&__m256i_result[2]) = 0x45c5c5c545c5c5c5; + *((unsigned long *)&__m256i_result[1]) = 0xc5c5c5c4c5c5c5c4; + *((unsigned long *)&__m256i_result[0]) = 0x45c5c5c545c5c5c5; + __m256i_out = __lasx_xvsadd_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000007; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000000e7; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00000007; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000007; + __m256i_out = __lasx_xvsadd_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff00000080; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff00000080; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000080; + __m256i_out = __lasx_xvsadd_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff; + __m256i_out = __lasx_xvsadd_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsadd_wu (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2