Projects
openEuler:24.03:SP1:Everything:64G
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-xvsll-xvsrl-instr.patch of Package gcc
From e90910ab68c43259f898fb7b2cba02d4eb457428 Mon Sep 17 00:00:00 2001 From: Xiaolong Chen <chenxiaolong@loongson.cn> Date: Tue, 12 Sep 2023 15:44:49 +0800 Subject: [PATCH 106/124] LoongArch: Add tests for ASX vector xvsll/xvsrl instructions. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/lasx-xvsll.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvslli.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsllwil-1.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsllwil-2.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrl.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrli.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrln.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrlni.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrlr.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrlri.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrlrn.c: New test. * gcc.target/loongarch/vector/lasx/lasx-xvsrlrni.c: New test. Signed-off-by: Peng Fan <fanpeng@loongson.cn> Signed-off-by: ticat_fp <fanpeng@loongson.cn> --- .../loongarch/vector/lasx/lasx-xvsll.c | 425 +++++++++++ .../loongarch/vector/lasx/lasx-xvslli.c | 416 +++++++++++ .../loongarch/vector/lasx/lasx-xvsllwil-1.c | 339 +++++++++ .../loongarch/vector/lasx/lasx-xvsllwil-2.c | 350 +++++++++ .../loongarch/vector/lasx/lasx-xvsrl.c | 650 +++++++++++++++++ .../loongarch/vector/lasx/lasx-xvsrli.c | 405 +++++++++++ .../loongarch/vector/lasx/lasx-xvsrln.c | 425 +++++++++++ .../loongarch/vector/lasx/lasx-xvsrlni.c | 680 ++++++++++++++++++ .../loongarch/vector/lasx/lasx-xvsrlr.c | 515 +++++++++++++ .../loongarch/vector/lasx/lasx-xvsrlri.c | 416 +++++++++++ .../loongarch/vector/lasx/lasx-xvsrlrn.c | 410 +++++++++++ .../loongarch/vector/lasx/lasx-xvsrlrni.c | 455 ++++++++++++ 12 files changed, 5486 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsll.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvslli.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrl.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrli.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrln.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlni.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlr.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlri.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrn.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrni.c diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsll.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsll.c new file mode 100644 index 000000000..7179e715c --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsll.c @@ -0,0 +1,425 @@ +/* { 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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvsll_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]) = 0x00001f41ffffbf00; + *((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]) = 0x00001f41ffffbf00; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsll_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_xvsll_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffe0000000; + *((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]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffe0000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffe0000000; + __m256i_out = __lasx_xvsll_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsll_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]) = 0x7f00000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff000000000000; + *((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_xvsll_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000fffefe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000fffefe; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000808080; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsll_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffefefffffcfa; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[2]) = 0xfffffefefffffcfa; + *((unsigned long *)&__m256i_result[1]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000; + __m256i_out = __lasx_xvsll_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffff7fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op1[3]) = 0xfff2f7bcfff2f7bd; + *((unsigned long *)&__m256i_op1[2]) = 0xfff2f93bfff2fff2; + *((unsigned long *)&__m256i_op1[1]) = 0xfff2f7bcfff2f7bd; + *((unsigned long *)&__m256i_op1[0]) = 0xfff2f93bfff2fff2; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffcf800fffcfffc; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fffcfffc; + __m256i_out = __lasx_xvsll_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff8c80; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fffffe40; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0004000400040004; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x00000000ffff8c80; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x00000000fff0e400; + __m256i_out = __lasx_xvsll_h (__m256i_op0, __m256i_op1); + 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_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]) = 0x5980000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x5980000000000000; + __m256i_out = __lasx_xvsll_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_xvsll_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]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[2]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[1]) = 0x8080808080808080; + *((unsigned long *)&__m256i_result[0]) = 0x8080808080808080; + __m256i_out = __lasx_xvsll_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]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000200000002; + *((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_xvsll_d (__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]) = 0x8000000000000000; + *((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]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvsll_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]) = 0x0000000200000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000200000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000800000000; + __m256i_out = __lasx_xvsll_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_xvsll_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000001ffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xfe00000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000001ffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xfe00000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffe0000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000001ff; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffe0000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000001ff8000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000001ff8000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsll_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]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000; + __m256i_out = __lasx_xvsll_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_xvsll_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff0000ffff; + *((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_xvsll_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000001; + *((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]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvsll_b (__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]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000080000000; + *((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_xvsll_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0100010001000100; + *((unsigned long *)&__m256i_op0[2]) = 0xff00010001000100; + *((unsigned long *)&__m256i_op0[1]) = 0x0100010001000100; + *((unsigned long *)&__m256i_op0[0]) = 0xff00010001000100; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsll_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_xvsll_w (__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]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xffff0000ffff0000; + *((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_xvsll_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]) = 0x1400080008000000; + *((unsigned long *)&__m256i_op1[2]) = 0x1400080008000000; + *((unsigned long *)&__m256i_op1[1]) = 0x1400080008000000; + *((unsigned long *)&__m256i_op1[0]) = 0x1400080008000000; + *((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_xvsll_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvslli.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvslli.c new file mode 100644 index 000000000..003e29b67 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvslli.c @@ -0,0 +1,416 @@ +/* { 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]) = 0x01fa022a01a401e5; + *((unsigned long *)&__m256i_op0[2]) = 0x030d03aa0079029b; + *((unsigned long *)&__m256i_op0[1]) = 0x024c01f901950261; + *((unsigned long *)&__m256i_op0[0]) = 0x008102c2008a029f; + *((unsigned long *)&__m256i_result[3]) = 0x54000000ca000000; + *((unsigned long *)&__m256i_result[2]) = 0x5400000036000000; + *((unsigned long *)&__m256i_result[1]) = 0xf2000000c2000000; + *((unsigned long *)&__m256i_result[0]) = 0x840000003e000000; + __m256i_out = __lasx_xvslli_w (__m256i_op0, 0x19); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff1001100100000; + *((unsigned long *)&__m256i_op0[2]) = 0x0010100000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xfff1001100100000; + *((unsigned long *)&__m256i_op0[0]) = 0x0010100000000000; + *((unsigned long *)&__m256i_result[3]) = 0xfcc4004400400000; + *((unsigned long *)&__m256i_result[2]) = 0x0040400000000000; + *((unsigned long *)&__m256i_result[1]) = 0xfcc4004400400000; + *((unsigned long *)&__m256i_result[0]) = 0x0040400000000000; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x2); + 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_xvslli_d (__m256i_op0, 0x11); + 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_xvslli_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffefffffffef; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffef000004ea; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffefffffffef; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffefffffffef; + *((unsigned long *)&__m256i_result[3]) = 0xffffffefffffffef; + *((unsigned long *)&__m256i_result[2]) = 0xffffffef000004ea; + *((unsigned long *)&__m256i_result[1]) = 0xffffffefffffffef; + *((unsigned long *)&__m256i_result[0]) = 0xffffffefffffffef; + __m256i_out = __lasx_xvslli_h (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffff8; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffffffbf4; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_result[3]) = 0xf800f800f800c000; + *((unsigned long *)&__m256i_result[2]) = 0xf800f800f800a000; + *((unsigned long *)&__m256i_result[1]) = 0xf800f800f800e000; + *((unsigned long *)&__m256i_result[0]) = 0xf800f800f800e000; + __m256i_out = __lasx_xvslli_h (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffefefffffefe; + __m256i_out = __lasx_xvslli_h (__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]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0100010001000000; + *((unsigned long *)&__m256i_result[0]) = 0x0100010001000000; + __m256i_out = __lasx_xvslli_d (__m256i_op0, 0x18); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xf000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xf000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xf000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xf000000000000000; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xf000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xf000000000000000; + *((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_xvslli_w (__m256i_op0, 0x6); + 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_xvslli_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1616161616161616; + *((unsigned long *)&__m256i_op0[2]) = 0x161616167fffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7ffe16167f161616; + *((unsigned long *)&__m256i_op0[0]) = 0x161616167fffffff; + *((unsigned long *)&__m256i_result[3]) = 0x2c2c2c2c2c2c2c2c; + *((unsigned long *)&__m256i_result[2]) = 0x2c2c2c2cfefefefe; + *((unsigned long *)&__m256i_result[1]) = 0xfefc2c2cfe2c2c2c; + *((unsigned long *)&__m256i_result[0]) = 0x2c2c2c2cfefefefe; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x1); + 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]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[2]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[1]) = 0xf8f8f8f8f8f8f8f8; + *((unsigned long *)&__m256i_result[0]) = 0xf8f8f8f8f8f8f8f8; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x1f60000000c00000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x1f60000000c00000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x60000000c0000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x60000000c0000000; + __m256i_out = __lasx_xvslli_h (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xff80ff80ff80ff80; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xff80ff80ff80ff80; + __m256i_out = __lasx_xvslli_h (__m256i_op0, 0x4); + 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]) = 0x0000008000000080; + *((unsigned long *)&__m256i_result[2]) = 0x0000008000000080; + *((unsigned long *)&__m256i_result[1]) = 0x0000008000000080; + *((unsigned long *)&__m256i_result[0]) = 0x0000008000000080; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00080008000801ff; + *((unsigned long *)&__m256i_op0[2]) = 0x0008000800080008; + *((unsigned long *)&__m256i_op0[1]) = 0x00080008000801ff; + *((unsigned long *)&__m256i_op0[0]) = 0x0008000800080008; + *((unsigned long *)&__m256i_result[3]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_d (__m256i_op0, 0x3f); + 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_xvslli_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_result[2]) = 0xf0f0f0f0f0f0f0f0; + *((unsigned long *)&__m256i_result[1]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_result[0]) = 0xf0f0f0f0f0f0f0f0; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x4); + 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_xvslli_w (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_w (__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_xvslli_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x03f0000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x03f0000000000000; + __m256i_out = __lasx_xvslli_d (__m256i_op0, 0x34); + 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_xvslli_w (__m256i_op0, 0x9); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffff80000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffff80000; + __m256i_out = __lasx_xvslli_d (__m256i_op0, 0x13); + 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]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[2]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[0]) = 0xfefefefefefefefe; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x1); + 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]) = 0xf800f800f800f800; + *((unsigned long *)&__m256i_result[2]) = 0xf800f800f800f800; + *((unsigned long *)&__m256i_result[1]) = 0xf800f800f800f800; + *((unsigned long *)&__m256i_result[0]) = 0xf800f800f800f800; + __m256i_out = __lasx_xvslli_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_h (__m256i_op0, 0x5); + 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_xvslli_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x4040404040404040; + *((unsigned long *)&__m256i_op0[2]) = 0x4040404040404040; + *((unsigned long *)&__m256i_op0[1]) = 0x4040404040404040; + *((unsigned long *)&__m256i_op0[0]) = 0x4040404040404040; + *((unsigned long *)&__m256i_result[3]) = 0x0404000004040000; + *((unsigned long *)&__m256i_result[2]) = 0x0404000004040000; + *((unsigned long *)&__m256i_result[1]) = 0x0404000004040000; + *((unsigned long *)&__m256i_result[0]) = 0x0404000004040000; + __m256i_out = __lasx_xvslli_w (__m256i_op0, 0xc); + 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_xvslli_d (__m256i_op0, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000004843ffdff; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000004843ffdff; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000c040c0; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000c040c0; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvslli_b (__m256i_op0, 0x6); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffff000000; + __m256i_out = __lasx_xvslli_d (__m256i_op0, 0x18); + 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_xvslli_h (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-1.c new file mode 100644 index 000000000..ef3a47da5 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-1.c @@ -0,0 +1,339 @@ +/* { 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]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xffe0ffe0ffe0ffe0; + *((unsigned long *)&__m256i_result[2]) = 0xffe0ffe0ffe0ffe0; + *((unsigned long *)&__m256i_result[1]) = 0xffe0ffe0ffe0ffe0; + *((unsigned long *)&__m256i_result[0]) = 0xffe0ffe0ffe0ffe0; + __m256i_out = __lasx_xvsllwil_h_b (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000003f; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000003f; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000003f0; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000003f0; + __m256i_out = __lasx_xvsllwil_h_b (__m256i_op0, 0x4); + 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_xvsllwil_h_b (__m256i_op0, 0x3); + 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_xvsllwil_h_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000080000009; + *((unsigned long *)&__m256i_op0[2]) = 0x43ef878780000009; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000080000009; + *((unsigned long *)&__m256i_op0[0]) = 0x43ef878780000009; + *((unsigned long *)&__m256i_result[3]) = 0x0218ff78fc38fc38; + *((unsigned long *)&__m256i_result[2]) = 0xfc00000000000048; + *((unsigned long *)&__m256i_result[1]) = 0x0218ff78fc38fc38; + *((unsigned long *)&__m256i_result[0]) = 0xfc00000000000048; + __m256i_out = __lasx_xvsllwil_h_b (__m256i_op0, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffc0; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffc0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfff0fff0fff0fc00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfff0fff0fff0fc00; + __m256i_out = __lasx_xvsllwil_h_b (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffffffffffff; + *((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_xvsllwil_h_b (__m256i_op0, 0x3); + 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_xvsllwil_w_h (__m256i_op0, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[3]) = 0xfc00000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfc00000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xfc00000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfc00000000000000; + __m256i_out = __lasx_xvsllwil_w_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000002; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0x1); + 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_xvsllwil_w_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0xd); + 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_xvsllwil_w_h (__m256i_op0, 0xa); + 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_xvsllwil_w_h (__m256i_op0, 0x3); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffc00fffffc00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffc00fffffc00; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0040000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000005; + *((unsigned long *)&__m256i_op0[1]) = 0x0040000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000005; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000a000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000a000; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((unsigned long *)&__m256i_result[3]) = 0x0000400000004000; + *((unsigned long *)&__m256i_result[2]) = 0x0000400000004000; + *((unsigned long *)&__m256i_result[1]) = 0x0000400000004000; + *((unsigned long *)&__m256i_result[0]) = 0x0000400000004000; + __m256i_out = __lasx_xvsllwil_w_h (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffc00; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffc00; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffc00; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffc00; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffefffffefd; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffffff8; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffbf4; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffffffc; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0x2); + 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_xvsllwil_d_w (__m256i_op0, 0x9); + 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_xvsllwil_d_w (__m256i_op0, 0x18); + 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_xvsllwil_d_w (__m256i_op0, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xdbc8000000003fff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xdbc8000000003fff; + *((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_xvsllwil_d_w (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffbff1ffffbff1; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffbff1ffffbff1; + *((unsigned long *)&__m256i_result[3]) = 0xfffffeffc4000000; + *((unsigned long *)&__m256i_result[2]) = 0xfffffeffc4000000; + *((unsigned long *)&__m256i_result[1]) = 0xfffffeffc4000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffffeffc4000000; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[2]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[0]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_result[3]) = 0xfffffe05fc47b400; + *((unsigned long *)&__m256i_result[2]) = 0xfffffe06003fc000; + *((unsigned long *)&__m256i_result[1]) = 0xfffffe05fc47b400; + *((unsigned long *)&__m256i_result[0]) = 0xfffffe06003fc000; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000feccfecc; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000feccfecc; + *((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_xvsllwil_d_w (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fe36364661af18f; + *((unsigned long *)&__m256i_op0[2]) = 0x7fe363637fe36364; + *((unsigned long *)&__m256i_op0[1]) = 0x7fe36364661af18f; + *((unsigned long *)&__m256i_op0[0]) = 0x7fe363637fe36364; + *((unsigned long *)&__m256i_result[3]) = 0x00001ff8d8d8c000; + *((unsigned long *)&__m256i_result[2]) = 0x00001ff8d8d90000; + *((unsigned long *)&__m256i_result[1]) = 0x00001ff8d8d8c000; + *((unsigned long *)&__m256i_result[0]) = 0x00001ff8d8d90000; + __m256i_out = __lasx_xvsllwil_d_w (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-2.c new file mode 100644 index 000000000..76651af63 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsllwil-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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0000000000080; + *((unsigned long *)&__m256i_result[3]) = 0x7f80780000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000004000; + *((unsigned long *)&__m256i_result[1]) = 0x7f80780000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000004000; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffefe00000000; + *((unsigned long *)&__m256i_result[3]) = 0x03fc03fc03f803f8; + *((unsigned long *)&__m256i_result[2]) = 0x03fc03fc03f803f8; + *((unsigned long *)&__m256i_result[1]) = 0x03fc03fc03f803f8; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x2); + 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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x01fe01fe01fe01fe; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x1f0fdf7f3e3b31d4; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff8000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x1f0fdf7f3e3b31d4; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff8000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x01fc03e000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x01fc03e000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x2); + 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_xvsllwil_hu_bu (__m256i_op0, 0x4); + 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_xvsllwil_hu_bu (__m256i_op0, 0x6); + 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]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00fe01e000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00fe01e000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x1); + 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_xvsllwil_hu_bu (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_op0[2]) = 0x07fed3c8f7ad28d0; + *((unsigned long *)&__m256i_op0[1]) = 0x07fee332883f86b0; + *((unsigned long *)&__m256i_op0[0]) = 0x07fed3c8f7ad28d0; + *((unsigned long *)&__m256i_result[3]) = 0x01c03f8034c03200; + *((unsigned long *)&__m256i_result[2]) = 0x3dc02b400a003400; + *((unsigned long *)&__m256i_result[1]) = 0x01c03f8034c03200; + *((unsigned long *)&__m256i_result[0]) = 0x3dc02b400a003400; + __m256i_out = __lasx_xvsllwil_hu_bu (__m256i_op0, 0x6); + 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_xvsllwil_wu_hu (__m256i_op0, 0xc); + 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_xvsllwil_wu_hu (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000054; + *((unsigned long *)&__m256i_op0[2]) = 0x00aa000000ac00fe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000054; + *((unsigned long *)&__m256i_op0[0]) = 0x00aa000000ac00fe; + *((unsigned long *)&__m256i_result[3]) = 0x0002a80000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0002b0000003f800; + *((unsigned long *)&__m256i_result[1]) = 0x0002a80000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0002b0000003f800; + __m256i_out = __lasx_xvsllwil_wu_hu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xc1be9e9e9f000000; + *((unsigned long *)&__m256i_op0[2]) = 0x41d8585858400000; + *((unsigned long *)&__m256i_op0[1]) = 0xc1be9e9e9f000000; + *((unsigned long *)&__m256i_op0[0]) = 0x41d8585858400000; + *((unsigned long *)&__m256i_result[3]) = 0x1076000016160000; + *((unsigned long *)&__m256i_result[2]) = 0x1610000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1076000016160000; + *((unsigned long *)&__m256i_result[0]) = 0x1610000000000000; + __m256i_out = __lasx_xvsllwil_wu_hu (__m256i_op0, 0xe); + 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_xvsllwil_wu_hu (__m256i_op0, 0x5); + 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_xvsllwil_wu_hu (__m256i_op0, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000000d; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000000d; + *((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_xvsllwil_wu_hu (__m256i_op0, 0x4); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[3]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[1]) = 0x7fff80007fff0000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000008000; + __m256i_out = __lasx_xvsllwil_wu_hu (__m256i_op0, 0xf); + 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_xvsllwil_wu_hu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007f00; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0x311d73ad3ec2064a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000001fc000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000c475ceb40000; + *((unsigned long *)&__m256i_result[0]) = 0x0000fb0819280000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000ff; + *((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_xvsllwil_du_wu (__m256i_op0, 0x10); + 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_result[3]) = 0x0004040404000000; + *((unsigned long *)&__m256i_result[2]) = 0x0004040404000000; + *((unsigned long *)&__m256i_result[1]) = 0x0004040404000000; + *((unsigned long *)&__m256i_result[0]) = 0x0004040404000000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x1a); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000007c8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000007c8; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000007c8; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000007c8; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000430207f944; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000430207f944; + *((unsigned long *)&__m256i_result[3]) = 0x0000000086000000; + *((unsigned long *)&__m256i_result[2]) = 0x00040ff288000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000086000000; + *((unsigned long *)&__m256i_result[0]) = 0x00040ff288000000; + __m256i_out = __lasx_xvsllwil_du_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_xvsllwil_du_wu (__m256i_op0, 0x13); + 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_xvsllwil_du_wu (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000fff000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000fff000000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000001ffe00000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x00000001ffe00000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[2]) = 0x80000000ffc8ff88; + *((unsigned long *)&__m256i_op0[1]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[0]) = 0x80000000ffc8ff88; + *((unsigned long *)&__m256i_result[3]) = 0x0001000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0001ff91ff100000; + *((unsigned long *)&__m256i_result[1]) = 0x0001000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0001ff91ff100000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000008c; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000008c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000001180000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000001180000000; + __m256i_out = __lasx_xvsllwil_du_wu (__m256i_op0, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrl.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrl.c new file mode 100644 index 000000000..1d591c35c --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrl.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_xvsrl_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_xvsrl_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]) = 0x000000017ffffffe; + *((unsigned long *)&__m256i_op1[2]) = 0x000000017ffffffe; + *((unsigned long *)&__m256i_op1[1]) = 0x000000017ffffffe; + *((unsigned long *)&__m256i_op1[0]) = 0x000000017ffffffe; + *((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_xvsrl_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_xvsrl_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]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001; + *((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_xvsrl_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_xvsrl_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]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x7fffffffffffffff; + __m256i_out = __lasx_xvsrl_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x247fe49409620040; + *((unsigned long *)&__m256i_op0[2]) = 0x247fe49409620040; + *((unsigned long *)&__m256i_op0[1]) = 0x6580668200fe0002; + *((unsigned long *)&__m256i_op0[0]) = 0x6580668200fe0002; + *((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]) = 0x247fe49409620040; + *((unsigned long *)&__m256i_result[2]) = 0x247fe49409620040; + *((unsigned long *)&__m256i_result[1]) = 0x6580668200fe0002; + *((unsigned long *)&__m256i_result[0]) = 0x6580668200fe0002; + __m256i_out = __lasx_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000003f7e3f; + *((unsigned long *)&__m256i_op0[2]) = 0xffc6cc05c64d960e; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000003f7e3f; + *((unsigned long *)&__m256i_op0[0]) = 0xff874dc687870000; + *((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]) = 0x00000000003f7e3f; + *((unsigned long *)&__m256i_result[2]) = 0xffc6cc05c64d960e; + *((unsigned long *)&__m256i_result[1]) = 0x00000000003f7e3f; + *((unsigned long *)&__m256i_result[0]) = 0xff874dc687870000; + __m256i_out = __lasx_xvsrl_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_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000483800; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000483800; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffba0c05; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffba0c05; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000483800; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000483800; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrl_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000000010000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000000010000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xff00ffffff00ffff; + __m256i_out = __lasx_xvsrl_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]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrl_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]) = 0x0000000000000007; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000007; + *((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_xvsrl_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]) = 0x0000008000000080; + *((unsigned long *)&__m256i_op1[2]) = 0x0000008000000080; + *((unsigned long *)&__m256i_op1[1]) = 0x0000008000000080; + *((unsigned long *)&__m256i_op1[0]) = 0x0000008000000080; + *((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_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000200; + *((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]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000200; + __m256i_out = __lasx_xvsrl_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrl_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000008000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000001fffe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000002; + __m256i_out = __lasx_xvsrl_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000080000000800; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000080000000800; + *((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]) = 0x0000080000000800; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000080000000800; + __m256i_out = __lasx_xvsrl_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffff70156; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffffff70156; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffff70156; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffff70156; + *((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]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100000001; + __m256i_out = __lasx_xvsrl_w (__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]) = 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]) = 0x0000000000000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008; + __m256i_out = __lasx_xvsrl_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fe37fe3001d001d; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fe37fe3001d001d; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff7fff0000; + *((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]) = 0x7fe37fe3001d001d; + *((unsigned long *)&__m256i_result[2]) = 0x7fff7fff7fff0000; + *((unsigned long *)&__m256i_result[1]) = 0x7fe37fe3001d001d; + *((unsigned long *)&__m256i_result[0]) = 0x7fff7fff7fff0000; + __m256i_out = __lasx_xvsrl_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrl_h (__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]) = 0x0000000000000001; + *((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]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvsrl_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000004000; + *((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]) = 0x0000000000004000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrl_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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((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_xvsrl_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrl_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]) = 0xfff10000fff10000; + *((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_xvsrl_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]) = 0x0000000001010800; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000001010800; + *((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_xvsrl_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_xvsrl_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_op0[2]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_op0[1]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_op0[0]) = 0x0d0d0d0d0d0d0d0d; + *((unsigned long *)&__m256i_op1[3]) = 0x000008e4bfc4eff0; + *((unsigned long *)&__m256i_op1[2]) = 0x0000001ffee10000; + *((unsigned long *)&__m256i_op1[1]) = 0x000008e4bfc4eff0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000001ffee10000; + *((unsigned long *)&__m256i_result[3]) = 0x0d0d0d000000000d; + *((unsigned long *)&__m256i_result[2]) = 0x0d0d0d0000060d0d; + *((unsigned long *)&__m256i_result[1]) = 0x0d0d0d000000000d; + *((unsigned long *)&__m256i_result[0]) = 0x0d0d0d0000060d0d; + __m256i_out = __lasx_xvsrl_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000001010101; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000001010101; + *((unsigned long *)&__m256i_op1[3]) = 0x000408080c111414; + *((unsigned long *)&__m256i_op1[2]) = 0x000408080c111414; + *((unsigned long *)&__m256i_op1[1]) = 0x000408080c111414; + *((unsigned long *)&__m256i_op1[0]) = 0x000408080c111414; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000010; + __m256i_out = __lasx_xvsrl_w (__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]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000e0000000d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000e0000000e; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000e0000000d; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffff03ffffff07; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffff03ffffff07; + __m256i_out = __lasx_xvsrl_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]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op1[2]) = 0x80008000fff98000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000800080008000; + *((unsigned long *)&__m256i_op1[0]) = 0x80008000fff98000; + *((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_xvsrl_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]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffff00000000; + *((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_xvsrl_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000040004000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000040004000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000040404000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000040404000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000040004000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000040004000; + __m256i_out = __lasx_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000040404040; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000040404040; + *((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]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_result[2]) = 0x0000000040404040; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffefefefe; + *((unsigned long *)&__m256i_result[0]) = 0x0000000040404040; + __m256i_out = __lasx_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfe01fe01fd02fd02; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_op0[1]) = 0xfe01fe01fd02fd02; + *((unsigned long *)&__m256i_op0[0]) = 0x000000003fc03fc0; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000001010100; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000405; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000001010100; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000405; + *((unsigned long *)&__m256i_result[3]) = 0xfe01fe017e81fd02; + *((unsigned long *)&__m256i_result[2]) = 0x000000003fc001fe; + *((unsigned long *)&__m256i_result[1]) = 0xfe01fe017e81fd02; + *((unsigned long *)&__m256i_result[0]) = 0x000000003fc001fe; + __m256i_out = __lasx_xvsrl_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]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op1[2]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_op1[1]) = 0x000000010000685e; + *((unsigned long *)&__m256i_op1[0]) = 0x000020a4ffffbe4f; + *((unsigned long *)&__m256i_result[3]) = 0x00000003ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0001ffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x00000003ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0001ffffffffffff; + __m256i_out = __lasx_xvsrl_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffff8000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffff8000; + *((unsigned long *)&__m256i_op1[3]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffff00; + *((unsigned long *)&__m256i_op1[1]) = 0x1c1c1c1c1c1c1c1c; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffff00; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00000001ffff8000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000001ffff8000; + __m256i_out = __lasx_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[2]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[1]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_op0[0]) = 0xfd02fd02fd02fd02; + *((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]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_result[2]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_result[1]) = 0xfd02fd02fd02fd02; + *((unsigned long *)&__m256i_result[0]) = 0xfd02fd02fd02fd02; + __m256i_out = __lasx_xvsrl_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001fffe0005fff9; + *((unsigned long *)&__m256i_op0[2]) = 0x04f004f204f204f0; + *((unsigned long *)&__m256i_op0[1]) = 0x0001fffe0005fff9; + *((unsigned long *)&__m256i_op0[0]) = 0x04f004f204f204f0; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000002780; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000002780; + __m256i_out = __lasx_xvsrl_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-xvsrli.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrli.c new file mode 100644 index 000000000..e8696701f --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrli.c @@ -0,0 +1,405 @@ +/* { 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000050005; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000010001; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_h (__m256i_op0, 0x2); + 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_xvsrli_h (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x1010101110101011; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x1111111211111112; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000004040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000004444; + __m256i_out = __lasx_xvsrli_d (__m256i_op0, 0x2e); + 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_xvsrli_d (__m256i_op0, 0x3e); + 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_xvsrli_d (__m256i_op0, 0xd); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffcc8000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007dfdff4b; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x003ffff300000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000001f7f7f; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x9240f24a84b18025; + *((unsigned long *)&__m256i_op0[2]) = 0x9240f24a84b18025; + *((unsigned long *)&__m256i_op0[1]) = 0xb2c0b341807f8006; + *((unsigned long *)&__m256i_op0[0]) = 0xb2c0b341807f8006; + *((unsigned long *)&__m256i_result[3]) = 0x009200f200840080; + *((unsigned long *)&__m256i_result[2]) = 0x009200f200840080; + *((unsigned long *)&__m256i_result[1]) = 0x00b200b300800080; + *((unsigned long *)&__m256i_result[0]) = 0x00b200b300800080; + __m256i_out = __lasx_xvsrli_h (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000010000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000c40086; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000010000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000c40086; + *((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_xvsrli_h (__m256i_op0, 0x9); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0001ffff0001ffff; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0xf); + 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_xvsrli_b (__m256i_op0, 0x6); + 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_xvsrli_b (__m256i_op0, 0x2); + 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_xvsrli_h (__m256i_op0, 0x6); + 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_xvsrli_d (__m256i_op0, 0x1e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffcb423a587053; + *((unsigned long *)&__m256i_op0[2]) = 0x6d46f43e71141b81; + *((unsigned long *)&__m256i_op0[1]) = 0xffffcb423a584528; + *((unsigned long *)&__m256i_op0[0]) = 0x9bdf36c8d78158a1; + *((unsigned long *)&__m256i_result[3]) = 0x000000000007fffe; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000036a37; + *((unsigned long *)&__m256i_result[1]) = 0x000000000007fffe; + *((unsigned long *)&__m256i_result[0]) = 0x000000000004def9; + __m256i_out = __lasx_xvsrli_d (__m256i_op0, 0x2d); + 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_xvsrli_h (__m256i_op0, 0x1); + 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_xvsrli_d (__m256i_op0, 0xb); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0889088908810881; + *((unsigned long *)&__m256i_op0[2]) = 0x0081010000810100; + *((unsigned long *)&__m256i_op0[1]) = 0x0889088900810088; + *((unsigned long *)&__m256i_op0[0]) = 0x0081010000810100; + *((unsigned long *)&__m256i_result[3]) = 0x0004448444844084; + *((unsigned long *)&__m256i_result[2]) = 0x0000408080004080; + *((unsigned long *)&__m256i_result[1]) = 0x0004448444804080; + *((unsigned long *)&__m256i_result[0]) = 0x0000408080004080; + __m256i_out = __lasx_xvsrli_d (__m256i_op0, 0x9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000001d001d; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000001d001d; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000030003; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000030003; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_h (__m256i_op0, 0x3); + 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_xvsrli_d (__m256i_op0, 0x22); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000077fff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000307; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_b (__m256i_op0, 0x5); + 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_xvsrli_b (__m256i_op0, 0x0); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000a0010400a; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000a0010400a; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000598; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000598; + *((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_xvsrli_w (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_d (__m256i_op0, 0x15); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000007f807f80; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000007f807f80; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000000000ff00; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000ff00; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0xf); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_b (__m256i_op0, 0x5); + 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]) = 0x0000000100000000; + *((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_xvsrli_h (__m256i_op0, 0xc); + 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]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0001ffff0001ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0001ffff0001ffff; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0xf); + 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_xvsrli_h (__m256i_op0, 0x9); + 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_xvsrli_d (__m256i_op0, 0x23); + 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_xvsrli_h (__m256i_op0, 0x0); + 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]) = 0x3fffffff3fffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x3fffffff3fffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrli_w (__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]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_result[2]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_result[1]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_result[0]) = 0x00003fff00003fff; + __m256i_out = __lasx_xvsrli_w (__m256i_op0, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffff10; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffff10; + *((unsigned long *)&__m256i_result[3]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_result[2]) = 0x3fff3fff3fff3fc4; + *((unsigned long *)&__m256i_result[1]) = 0x3fff3fff3fff3fff; + *((unsigned long *)&__m256i_result[0]) = 0x3fff3fff3fff3fc4; + __m256i_out = __lasx_xvsrli_h (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrln.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrln.c new file mode 100644 index 000000000..d54991051 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrln.c @@ -0,0 +1,425 @@ +/* { 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_xvsrln_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000003868686a20; + *((unsigned long *)&__m256i_op0[2]) = 0x0045b8ae81bce1d8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000003868686a20; + *((unsigned long *)&__m256i_op0[0]) = 0x0045b8ae81bce1d8; + *((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]) = 0x00386a20b8aee1d8; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00386a20b8aee1d8; + __m256i_out = __lasx_xvsrln_h_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_xvsrln_b_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]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((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_xvsrln_b_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]) = 0x2020000020200000; + *((unsigned long *)&__m256i_op1[2]) = 0x2020000020200000; + *((unsigned long *)&__m256i_op1[1]) = 0x0008000001010000; + *((unsigned long *)&__m256i_op1[0]) = 0x0101000001010000; + *((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_xvsrln_b_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff0000ffff; + *((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_xvsrln_h_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]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00ff017e01fe; + *((unsigned long *)&__m256i_op1[1]) = 0x017e00ff017e00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00ff017e01fe; + *((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_xvsrln_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x88888a6d0962002e; + *((unsigned long *)&__m256i_op0[2]) = 0xdb8a3109fe0f0020; + *((unsigned long *)&__m256i_op0[1]) = 0x0000007fff01fffb; + *((unsigned long *)&__m256i_op0[0]) = 0xdb8e20990cce025a; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xff01ff3400000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ff83ff01; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0962002efe0f0020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xff01fffb8667012d; + __m256i_out = __lasx_xvsrln_w_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_xvsrln_h_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]) = 0xfff8fff8fff8fff8; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xfff8fff8fff8fff8; + *((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_xvsrln_b_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_xvsrln_b_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrln_h_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_xvsrln_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000fffeffeb; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000fb7afb62; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000fffeffeb; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fb7afb62; + *((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]) = 0xfffeffebfb7afb62; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfffeffebfb7afb62; + __m256i_out = __lasx_xvsrln_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100010001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000010000000a; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000010000000a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000040; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000040; + __m256i_out = __lasx_xvsrln_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff010000ff017e; + *((unsigned long *)&__m256i_op0[2]) = 0x01fe01ae00ff00ff; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff010000ff017e; + *((unsigned long *)&__m256i_op0[0]) = 0x01fe01ae00ff00ff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000010000000a; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000a00000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000010000000a; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00ff017e6b803fc0; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00ff017e6b803fc0; + __m256i_out = __lasx_xvsrln_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000064; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000781; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000064; + *((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]) = 0x0000000000000064; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000078100000064; + __m256i_out = __lasx_xvsrln_h_w (__m256i_op0, __m256i_op1); + 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_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]) = 0xa1a1a1a1a1a15e5e; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xa1a1a1a1a1a15e5e; + __m256i_out = __lasx_xvsrln_b_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]) = 0x0003800400038004; + *((unsigned long *)&__m256i_op1[2]) = 0x000a800b000a800b; + *((unsigned long *)&__m256i_op1[1]) = 0x0003800400038004; + *((unsigned long *)&__m256i_op1[0]) = 0x000a800b000a800b; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffff00000000; + __m256i_out = __lasx_xvsrln_b_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]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000100000001; + *((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_xvsrln_b_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]) = 0x0080000000800000; + *((unsigned long *)&__m256i_op1[2]) = 0x0080000000800000; + *((unsigned long *)&__m256i_op1[1]) = 0x0080000000800000; + *((unsigned long *)&__m256i_op1[0]) = 0x0080000000800000; + *((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_xvsrln_h_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]) = 0x0404040404040404; + *((unsigned long *)&__m256i_op1[2]) = 0x0404040404040404; + *((unsigned long *)&__m256i_op1[1]) = 0x0404040404040404; + *((unsigned long *)&__m256i_op1[0]) = 0x0404040404040404; + *((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_xvsrln_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000000; + *((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]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010000; + __m256i_out = __lasx_xvsrln_b_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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffff97a2; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffff97a2; + *((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_xvsrln_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000027; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000040; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000027; + *((unsigned long *)&__m256i_op1[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffffffffffff; + *((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_xvsrln_h_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_xvsrln_b_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffff10; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffff10; + *((unsigned long *)&__m256i_op1[3]) = 0x1716151417161514; + *((unsigned long *)&__m256i_op1[2]) = 0x1716151417161514; + *((unsigned long *)&__m256i_op1[1]) = 0x1716151417161514; + *((unsigned long *)&__m256i_op1[0]) = 0x1716151417161514; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0fff0fff0fff0fff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0fff0fff0fff0fff; + __m256i_out = __lasx_xvsrln_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlni.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlni.c new file mode 100644 index 000000000..0fb6483cf --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlni.c @@ -0,0 +1,680 @@ +/* { 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_xvsrlni_w_d (__m256i_op0, __m256i_op1, 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_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_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0x9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x7f00000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000001010101; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000001010101; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0xf); + 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_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x1d); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffc500000002d; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000200000034; + *((unsigned long *)&__m256i_op1[3]) = 0xbfa3e127c147721f; + *((unsigned long *)&__m256i_op1[2]) = 0x1729c173836edfbe; + *((unsigned long *)&__m256i_op1[1]) = 0xdf91f111808007fb; + *((unsigned long *)&__m256i_op1[0]) = 0x5ff1f90ffffbf30f; + *((unsigned long *)&__m256i_result[3]) = 0x00000000ff280016; + *((unsigned long *)&__m256i_result[2]) = 0xd193a30f94b9b7df; + *((unsigned long *)&__m256i_result[1]) = 0x000000000001001a; + *((unsigned long *)&__m256i_result[0]) = 0xc88840fdf887fd87; + __m256i_out = __lasx_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0x1); + 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]) = 0x00000000ffffff00; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000000000000f; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffc5556aaa8; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffc5556aaa8; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x555555553f800000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x555555553f800000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000007070205; + *((unsigned long *)&__m256i_result[2]) = 0x0000000002020100; + *((unsigned long *)&__m256i_result[1]) = 0x0000000007070205; + *((unsigned long *)&__m256i_result[0]) = 0x0000000002020100; + __m256i_out = __lasx_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0xd); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffefefffffefe; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffefe00000000; + *((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]) = 0x000003ff000003ff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000003ff000003ff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x36); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x73); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0xff00ffffff00ffff; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffe01fe01f; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffe01fe01f; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffe01fe01f; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffe01fe01f; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 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_op1[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000fe01020b0001; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000fe01020b0001; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0fff0fff00000020; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0fff0fff00000020; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x14); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x01fb16ef98f97e90; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x01fb16ef98f97e90; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x0); + 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]) = 0x003f003f003f003f; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x003f003f003f003f; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x1a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op0[2]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_op0[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op0[0]) = 0xfffa0078fffa0074; + *((unsigned long *)&__m256i_op1[3]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[2]) = 0xfffa2078fffa2074; + *((unsigned long *)&__m256i_op1[1]) = 0xfffefffefffefffe; + *((unsigned long *)&__m256i_op1[0]) = 0xfffa2078fffa2074; + *((unsigned long *)&__m256i_result[3]) = 0x01ff01ff01ff01ff; + *((unsigned long *)&__m256i_result[2]) = 0x01ff01ff01ff01ff; + *((unsigned long *)&__m256i_result[1]) = 0x01ff01ff01ff01ff; + *((unsigned long *)&__m256i_result[0]) = 0x01ff01ff01ff01ff; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x17); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000401000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00003e6c0000cb7a; + *((unsigned long *)&__m256i_op0[1]) = 0x0000401000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00003e6c0000cb7a; + *((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]) = 0x40000000b000032d; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x40000000b000032d; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 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_op1[3]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_op1[1]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x007f00ff007f00ff; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_result[2]) = 0x01fc03fc01fc03fc; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffffffffffc; + *((unsigned long *)&__m256i_result[0]) = 0x01fc03fc01fc03fc; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x3e); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ef0120; + *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff; + *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ef0120; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000e9ece9ec; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000e9ece9ec; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000e9ece9ec; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000e9ece9ec; + *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff0120; + *((unsigned long *)&__m256i_result[2]) = 0x0000e9ec0000e9ec; + *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff0120; + *((unsigned long *)&__m256i_result[0]) = 0x0000e9ec0000e9ec; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffdd001dffe00020; + *((unsigned long *)&__m256i_op0[2]) = 0xffdd001dffe00031; + *((unsigned long *)&__m256i_op0[1]) = 0xffdd001dffe00020; + *((unsigned long *)&__m256i_op0[0]) = 0xffdd001dffe00031; + *((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]) = 0x3ff73ff83ff73ff8; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x3ff73ff83ff73ff8; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x12); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_op0[2]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_op0[1]) = 0x00003fff00003fff; + *((unsigned long *)&__m256i_op0[0]) = 0x00003fff00003fff; + *((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]) = 0x0003000300030003; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0003000300030003; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0003000300030003; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0003000300030003; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000003; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000003; + *((unsigned long *)&__m256i_result[3]) = 0x0600060000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0600060000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x7); + 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]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0007fff8000ffff0; + *((unsigned long *)&__m256i_result[2]) = 0x000000000007fff8; + *((unsigned long *)&__m256i_result[1]) = 0x0007fff8000ffff0; + *((unsigned long *)&__m256i_result[0]) = 0x000000000007fff8; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x1d); + 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]) = 0x1e0000001e002000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1e0000001e002000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x27); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffff3225; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffff3225; + *((unsigned long *)&__m256i_op1[3]) = 0x2221201f1e1d1c1b; + *((unsigned long *)&__m256i_op1[2]) = 0x1a19181716151413; + *((unsigned long *)&__m256i_op1[1]) = 0x2221201f1e1d1c1b; + *((unsigned long *)&__m256i_op1[0]) = 0x1a19181716151413; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000004442403; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000004442403; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x63); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fef0000ffff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fef0000ffff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000ff00ff; + *((unsigned long *)&__m256i_result[3]) = 0xde00fe0000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000fe010000fe01; + *((unsigned long *)&__m256i_result[1]) = 0xde00fe0000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000fe010000fe01; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x7); + 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]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00ff00fe00ff00fe; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00ff00fe00ff00fe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000007070707; + *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff07070707; + *((unsigned long *)&__m256i_result[1]) = 0x0000000007070707; + *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff07070707; + __m256i_out = __lasx_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_op0[1]) = 0xffff000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffff00000001; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffff00000001; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[3]) = 0x03ff000003ff03ff; + *((unsigned long *)&__m256i_result[2]) = 0x03ff000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x03ff000003ff03ff; + *((unsigned long *)&__m256i_result[0]) = 0x03ff000000000000; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x16); + 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_xvsrlni_b_h (__m256i_op0, __m256i_op1, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000700000007; + *((unsigned long *)&__m256i_result[2]) = 0x0007ffff0007ffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000700000007; + *((unsigned long *)&__m256i_result[0]) = 0x0007ffff0007ffff; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x2d); + 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_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x66); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000e000e; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000000e000e; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000e000e; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000000e000e; + *((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]) = 0x00000e0000000e00; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x00000e0000000e00; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x8); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xfc003802fc000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x03802fc000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x03802fc000000000; + __m256i_out = __lasx_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x14); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x5a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x080808000828082f; + *((unsigned long *)&__m256i_op0[2]) = 0x0808080008280820; + *((unsigned long *)&__m256i_op0[1]) = 0x080808000828082f; + *((unsigned long *)&__m256i_op0[0]) = 0x0808080008280820; + *((unsigned long *)&__m256i_op1[3]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_op1[2]) = 0x132feea900000000; + *((unsigned long *)&__m256i_op1[1]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_op1[0]) = 0x132feea900000000; + *((unsigned long *)&__m256i_result[3]) = 0x00828082f0808080; + *((unsigned long *)&__m256i_result[2]) = 0xf18181818132feea; + *((unsigned long *)&__m256i_result[1]) = 0x00828082f0808080; + *((unsigned long *)&__m256i_result[0]) = 0xf18181818132feea; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x24); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000200000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000004000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000200000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000004000; + *((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_xvsrlni_w_d (__m256i_op0, __m256i_op1, 0x39); + 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_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x43); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfe01fe01fc01fc01; + *((unsigned long *)&__m256i_op0[2]) = 0x000000003fc03bbc; + *((unsigned long *)&__m256i_op0[1]) = 0xfe01fe01fc01fc01; + *((unsigned long *)&__m256i_op0[0]) = 0x000000003fc03bbc; + *((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]) = 0xfc01000000003fc0; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xfc01000000003fc0; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 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_op1[3]) = 0x000000000001fff0; + *((unsigned long *)&__m256i_op1[2]) = 0x0000feff0001ffb8; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000001fff0; + *((unsigned long *)&__m256i_op1[0]) = 0x0000feff0001ffb8; + *((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_xvsrlni_h_w (__m256i_op0, __m256i_op1, 0x11); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000126000200; + *((unsigned long *)&__m256i_op0[2]) = 0x2555205ea7bc4020; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000126000200; + *((unsigned long *)&__m256i_op0[0]) = 0x2555205ea7bc4020; + *((unsigned long *)&__m256i_op1[3]) = 0x0fffffff10000006; + *((unsigned long *)&__m256i_op1[2]) = 0x10ffffff10000006; + *((unsigned long *)&__m256i_op1[1]) = 0x0fffffff10000006; + *((unsigned long *)&__m256i_op1[0]) = 0x10ffffff10000006; + *((unsigned long *)&__m256i_result[3]) = 0x0000000004980008; + *((unsigned long *)&__m256i_result[2]) = 0x003ffffffc400000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000004980008; + *((unsigned long *)&__m256i_result[0]) = 0x003ffffffc400000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x46); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00f0000000f00010; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0ff00fff0ff10; + *((unsigned long *)&__m256i_op0[1]) = 0x00f0000000f00010; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0ff00fff0ff10; + *((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]) = 0x0087ff87f807ff87; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0087ff87f807ff87; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0xd); + 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_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x68); + 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_xvsrlni_b_h (__m256i_op0, __m256i_op1, 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_op1[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x50); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0005000500050005; + *((unsigned long *)&__m256i_op0[2]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000050005; + *((unsigned long *)&__m256i_op0[0]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_op1[3]) = 0xf007fe76f008fe19; + *((unsigned long *)&__m256i_op1[2]) = 0xf08aff01f07cc291; + *((unsigned long *)&__m256i_op1[1]) = 0xf007fe76f008fe19; + *((unsigned long *)&__m256i_op1[0]) = 0xf08aff01f07cc291; + *((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_xvsrlni_d_q (__m256i_op0, __m256i_op1, 0x66); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlr.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlr.c new file mode 100644 index 000000000..22e62a3e7 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlr.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]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x40d74f979f99419f; + *((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]) = 0x00000000ffff0000; + *((unsigned long *)&__m256i_result[0]) = 0x40d74f979f99419f; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff8080000004000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000080000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff8080000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffffefffffefc; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffffffffffffe; + *((unsigned long *)&__m256i_result[3]) = 0x0000000200000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000000; + __m256i_out = __lasx_xvsrlr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0000000000080; + *((unsigned long *)&__m256i_op0[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0000000000080; + *((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]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xfff0000000000080; + *((unsigned long *)&__m256i_result[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xfff0000000000080; + __m256i_out = __lasx_xvsrlr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6300000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x6300000000000000; + *((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]) = 0x6300000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x6300000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlr_d (__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]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000ffff00000000; + *((unsigned long *)&__m256i_result[3]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x7ff0000000000000; + __m256i_out = __lasx_xvsrlr_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101; + __m256i_out = __lasx_xvsrlr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x000000007fffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000001020202; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000001020202; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlr_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]) = 0x0000000000002222; + *((unsigned long *)&__m256i_op1[2]) = 0x00003ddd80007bbb; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000002222; + *((unsigned long *)&__m256i_op1[0]) = 0x00003ddd80007bbb; + *((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_xvsrlr_d (__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_xvsrlr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((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]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x009f00f8007e00f0; + *((unsigned long *)&__m256i_op0[2]) = 0x007f007f0081007f; + *((unsigned long *)&__m256i_op0[1]) = 0x009f00f8007e00f0; + *((unsigned long *)&__m256i_op0[0]) = 0x007f007f0081007f; + *((unsigned long *)&__m256i_op1[3]) = 0x0ea85f60984a8555; + *((unsigned long *)&__m256i_op1[2]) = 0x00a21ef3246995f3; + *((unsigned long *)&__m256i_op1[1]) = 0x1189ce8000fa14ed; + *((unsigned long *)&__m256i_op1[0]) = 0x0e459089665f40f3; + *((unsigned long *)&__m256i_result[3]) = 0x000100f800000008; + *((unsigned long *)&__m256i_result[2]) = 0x0020001000000010; + *((unsigned long *)&__m256i_result[1]) = 0x000000f800000000; + *((unsigned long *)&__m256i_result[0]) = 0x0004000000000010; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_op0[2]) = 0x00003fc00000428a; + *((unsigned long *)&__m256i_op0[1]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_op0[0]) = 0x00003fc00000428a; + *((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]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[1]) = 0xffffc040ffffc09d; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001; + __m256i_out = __lasx_xvsrlr_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_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op1[3]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op1[2]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op1[1]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_op1[0]) = 0xfffffff1fffffff1; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000008000; + __m256i_out = __lasx_xvsrlr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7f7f000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x007f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_op0[1]) = 0x7f7f000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x007f7f7f7f7f7f7f; + *((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]) = 0x0001000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000100010001; + *((unsigned long *)&__m256i_result[1]) = 0x0001000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000100010001; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[3]) = 0x80000000ff800000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op1[1]) = 0x80000000ff800000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000080000000; + *((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_xvsrlr_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_xvsrlr_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]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000200000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000200000002; + *((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_xvsrlr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7c00000880008000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7c00000880008000; + *((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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[2]) = 0x0100000001000100; + *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_result[0]) = 0x0100000001000100; + __m256i_out = __lasx_xvsrlr_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]) = 0x0000000000000064; + *((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]) = 0x0000000000000064; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000200000008; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000200000008; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000200000008; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000200000008; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000430207f944; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000430207f944; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffffff80; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffff80; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000000430207f944; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000430207f944; + __m256i_out = __lasx_xvsrlr_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_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001; + *((unsigned long *)&__m256i_op1[3]) = 0x0000038000000268; + *((unsigned long *)&__m256i_op1[2]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op1[1]) = 0x0000038000000268; + *((unsigned long *)&__m256i_op1[0]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffff010ff0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffff010ff0; + *((unsigned long *)&__m256i_result[3]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000201; + *((unsigned long *)&__m256i_result[1]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000201; + __m256i_out = __lasx_xvsrlr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000007f0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000007f0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000010006d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000080040; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000010006d; + *((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_xvsrlr_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]) = 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_xvsrlr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff01fb0408; + *((unsigned long *)&__m256i_op0[2]) = 0xf2b180c9fc1fefdc; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff01fb0408; + *((unsigned long *)&__m256i_op0[0]) = 0xf2b180c9fc1fefdc; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000000000b7; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffefff80; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000000b7; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffefff80; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[2]) = 0xf2b180c9fc1fefdc; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200; + *((unsigned long *)&__m256i_result[0]) = 0xf2b180c9fc1fefdc; + __m256i_out = __lasx_xvsrlr_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]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((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_xvsrlr_b (__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]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000080; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000080; + *((unsigned long *)&__m256i_result[3]) = 0xff1cff1cff1c3fc7; + *((unsigned long *)&__m256i_result[2]) = 0xff1cff1cff1cff1c; + *((unsigned long *)&__m256i_result[1]) = 0xff1cff1cff1c3fc7; + *((unsigned long *)&__m256i_result[0]) = 0xff1cff1cff1cff1c; + __m256i_out = __lasx_xvsrlr_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op0[2]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op0[1]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op0[0]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op1[3]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op1[2]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op1[1]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_op1[0]) = 0x6b6b6b6b6b6b6b6b; + *((unsigned long *)&__m256i_result[3]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[2]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[1]) = 0x00000000000d6d6d; + *((unsigned long *)&__m256i_result[0]) = 0x00000000000d6d6d; + __m256i_out = __lasx_xvsrlr_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000f0f0f0f0f0f0; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xff01ff01ff01f010; + *((unsigned long *)&__m256i_op1[2]) = 0xff01ff01ff01f010; + *((unsigned long *)&__m256i_op1[1]) = 0xff01ff01ff01f010; + *((unsigned long *)&__m256i_op1[0]) = 0xff01ff01ff01f010; + *((unsigned long *)&__m256i_result[3]) = 0x000078780000f0f1; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x000078780000f0f1; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlr_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffc00040; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffc00040; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x1080108010060002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x1080108010060002; + __m256i_out = __lasx_xvsrlr_b (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlri.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlri.c new file mode 100644 index 000000000..71f770aff --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlri.c @@ -0,0 +1,416 @@ +/* { 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x33); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000; + __m256i_out = __lasx_xvsrlri_w (__m256i_op0, 0x1); + 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_result[3]) = 0x0000000001000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000001000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000001000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000001000000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x28); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000505; + *((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_xvsrlri_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffff0002fffefffe; + *((unsigned long *)&__m256i_op0[2]) = 0xffff0002ff7e8286; + *((unsigned long *)&__m256i_op0[1]) = 0xffff0002fffefffe; + *((unsigned long *)&__m256i_op0[0]) = 0xffff0002ffff0001; + *((unsigned long *)&__m256i_result[3]) = 0x0202000002020202; + *((unsigned long *)&__m256i_result[2]) = 0x0202000002010101; + *((unsigned long *)&__m256i_result[1]) = 0x0202000002020202; + *((unsigned long *)&__m256i_result[0]) = 0x0202000002020000; + __m256i_out = __lasx_xvsrlri_b (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x1); + 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_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000001000000010; + __m256i_out = __lasx_xvsrlri_w (__m256i_op0, 0x1c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xe1616161e1614e60; + *((unsigned long *)&__m256i_op0[2]) = 0xe1616161e1614e60; + *((unsigned long *)&__m256i_op0[1]) = 0xe1616161e1614e60; + *((unsigned long *)&__m256i_op0[0]) = 0xe1616161e1614e60; + *((unsigned long *)&__m256i_result[3]) = 0x0703030307030203; + *((unsigned long *)&__m256i_result[2]) = 0x0703030307030203; + *((unsigned long *)&__m256i_result[1]) = 0x0703030307030203; + *((unsigned long *)&__m256i_result[0]) = 0x0703030307030203; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x5); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00003f3fc6c68787; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00003f3f87870000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00003f3fc6c68787; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00003f3f87870000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0101010183f95466; + *((unsigned long *)&__m256i_op0[2]) = 0x0101010101010101; + *((unsigned long *)&__m256i_op0[1]) = 0x01010101d58efe94; + *((unsigned long *)&__m256i_op0[0]) = 0x0101010101010101; + *((unsigned long *)&__m256i_result[3]) = 0x0000101000083f95; + *((unsigned long *)&__m256i_result[2]) = 0x0000101000001010; + *((unsigned long *)&__m256i_result[1]) = 0x00001010000d58f0; + *((unsigned long *)&__m256i_result[0]) = 0x0000101000001010; + __m256i_out = __lasx_xvsrlri_w (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000007; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000007; + *((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_xvsrlri_w (__m256i_op0, 0x3); + 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_xvsrlri_d (__m256i_op0, 0x23); + 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_result[3]) = 0x0010002000100020; + *((unsigned long *)&__m256i_result[2]) = 0x0010002000100020; + *((unsigned long *)&__m256i_result[1]) = 0x0010002000100020; + *((unsigned long *)&__m256i_result[0]) = 0x0010002000100020; + __m256i_out = __lasx_xvsrlri_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_w (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x8); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000ff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000001; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x8); + 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_result[3]) = 0x0020002000200020; + *((unsigned long *)&__m256i_result[2]) = 0x0020000000200000; + *((unsigned long *)&__m256i_result[1]) = 0x0020002000200020; + *((unsigned long *)&__m256i_result[0]) = 0x0020000000200000; + __m256i_out = __lasx_xvsrlri_h (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_w (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_b (__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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlri_h (__m256i_op0, 0xc); + 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_xvsrlri_b (__m256i_op0, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000040000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000040000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000020000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000020000; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x000e000e000e000e; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x000e000e000e000e; + *((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_xvsrlri_d (__m256i_op0, 0x39); + 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]) = 0x0000040000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000040000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000040000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000040000000000; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x16); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_op0[2]) = 0x132feea900000000; + *((unsigned long *)&__m256i_op0[1]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_op0[0]) = 0x132feea900000000; + *((unsigned long *)&__m256i_result[3]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_result[2]) = 0x132feea900000000; + *((unsigned long *)&__m256i_result[1]) = 0x04e8296f18181818; + *((unsigned long *)&__m256i_result[0]) = 0x132feea900000000; + __m256i_out = __lasx_xvsrlri_h (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000038000000268; + *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000038000000268; + *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff7fff7fff; + *((unsigned long *)&__m256i_result[3]) = 0x000001200000011a; + *((unsigned long *)&__m256i_result[2]) = 0x2040204020402040; + *((unsigned long *)&__m256i_result[1]) = 0x000001200000011a; + *((unsigned long *)&__m256i_result[0]) = 0x2040204020402040; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x2); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff81001dff9dff9e; + *((unsigned long *)&__m256i_op0[2]) = 0xff81001dff9d003b; + *((unsigned long *)&__m256i_op0[1]) = 0xff81001dff9dff9e; + *((unsigned long *)&__m256i_op0[0]) = 0xff81001dff9d003b; + *((unsigned long *)&__m256i_result[3]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[2]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[1]) = 0x0000001000000010; + *((unsigned long *)&__m256i_result[0]) = 0x0000001000000010; + __m256i_out = __lasx_xvsrlri_w (__m256i_op0, 0x1c); + 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_xvsrlri_w (__m256i_op0, 0x9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[2]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op0[0]) = 0x0001000100010001; + *((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_xvsrlri_b (__m256i_op0, 0x2); + 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_xvsrlri_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000fffa003e; + *((unsigned long *)&__m256i_op0[2]) = 0x00000000fffb009c; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000fffa003e; + *((unsigned long *)&__m256i_op0[0]) = 0x00000000fffb009c; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000002; + __m256i_out = __lasx_xvsrlri_d (__m256i_op0, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[2]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[1]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_op0[0]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[3]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[2]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[1]) = 0xfffffffe00000001; + *((unsigned long *)&__m256i_result[0]) = 0xfffffffe00000001; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x0); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x7fffffffffffffff; + *((unsigned long *)&__m256i_result[3]) = 0x0020004000400040; + *((unsigned long *)&__m256i_result[2]) = 0x0020004000400040; + *((unsigned long *)&__m256i_result[1]) = 0x0020004000400040; + *((unsigned long *)&__m256i_result[0]) = 0x0020004000400040; + __m256i_out = __lasx_xvsrlri_h (__m256i_op0, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000ff0000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000800000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000800000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000800000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000800000; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x7fffffffffbfffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000800000; + *((unsigned long *)&__m256i_op0[1]) = 0x7fffffffffbfffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000800000; + *((unsigned long *)&__m256i_result[3]) = 0x0102020202010202; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000010000; + *((unsigned long *)&__m256i_result[1]) = 0x0102020202010202; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000010000; + __m256i_out = __lasx_xvsrlri_b (__m256i_op0, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000006; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000006; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0008000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0008000000000000; + __m256i_out = __lasx_xvsrlri_h (__m256i_op0, 0xc); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrn.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrn.c new file mode 100644 index 000000000..cbc1de371 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrn.c @@ -0,0 +1,410 @@ +/* { 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]) = 0xfffffffff328dfff; + *((unsigned long *)&__m256i_op0[0]) = 0x6651bfff00000000; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0202020201010000; + __m256i_out = __lasx_xvsrlrn_b_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrlrn_h_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]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000000000000000; + *((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_xvsrlrn_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000050005; + *((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]) = 0x0000000000000505; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrn_b_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]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[2]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[1]) = 0x8000800080008000; + *((unsigned long *)&__m256i_op1[0]) = 0x8000800080008000; + *((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_xvsrlrn_b_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]) = 0x108659e46485f7e1; + *((unsigned long *)&__m256i_op1[2]) = 0x4df5b1a3ed5e02c1; + *((unsigned long *)&__m256i_op1[1]) = 0x108659e46485f7e1; + *((unsigned long *)&__m256i_op1[0]) = 0x4df5b1a3ed5e02c1; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x8000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x8000000000000000; + __m256i_out = __lasx_xvsrlrn_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000001a00; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000001a00; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000001a00; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000001a00; + *((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_xvsrlrn_b_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0002000200020002; + *((unsigned long *)&__m256i_op0[2]) = 0xff820002ff820002; + *((unsigned long *)&__m256i_op0[1]) = 0x0002000200020002; + *((unsigned long *)&__m256i_op0[0]) = 0xff820002ff820002; + *((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]) = 0x00020002ff820002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00020002ff820002; + __m256i_out = __lasx_xvsrlrn_w_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_xvsrlrn_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x00020421d7d41124; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x00020421d7d41124; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000f0f0f0f0; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000002; + __m256i_out = __lasx_xvsrlrn_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff0000ffff; + *((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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrn_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op0[1]) = 0x000000000000ffff; + *((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]) = 0x000000ff000000ff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000000ff000000ff; + __m256i_out = __lasx_xvsrlrn_b_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xffff000200000000; + *((unsigned long *)&__m256i_op0[1]) = 0xff00000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xffff000200000000; + *((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]) = 0x00000000ff020000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00000000ff020000; + __m256i_out = __lasx_xvsrlrn_b_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrlrn_w_d (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000001fe01fe; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000ff0100; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000001fe01fe; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000ff0100; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000000007c8; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000000007c8; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x01fe01fe0000ff01; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x01fe01fe0000ff01; + __m256i_out = __lasx_xvsrlrn_w_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff; + __m256i_out = __lasx_xvsrlrn_w_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_xvsrlrn_w_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_xvsrlrn_w_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_xvsrlrn_b_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_xvsrlrn_b_h (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[2]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[1]) = 0xf9f9f9f9f9f9f9f9; + *((unsigned long *)&__m256i_op0[0]) = 0xf9f9f9f9f9f9f9f9; + *((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]) = 0xf9f9f9f900000002; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0xf9f9f9f900000002; + __m256i_out = __lasx_xvsrlrn_w_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]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ff01; + *((unsigned long *)&__m256i_op1[1]) = 0x0000ff0100ff0000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ff01; + *((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_xvsrlrn_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000004843ffdff; + *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000004843ffdff; + *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000; + *((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]) = 0x00043fff00000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00043fff00000000; + __m256i_out = __lasx_xvsrlrn_b_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]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff; + *((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_xvsrlrn_h_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]) = 0xff1cff1b00e300e4; + *((unsigned long *)&__m256i_op1[2]) = 0xff1cff1b00e300e4; + *((unsigned long *)&__m256i_op1[1]) = 0xff1cff1b00e300e4; + *((unsigned long *)&__m256i_op1[0]) = 0xff1cff1b00e30100; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0020000000200000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x002000000020ffff; + __m256i_out = __lasx_xvsrlrn_h_w (__m256i_op0, __m256i_op1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffdbff980038ffaf; + *((unsigned long *)&__m256i_op0[2]) = 0xffafffe80004fff1; + *((unsigned long *)&__m256i_op0[1]) = 0xffdbff980038ffaf; + *((unsigned long *)&__m256i_op0[0]) = 0xffafffe80004fff1; + *((unsigned long *)&__m256i_op1[3]) = 0x0000020202020202; + *((unsigned long *)&__m256i_op1[2]) = 0x0101000000010000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000020202020202; + *((unsigned long *)&__m256i_op1[0]) = 0x0101000000010000; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x000e3fec0004fff1; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x000e3fec0004fff1; + __m256i_out = __lasx_xvsrlrn_w_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-xvsrlrni.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrni.c new file mode 100644 index 000000000..8fc7a0029 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvsrlrni.c @@ -0,0 +1,455 @@ +/* { 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]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000; + *((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]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x7a); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0100010001000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0100010001000000; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0001000100010001; + *((unsigned long *)&__m256i_op1[0]) = 0x0001000100010001; + *((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_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000808000008080; + *((unsigned long *)&__m256i_op0[2]) = 0x0000808000008081; + *((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]) = 0x0000000000000081; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x68); + 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]) = 0x00000000002a5429; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000002a5429; + *((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_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x30); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000801380f380fe; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000801380f300fb; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00000000007f3a40; + *((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_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x42); + 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_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x56); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xfff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0000000000000; + *((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]) = 0xf0000000f0000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xf0000000f0000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x0); + 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]) = 0x0020002000200020; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0020002000200020; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_h_w (__m256i_op0, __m256i_op1, 0x1b); + 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]) = 0x0404040404040404; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0404040404040404; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0xe); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[2]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op0[0]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op1[3]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op1[2]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_op1[1]) = 0x00000000000000fe; + *((unsigned long *)&__m256i_op1[0]) = 0x817f11ed81800ff0; + *((unsigned long *)&__m256i_result[3]) = 0x00000004fc480040; + *((unsigned long *)&__m256i_result[2]) = 0x00000004fc480040; + *((unsigned long *)&__m256i_result[1]) = 0x00000004fc480040; + *((unsigned long *)&__m256i_result[0]) = 0x00000004fc480040; + __m256i_out = __lasx_xvsrlrni_h_w (__m256i_op0, __m256i_op1, 0x6); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[1]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_op1[0]) = 0x000000000000ffff; + *((unsigned long *)&__m256i_result[3]) = 0x0004000404040404; + *((unsigned long *)&__m256i_result[2]) = 0x0000000400000004; + *((unsigned long *)&__m256i_result[1]) = 0x0004000400000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000400000004; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0xe); + 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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_h_w (__m256i_op0, __m256i_op1, 0xf); + 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_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x1); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x80208020c22080a7; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x80208020c22080a7; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xdf80ff20df80ff20; + *((unsigned long *)&__m256i_op1[2]) = 0xdfc2ff20df80ffa7; + *((unsigned long *)&__m256i_op1[1]) = 0xdf80ff20df80ff20; + *((unsigned long *)&__m256i_op1[0]) = 0xdfc2ff20df80ffa7; + *((unsigned long *)&__m256i_result[3]) = 0x0000840100000000; + *((unsigned long *)&__m256i_result[2]) = 0xbffebffec0febfff; + *((unsigned long *)&__m256i_result[1]) = 0x0000840100000000; + *((unsigned long *)&__m256i_result[0]) = 0xbffebffec0febfff; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0xffffc0c0ffffbfc0; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0xffffc0c0ffffbfc0; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x00003f3f0000400d; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x00003f3f0000400d; + *((unsigned long *)&__m256i_result[3]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x1000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x44); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0x1000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0x1000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffe00000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0xffffe00000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x13); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x3ff0000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfc00000000000048; + *((unsigned long *)&__m256i_op0[1]) = 0x3ff0000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfc00000000000048; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xbfffa004fffd8000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xbfffa004fffd8000; + *((unsigned long *)&__m256i_result[3]) = 0x00003f0000000000; + *((unsigned long *)&__m256i_result[2]) = 0x00002fffe8013fff; + *((unsigned long *)&__m256i_result[1]) = 0x00003f0000000000; + *((unsigned long *)&__m256i_result[0]) = 0x00002fffe8013fff; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 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_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_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x3); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000080800000808; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0x0000080800000808; + *((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]) = 0x0000101000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000101000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x1f); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0100010001000100; + *((unsigned long *)&__m256i_op0[2]) = 0xff00010001000100; + *((unsigned long *)&__m256i_op0[1]) = 0x0100010001000100; + *((unsigned long *)&__m256i_op0[0]) = 0xff00010001000100; + *((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]) = 0x0000000040004000; + *((unsigned long *)&__m256i_result[2]) = 0x0000004000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000040004000; + *((unsigned long *)&__m256i_result[0]) = 0x0000004000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x5a); + 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_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0xf); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00b2fe28e4420609; + *((unsigned long *)&__m256i_op0[2]) = 0x028da7fe15020000; + *((unsigned long *)&__m256i_op0[1]) = 0x00b2fe28e4420609; + *((unsigned long *)&__m256i_op0[0]) = 0x028da7fe15020000; + *((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]) = 0x0000000000000598; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000598; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0x6d); + 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]) = 0x0000000800000010; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000800000010; + *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000002000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000002000000; + __m256i_out = __lasx_xvsrlrni_d_q (__m256i_op0, __m256i_op1, 0xa); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x00000003ffffffff; + *((unsigned long *)&__m256i_op0[2]) = 0x0001ffffffffffff; + *((unsigned long *)&__m256i_op0[1]) = 0x00000003ffffffff; + *((unsigned long *)&__m256i_op0[0]) = 0x0001ffffffffffff; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0x000000010000005e; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0x000000010000005e; + *((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_xvsrlrni_w_d (__m256i_op0, __m256i_op1, 0x3c); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[3]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[1]) = 0xffffffff00000000; + *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[3]) = 0x0040000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0040000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0040000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0040000000000000; + __m256i_out = __lasx_xvsrlrni_w_d (__m256i_op0, __m256i_op1, 0x2a); + 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_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]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x7); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[2]) = 0xfff0fff0fff0fc00; + *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op0[0]) = 0xfff0fff0fff0fc00; + *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[2]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000; + *((unsigned long *)&__m256i_op1[0]) = 0xffffffffff000000; + *((unsigned long *)&__m256i_result[3]) = 0x00000000f880f87e; + *((unsigned long *)&__m256i_result[2]) = 0x0000000000008000; + *((unsigned long *)&__m256i_result[1]) = 0x00000000f880f87e; + *((unsigned long *)&__m256i_result[0]) = 0x0000000000008000; + __m256i_out = __lasx_xvsrlrni_h_w (__m256i_op0, __m256i_op1, 0x9); + ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out); + + *((unsigned long *)&__m256i_op0[3]) = 0x000081220000812c; + *((unsigned long *)&__m256i_op0[2]) = 0x0000812000008120; + *((unsigned long *)&__m256i_op0[1]) = 0x000081220000812c; + *((unsigned long *)&__m256i_op0[0]) = 0x0000812000008120; + *((unsigned long *)&__m256i_op1[3]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_op1[2]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_op1[1]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_op1[0]) = 0x7f7f7f7f7f7f7f7f; + *((unsigned long *)&__m256i_result[3]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[2]) = 0xfefefefefefefefe; + *((unsigned long *)&__m256i_result[1]) = 0x0005000500050005; + *((unsigned long *)&__m256i_result[0]) = 0xfefefefefefefefe; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x6); + 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]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[2]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[1]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_op1[0]) = 0x7fffffff80000000; + *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[2]) = 0xffff0000ffff0000; + *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff; + *((unsigned long *)&__m256i_result[0]) = 0xffff0000ffff0000; + __m256i_out = __lasx_xvsrlrni_b_h (__m256i_op0, __m256i_op1, 0x0); + 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