LoongArch: Fix lsx-vshuf.c and lasx-xvshuf_b.c tests fail on LA664 [PR112611]

Message ID 20231129031659.17376-1-xujiahao@loongson.cn
State New
Headers
Series LoongArch: Fix lsx-vshuf.c and lasx-xvshuf_b.c tests fail on LA664 [PR112611] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed

Commit Message

Jiahao Xu Nov. 29, 2023, 3:16 a.m. UTC
  For [x]vshuf instructions, if the index value in the selector exceeds 63, it triggers
undefined behavior on LA464, but not on LA664. To ensure compatibility of these two
tests on both LA464 and LA664, we have modified both tests to ensure that the index
value in the selector does not exceed 63.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c: Sure index less than 64.
	* gcc.target/loongarch/vector/lsx/lsx-vshuf.c: Ditto.
  

Comments

chenglulu Dec. 8, 2023, 8:45 a.m. UTC | #1
Pushed to r14-6316.

在 2023/11/29 上午11:16, Jiahao Xu 写道:
> For [x]vshuf instructions, if the index value in the selector exceeds 63, it triggers
> undefined behavior on LA464, but not on LA664. To ensure compatibility of these two
> tests on both LA464 and LA664, we have modified both tests to ensure that the index
> value in the selector does not exceed 63.
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c: Sure index less than 64.
> 	* gcc.target/loongarch/vector/lsx/lsx-vshuf.c: Ditto.
>
> diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
> index 641ea2315ff..03c479a085c 100644
> --- a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
> +++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
> @@ -44,9 +44,9 @@ main ()
>     *((unsigned long *)&__m256i_op1[1]) = 0xfffffefefffffefe;
>     *((unsigned long *)&__m256i_op1[0]) = 0xfffffefefffffefe;
>     *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0xfffffff8fffffff8;
> +  *((unsigned long *)&__m256i_op2[2]) = 0x3f3f3f383f3f3f38;
>     *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[0]) = 0xfffffff8fc000000;
> +  *((unsigned long *)&__m256i_op2[0]) = 0x3f3f3f383c000000;
>     *((unsigned long *)&__m256i_result[3]) = 0xfafafafafafafafa;
>     *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe;
> @@ -138,33 +138,14 @@ main ()
>     *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m256i_op2[3]) = 0x0000ffffffffffff;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000ffff0000ffff;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000ffffffffffff;
> -  *((unsigned long *)&__m256i_op2[0]) = 0x0000ffff0000ffff;
> +  *((unsigned long *)&__m256i_op2[3]) = 0x0000111111111111;
> +  *((unsigned long *)&__m256i_op2[2]) = 0x0000222200002222;
> +  *((unsigned long *)&__m256i_op2[1]) = 0x0000111111111111;
> +  *((unsigned long *)&__m256i_op2[0]) = 0x0000222200002222;
>     *((unsigned long *)&__m256i_result[3]) = 0xffff000000000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0xffff0000ffff0000;
> +  *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_result[1]) = 0xffff000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0xffff0000ffff0000;
> -  __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_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_op2[3]) = 0x000000000000ffff;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x000000000000ffff;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x000000000000ffff;
> -  *((unsigned long *)&__m256i_op2[0]) = 0x000000000000ffff;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
>     __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> @@ -177,7 +158,7 @@ main ()
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000077fff;
> +  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000032f1f;
>     *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
> @@ -187,9 +168,9 @@ main ()
>     __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffefe;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000101;
> -  *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffefe;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0011001100110011;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0011001100110011;
>     *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000101;
>     *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[2]) = 0x67eee33567eee435;
> @@ -199,35 +180,16 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op2[1]) = 0x00000000ffffffff;
>     *((unsigned long *)&__m256i_op2[0]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0022002200000000;
>     *((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_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_op0[3]) = 0xffffffff80000000;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[1]) = 0xffffffff80000000;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x001f001f00000000;
>     *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
> @@ -244,10 +206,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     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_op0[3]) = 0x0011001100110011;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0011001100110011;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0011001100110011;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0011001100110011;
>     *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
> @@ -256,17 +218,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op2[1]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op2[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;
> +  *((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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     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_op0[3]) = 0x003f003f003f003f;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x003f003f003f003f;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x003f003f003f003f;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x003f003f003f003f;
>     *((unsigned long *)&__m256i_op1[3]) = 0xefdfefdf00000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0xefdfefdfefdfefdf;
>     *((unsigned long *)&__m256i_op1[1]) = 0xefdfefdf00000000;
> @@ -275,36 +237,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op2[1]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[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;
> +  *((unsigned long *)&__m256i_result[3]) = 0xefdfefdfefdfefdf;
> +  *((unsigned long *)&__m256i_result[2]) = 0xefdfefdfefdfefdf;
> +  *((unsigned long *)&__m256i_result[1]) = 0xefdfefdfefdfefdf;
> +  *((unsigned long *)&__m256i_result[0]) = 0xefdfefdfefdfefdf;
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x7575ffff75757595;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x7575ffff7575f575;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x7575ffff75757595;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x7575ffff7575f575;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0035000000350005;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0035000000350015;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0035000000350025;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0035000000350035;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000003;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000010001;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000003;
> @@ -313,10 +256,10 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0x7575757575757575;
>     *((unsigned long *)&__m256i_op2[1]) = 0x7575757575757575;
>     *((unsigned long *)&__m256i_op2[0]) = 0x7575757575757575;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0x7575757575757575;
> +  *((unsigned long *)&__m256i_result[2]) = 0x7575757575757575;
> +  *((unsigned long *)&__m256i_result[1]) = 0x7575757575757575;
> +  *((unsigned long *)&__m256i_result[0]) = 0x7575757575757575;
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> @@ -358,29 +301,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000fffe;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000f0;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000fffe;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000f0;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000003e;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000003e;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000010;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -390,16 +314,16 @@ main ()
>     *((unsigned long *)&__m256i_op2[1]) = 0x8000000000000000;
>     *((unsigned long *)&__m256i_op2[0]) = 0x000000ffff88ff88;
>     *((unsigned long *)&__m256i_result[3]) = 0xff88ff88ff880000;
> -  *((unsigned long *)&__m256i_result[2]) = 0xff88ff88ff880000;
> +  *((unsigned long *)&__m256i_result[2]) = 0xff88ff88ff88ff88;
>     *((unsigned long *)&__m256i_result[1]) = 0xff88ff88ff880000;
> -  *((unsigned long *)&__m256i_result[0]) = 0xff88ff88ff880000;
> +  *((unsigned long *)&__m256i_result[0]) = 0xff88ff88ff88ff88;
>     __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x000000010000ffe1;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000000101001e18;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x000000010000ffe1;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0000000101001e18;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000011;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000018;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000008;
>     *((unsigned long *)&__m256i_op1[3]) = 0x98111cca98111cca;
>     *((unsigned long *)&__m256i_op1[2]) = 0x98111cca98111cca;
>     *((unsigned long *)&__m256i_op1[1]) = 0x98111cca98111cca;
> @@ -408,17 +332,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0x0000000101001e18;
>     *((unsigned long *)&__m256i_op2[1]) = 0x000000010000ffe1;
>     *((unsigned long *)&__m256i_op2[0]) = 0x0000000101001e18;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000100000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001;
>     *((unsigned long *)&__m256i_result[2]) = 0x0000000101001e18;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000;
> +  *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001;
>     *((unsigned long *)&__m256i_result[0]) = 0x0000000101001e18;
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x80008000b3e8fef1;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x80008000802ea100;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x000000010000001a;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000001100000001;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000002100000010;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x000000310000001f;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -427,17 +351,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000002;
>     *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000001;
>     *((unsigned long *)&__m256i_op2[0]) = 0x00000000012e2110;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001;
>     *((unsigned long *)&__m256i_result[2]) = 0x0000000200000000;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x012e2110012e2110;
> +  *((unsigned long *)&__m256i_result[1]) = 0x00000000012e2110;
> +  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x0000000082a54290;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x00000000028aa700;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0000000082a54290;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0000000002a54287;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0000002f00000000;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000001a00000000;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x000000010000001c;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000e0000000c;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x00000000002a542a;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -448,8 +372,8 @@ main ()
>     *((unsigned long *)&__m256i_op2[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;
> +  *((unsigned long *)&__m256i_result[1]) = 0x00000000002a542a;
> +  *((unsigned long *)&__m256i_result[0]) = 0x00000000002a542a;
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> @@ -472,10 +396,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
>     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_op0[3]) = 0x0000000100000031;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000031;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000031;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000031;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -491,10 +415,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
>     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_op0[3]) = 0x0000000200000001;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000400000003;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000600000005;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000800000007;
>     *((unsigned long *)&__m256i_op1[3]) = 0x000000007fc00000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x000000007fc00000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x000000007fc00000;
> @@ -504,7 +428,7 @@ main ()
>     *((unsigned long *)&__m256i_op2[1]) = 0xdfffffffdfffffff;
>     *((unsigned long *)&__m256i_op2[0]) = 0x8000000080000000;
>     *((unsigned long *)&__m256i_result[3]) = 0x8000000080000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000;
> +  *((unsigned long *)&__m256i_result[2]) = 0x7fc00000dfffffff;
>     *((unsigned long *)&__m256i_result[1]) = 0x8000000080000000;
>     *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000;
>     __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
> @@ -530,9 +454,9 @@ main ()
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
>     *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0001000104000200;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000030;
>     *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0001000104000200;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000001000000000;
>     *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m256i_op1[2]) = 0xffff0000ffff0000;
>     *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
> @@ -586,10 +510,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x0000fffffe01fe52;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x00000000ff01ff02;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0000fffffe01fe52;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x00000000ff01ff02;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000003;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000800000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000080008001;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000800000000000;
> @@ -598,36 +522,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0x000000000000ffff;
>     *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op2[0]) = 0x000000000000ffff;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0x0000000080008001;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x0000000080008001;
> -  __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff;
>     *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[1]) = 0x0000000080008001;
> +  *((unsigned long *)&__m256i_result[0]) = 0x0000800000000000;
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
>     *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000011;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000022;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000033;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -643,44 +548,6 @@ main ()
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[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_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
> -  *((unsigned long *)&__m256i_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]) = 0x0008000000000000;
> -  *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op1[0]) = 0x0008000000000000;
> -  *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op2[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_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
> -  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
> -
>     *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
> @@ -701,9 +568,9 @@ main ()
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
>     *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000000;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0000002000000000;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000020;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000030;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
> @@ -719,10 +586,10 @@ main ()
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0xfffeb6839ffffd80;
> -  *((unsigned long *)&__m256i_op0[2]) = 0xfffeb8649d0d6250;
> -  *((unsigned long *)&__m256i_op0[1]) = 0xfffeb6839ffffd80;
> -  *((unsigned long *)&__m256i_op0[0]) = 0xfffeb8649d0d6250;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000000a;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x000000000000001b;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000002c;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x000000000000003d;
>     *((unsigned long *)&__m256i_op1[3]) = 0xfffeb6839ffffd80;
>     *((unsigned long *)&__m256i_op1[2]) = 0xfffe97c020010001;
>     *((unsigned long *)&__m256i_op1[1]) = 0xfffeb6839ffffd80;
> @@ -731,17 +598,17 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0xfffe97c020010001;
>     *((unsigned long *)&__m256i_op2[1]) = 0xfffeb6839ffffd80;
>     *((unsigned long *)&__m256i_op2[0]) = 0xfffe97c020010001;
> -  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_result[3]) = 0xfffe97c020010001;
> +  *((unsigned long *)&__m256i_result[2]) = 0xfffeb6839ffffd80;
> +  *((unsigned long *)&__m256i_result[1]) = 0xfffe97c020010001;
> +  *((unsigned long *)&__m256i_result[0]) = 0xfffeb6839ffffd80;
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> -  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000001a;
> +  *((unsigned long *)&__m256i_op0[2]) = 0x000000000000001b;
> +  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002;
> +  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000007;
>     *((unsigned long *)&__m256i_op1[3]) = 0x0000000000010001;
>     *((unsigned long *)&__m256i_op1[2]) = 0x0000000000010001;
>     *((unsigned long *)&__m256i_op1[1]) = 0x0000000000010001;
> @@ -750,10 +617,10 @@ main ()
>     *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m256i_op2[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;
> +  *((unsigned long *)&__m256i_result[3]) = 0x0000000000010001;
> +  *((unsigned long *)&__m256i_result[2]) = 0x0000000000010001;
> +  *((unsigned long *)&__m256i_result[1]) = 0x0000000000010001;
> +  *((unsigned long *)&__m256i_result[0]) = 0x0000000000010001;
>     __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
>     ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
>   
> diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
> index 4e7fcc02b12..646935c921a 100644
> --- a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
> +++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
> @@ -21,7 +21,7 @@ main ()
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000401000001;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0001000100000004;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x00000000007f0000;
> +  *((unsigned long *)&__m128i_op2[0]) = 0x00000000003f0000;
>     *((unsigned long *)&__m128i_result[1]) = 0x0404040404040404;
>     *((unsigned long *)&__m128i_result[0]) = 0x0404040404000404;
>     __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
> @@ -32,7 +32,7 @@ main ()
>     *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
> +  *((unsigned long *)&__m128i_op2[0]) = 0x3f2f1f0f00000000;
>     *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
>     __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
> @@ -64,10 +64,10 @@ main ()
>     *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m128i_op1[1]) = 0x52525252adadadad;
>     *((unsigned long *)&__m128i_op1[0]) = 0x52525252adadadad;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x800000007fffffff;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x800000007fffffff;
> -  *((unsigned long *)&__m128i_result[1]) = 0x00adadad00000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x00adadad00000000;
> +  *((unsigned long *)&__m128i_op2[1]) = 0x2000000004030201;
> +  *((unsigned long *)&__m128i_op2[0]) = 0x2000000014131211;
> +  *((unsigned long *)&__m128i_result[1]) = 0xadadadad52adadad;
> +  *((unsigned long *)&__m128i_result[0]) = 0xadadadadffffffff;
>     __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> @@ -97,10 +97,10 @@ main ()
>     *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000100;
>     *((unsigned long *)&__m128i_op1[1]) = 0x04040403fafafafc;
>     *((unsigned long *)&__m128i_op1[0]) = 0x000000000000ff80;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x8080808080808080;
> -  *((unsigned long *)&__m128i_result[0]) = 0x8080808080808080;
> +  *((unsigned long *)&__m128i_op2[1]) = 0x00101a1b1c1d1e1f;
> +  *((unsigned long *)&__m128i_op2[0]) = 0x0807060504030201;
> +  *((unsigned long *)&__m128i_result[1]) = 0x8000020202000000;
> +  *((unsigned long *)&__m128i_result[0]) = 0xfc000000000000ff;
>     __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> @@ -119,10 +119,10 @@ main ()
>     *((unsigned long *)&__m128i_op0[0]) = 0xffd7ff8dffa4ff7a;
>     *((unsigned long *)&__m128i_op1[1]) = 0x34947b4b11684f92;
>     *((unsigned long *)&__m128i_op1[0]) = 0xee297a731e5c5f86;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x7fffffffffffffff;
> -  *((unsigned long *)&__m128i_op2[0]) = 0xffc0000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000868686868686;
> +  *((unsigned long *)&__m128i_op2[1]) = 0x1f0710301a2b332d;
> +  *((unsigned long *)&__m128i_op2[0]) = 0x1f20000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0xffee7a7a9811ff7b;
> +  *((unsigned long *)&__m128i_result[0]) = 0xff86868686868686;
>     __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> @@ -137,19 +137,19 @@ main ()
>     __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x001f002f003f000f;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x001f002f003f000f;
>     *((unsigned long *)&__m128i_op1[1]) = 0x7fffffffffffffff;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0x7fff7fff7fff7fff;
> +  *((unsigned long *)&__m128i_result[0]) = 0x7fff7fff7fff7fff;
>     __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x000100040010001f;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0002000300110012;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x000000002bfd9461;
>     *((unsigned long *)&__m128i_op2[1]) = 0x00007fff00007fff;
> @@ -170,74 +170,41 @@ main ()
>     __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> -  __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
> -  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
> -
> -  *((unsigned long *)&__m128i_op0[1]) = 0x000300037ff000ff;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0003000300a10003;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x000300030000001f;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0003000300000003;
>     *((unsigned long *)&__m128i_op1[1]) = 0x000300037ff000ff;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0003000300a10003;
>     *((unsigned long *)&__m128i_op2[1]) = 0x000000007ff000ff;
>     *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000003;
>     *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
>     __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0909000009090000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0909000009090000;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0019000000090000;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0019000000090000;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0909000009090000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0909000009090000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x002a05a2f059094a;
>     *((unsigned long *)&__m128i_op2[0]) = 0x05ad3ba576eae048;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0909e0480909e048;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0909e0480909e048;
> -  __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
> -  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
> -
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0x909e0480909e048;
> +  *((unsigned long *)&__m128i_result[0]) = 0x909e0480909e048;
>     __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x00000000000000c0;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x00000001ffffff29;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000030;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000029;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x00000000000000c0;
>     *((unsigned long *)&__m128i_op2[0]) = 0x00000001ffffff29;
> -  *((unsigned long *)&__m128i_result[1]) = 0xffffff2900000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0xffffff29ffffff29;
>     *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
>     *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> -  __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
> -  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
> -
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x00000000000000ff;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001f;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x1f54e0ab00000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0101010101010101;
> @@ -247,19 +214,8 @@ main ()
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> -  __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
> -  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
> -
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000007fff;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000002f0000002f;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000001000000000;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000020000020;
> @@ -280,30 +236,30 @@ main ()
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000004870ba0;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000900000010;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000003;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000001000000010;
>     *((unsigned long *)&__m128i_op2[1]) = 0x8000000100000000;
>     *((unsigned long *)&__m128i_op2[0]) = 0x8000000000000103;
>     *((unsigned long *)&__m128i_result[1]) = 0x0000010300000103;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000010300000000;
> +  *((unsigned long *)&__m128i_result[0]) = 0x0000010380000001;
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x000000ff0000857a;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x05fafe0101fe000e;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000001000000007;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000001;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
>     *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0xffffffff00000000;
> +  *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0xada4808924882588;
> -  *((unsigned long *)&__m128i_op0[0]) = 0xacad25090caca5a4;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000001a0000001b;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000a0000000b;
>     *((unsigned long *)&__m128i_op1[1]) = 0x021b7d24c9678a35;
>     *((unsigned long *)&__m128i_op1[0]) = 0x030298a6a1030a49;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> @@ -313,8 +269,8 @@ main ()
>     __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffffff;
> -  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000003;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000013;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> @@ -324,14 +280,14 @@ main ()
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0xdfa6e0c6d46cdc13;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x21fc7081ec69b5f2;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000011;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x000000002c002400;
>     *((unsigned long *)&__m128i_op2[1]) = 0xffffb96bffff57c9;
>     *((unsigned long *)&__m128i_op2[0]) = 0xffff6080ffff4417;
> -  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0xffffb96bffff57c9;
> +  *((unsigned long *)&__m128i_result[0]) = 0xffffb96bffff57c9;
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> @@ -346,8 +302,8 @@ main ()
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000020;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000010;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000002000;
>     *((unsigned long *)&__m128i_op1[0]) = 0xf0003000f0003000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
> @@ -357,30 +313,30 @@ main ()
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x021b7d2449678a35;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x030298a621030a49;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000007;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001a;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x7fff7fff7fff7fff;
>     *((unsigned long *)&__m128i_op2[1]) = 0x021b7d24c9678a35;
>     *((unsigned long *)&__m128i_op2[0]) = 0x030298a6a1030a49;
> -  *((unsigned long *)&__m128i_result[1]) = 0x021b7d24c9678a35;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[0]) = 0x7fff7fff7fff7fff;
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0x7f7f00007f7f0000;
> -  *((unsigned long *)&__m128i_op0[0]) = 0x7f7f80807f7f8080;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000002;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000fffe0000fffe;
>     *((unsigned long *)&__m128i_op2[1]) = 0x7f8000007f800000;
>     *((unsigned long *)&__m128i_op2[0]) = 0x7f8000007f800000;
> -  *((unsigned long *)&__m128i_result[1]) = 0x7f8000007f800000;
> -  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
> +  *((unsigned long *)&__m128i_result[1]) = 0x0000fffe0000fffe;
> +  *((unsigned long *)&__m128i_result[0]) = 0x7f8000007f800000;
>     __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
>     ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
>   
> -  *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
> -  *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffff10000;
> +  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000010;
> +  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000020;
>     *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
>     *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
  

Patch

diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
index 641ea2315ff..03c479a085c 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c
@@ -44,9 +44,9 @@  main ()
   *((unsigned long *)&__m256i_op1[1]) = 0xfffffefefffffefe;
   *((unsigned long *)&__m256i_op1[0]) = 0xfffffefefffffefe;
   *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0xfffffff8fffffff8;
+  *((unsigned long *)&__m256i_op2[2]) = 0x3f3f3f383f3f3f38;
   *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[0]) = 0xfffffff8fc000000;
+  *((unsigned long *)&__m256i_op2[0]) = 0x3f3f3f383c000000;
   *((unsigned long *)&__m256i_result[3]) = 0xfafafafafafafafa;
   *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_result[1]) = 0xfefefefefefefefe;
@@ -138,33 +138,14 @@  main ()
   *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m256i_op2[3]) = 0x0000ffffffffffff;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000ffff0000ffff;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000ffffffffffff;
-  *((unsigned long *)&__m256i_op2[0]) = 0x0000ffff0000ffff;
+  *((unsigned long *)&__m256i_op2[3]) = 0x0000111111111111;
+  *((unsigned long *)&__m256i_op2[2]) = 0x0000222200002222;
+  *((unsigned long *)&__m256i_op2[1]) = 0x0000111111111111;
+  *((unsigned long *)&__m256i_op2[0]) = 0x0000222200002222;
   *((unsigned long *)&__m256i_result[3]) = 0xffff000000000000;
-  *((unsigned long *)&__m256i_result[2]) = 0xffff0000ffff0000;
+  *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_result[1]) = 0xffff000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0xffff0000ffff0000;
-  __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_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_op2[3]) = 0x000000000000ffff;
-  *((unsigned long *)&__m256i_op2[2]) = 0x000000000000ffff;
-  *((unsigned long *)&__m256i_op2[1]) = 0x000000000000ffff;
-  *((unsigned long *)&__m256i_op2[0]) = 0x000000000000ffff;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
   __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
@@ -177,7 +158,7 @@  main ()
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000077fff;
+  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000032f1f;
   *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
@@ -187,9 +168,9 @@  main ()
   __m256i_out = __lasx_xvshuf_b (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffefe;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000101;
-  *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffefe;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0011001100110011;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0011001100110011;
   *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000101;
   *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[2]) = 0x67eee33567eee435;
@@ -199,35 +180,16 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op2[1]) = 0x00000000ffffffff;
   *((unsigned long *)&__m256i_op2[0]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0022002200000000;
   *((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_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_op0[3]) = 0xffffffff80000000;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[1]) = 0xffffffff80000000;
+  *((unsigned long *)&__m256i_op0[1]) = 0x001f001f00000000;
   *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
@@ -244,10 +206,10 @@  main ()
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   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_op0[3]) = 0x0011001100110011;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0011001100110011;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0011001100110011;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0011001100110011;
   *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
@@ -256,17 +218,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op2[1]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op2[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;
+  *((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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   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_op0[3]) = 0x003f003f003f003f;
+  *((unsigned long *)&__m256i_op0[2]) = 0x003f003f003f003f;
+  *((unsigned long *)&__m256i_op0[1]) = 0x003f003f003f003f;
+  *((unsigned long *)&__m256i_op0[0]) = 0x003f003f003f003f;
   *((unsigned long *)&__m256i_op1[3]) = 0xefdfefdf00000000;
   *((unsigned long *)&__m256i_op1[2]) = 0xefdfefdfefdfefdf;
   *((unsigned long *)&__m256i_op1[1]) = 0xefdfefdf00000000;
@@ -275,36 +237,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op2[1]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[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;
+  *((unsigned long *)&__m256i_result[3]) = 0xefdfefdfefdfefdf;
+  *((unsigned long *)&__m256i_result[2]) = 0xefdfefdfefdfefdf;
+  *((unsigned long *)&__m256i_result[1]) = 0xefdfefdfefdfefdf;
+  *((unsigned long *)&__m256i_result[0]) = 0xefdfefdfefdfefdf;
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x7575ffff75757595;
-  *((unsigned long *)&__m256i_op0[2]) = 0x7575ffff7575f575;
-  *((unsigned long *)&__m256i_op0[1]) = 0x7575ffff75757595;
-  *((unsigned long *)&__m256i_op0[0]) = 0x7575ffff7575f575;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0035000000350005;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0035000000350015;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0035000000350025;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0035000000350035;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000003;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000010001;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000003;
@@ -313,10 +256,10 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0x7575757575757575;
   *((unsigned long *)&__m256i_op2[1]) = 0x7575757575757575;
   *((unsigned long *)&__m256i_op2[0]) = 0x7575757575757575;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[3]) = 0x7575757575757575;
+  *((unsigned long *)&__m256i_result[2]) = 0x7575757575757575;
+  *((unsigned long *)&__m256i_result[1]) = 0x7575757575757575;
+  *((unsigned long *)&__m256i_result[0]) = 0x7575757575757575;
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
@@ -358,29 +301,10 @@  main ()
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[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_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000fffe;
-  *((unsigned long *)&__m256i_op0[2]) = 0x00000000000000f0;
-  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000fffe;
-  *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000f0;
+  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000003e;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010;
+  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000003e;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000010;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -390,16 +314,16 @@  main ()
   *((unsigned long *)&__m256i_op2[1]) = 0x8000000000000000;
   *((unsigned long *)&__m256i_op2[0]) = 0x000000ffff88ff88;
   *((unsigned long *)&__m256i_result[3]) = 0xff88ff88ff880000;
-  *((unsigned long *)&__m256i_result[2]) = 0xff88ff88ff880000;
+  *((unsigned long *)&__m256i_result[2]) = 0xff88ff88ff88ff88;
   *((unsigned long *)&__m256i_result[1]) = 0xff88ff88ff880000;
-  *((unsigned long *)&__m256i_result[0]) = 0xff88ff88ff880000;
+  *((unsigned long *)&__m256i_result[0]) = 0xff88ff88ff88ff88;
   __m256i_out = __lasx_xvshuf_h (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x000000010000ffe1;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000000101001e18;
-  *((unsigned long *)&__m256i_op0[1]) = 0x000000010000ffe1;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0000000101001e18;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000011;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000018;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000008;
   *((unsigned long *)&__m256i_op1[3]) = 0x98111cca98111cca;
   *((unsigned long *)&__m256i_op1[2]) = 0x98111cca98111cca;
   *((unsigned long *)&__m256i_op1[1]) = 0x98111cca98111cca;
@@ -408,17 +332,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0x0000000101001e18;
   *((unsigned long *)&__m256i_op2[1]) = 0x000000010000ffe1;
   *((unsigned long *)&__m256i_op2[0]) = 0x0000000101001e18;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000100000000;
+  *((unsigned long *)&__m256i_result[3]) = 0x0000000100000001;
   *((unsigned long *)&__m256i_result[2]) = 0x0000000101001e18;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000100000000;
+  *((unsigned long *)&__m256i_result[1]) = 0x0000000100000001;
   *((unsigned long *)&__m256i_result[0]) = 0x0000000101001e18;
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x0001000100010001;
-  *((unsigned long *)&__m256i_op0[2]) = 0x80008000b3e8fef1;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0001000100010001;
-  *((unsigned long *)&__m256i_op0[0]) = 0x80008000802ea100;
+  *((unsigned long *)&__m256i_op0[3]) = 0x000000010000001a;  
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000001100000001;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000002100000010; 
+  *((unsigned long *)&__m256i_op0[0]) = 0x000000310000001f;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -427,17 +351,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000002;
   *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000001;
   *((unsigned long *)&__m256i_op2[0]) = 0x00000000012e2110;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000001;
   *((unsigned long *)&__m256i_result[2]) = 0x0000000200000000;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x012e2110012e2110;
+  *((unsigned long *)&__m256i_result[1]) = 0x00000000012e2110;
+  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x0000000082a54290;
-  *((unsigned long *)&__m256i_op0[2]) = 0x00000000028aa700;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0000000082a54290;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0000000002a54287;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0000002f00000000;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000001a00000000;
+  *((unsigned long *)&__m256i_op0[1]) = 0x000000010000001c;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000e0000000c;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x00000000002a542a;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -448,8 +372,8 @@  main ()
   *((unsigned long *)&__m256i_op2[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;
+  *((unsigned long *)&__m256i_result[1]) = 0x00000000002a542a;
+  *((unsigned long *)&__m256i_result[0]) = 0x00000000002a542a;
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
@@ -472,10 +396,10 @@  main ()
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
   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_op0[3]) = 0x0000000100000031;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000100000031;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000031;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000100000031;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -491,10 +415,10 @@  main ()
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
   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_op0[3]) = 0x0000000200000001;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000400000003;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000600000005;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000800000007;
   *((unsigned long *)&__m256i_op1[3]) = 0x000000007fc00000;
   *((unsigned long *)&__m256i_op1[2]) = 0x000000007fc00000;
   *((unsigned long *)&__m256i_op1[1]) = 0x000000007fc00000;
@@ -504,7 +428,7 @@  main ()
   *((unsigned long *)&__m256i_op2[1]) = 0xdfffffffdfffffff;
   *((unsigned long *)&__m256i_op2[0]) = 0x8000000080000000;
   *((unsigned long *)&__m256i_result[3]) = 0x8000000080000000;
-  *((unsigned long *)&__m256i_result[2]) = 0x8000000080000000;
+  *((unsigned long *)&__m256i_result[2]) = 0x7fc00000dfffffff;
   *((unsigned long *)&__m256i_result[1]) = 0x8000000080000000;
   *((unsigned long *)&__m256i_result[0]) = 0x8000000080000000;
   __m256i_out = __lasx_xvshuf_w (__m256i_op0, __m256i_op1, __m256i_op2);
@@ -530,9 +454,9 @@  main ()
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0001000104000200;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000030;
   *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0001000104000200;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000001000000000;
   *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
   *((unsigned long *)&__m256i_op1[2]) = 0xffff0000ffff0000;
   *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
@@ -586,10 +510,10 @@  main ()
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x0000fffffe01fe52;
-  *((unsigned long *)&__m256i_op0[2]) = 0x00000000ff01ff02;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0000fffffe01fe52;
-  *((unsigned long *)&__m256i_op0[0]) = 0x00000000ff01ff02;
+  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000003;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000800000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000080008001;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000800000000000;
@@ -598,36 +522,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0x000000000000ffff;
   *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op2[0]) = 0x000000000000ffff;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[2]) = 0x0000000080008001;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x0000000080008001;
-  __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[3]) = 0x000000000000ffff;
   *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[1]) = 0x0000000080008001;
+  *((unsigned long *)&__m256i_result[0]) = 0x0000800000000000;
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000011;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000022;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000033;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -643,44 +548,6 @@  main ()
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_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_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[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_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
-  *((unsigned long *)&__m256i_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]) = 0x0008000000000000;
-  *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op1[0]) = 0x0008000000000000;
-  *((unsigned long *)&__m256i_op2[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op2[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_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
-  ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
-
   *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
@@ -701,9 +568,9 @@  main ()
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000002000000000;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0000002000000000;
+  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000010;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000020;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000030;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
@@ -719,10 +586,10 @@  main ()
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0xfffeb6839ffffd80;
-  *((unsigned long *)&__m256i_op0[2]) = 0xfffeb8649d0d6250;
-  *((unsigned long *)&__m256i_op0[1]) = 0xfffeb6839ffffd80;
-  *((unsigned long *)&__m256i_op0[0]) = 0xfffeb8649d0d6250;
+  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000000a;
+  *((unsigned long *)&__m256i_op0[2]) = 0x000000000000001b;
+  *((unsigned long *)&__m256i_op0[1]) = 0x000000000000002c;
+  *((unsigned long *)&__m256i_op0[0]) = 0x000000000000003d;
   *((unsigned long *)&__m256i_op1[3]) = 0xfffeb6839ffffd80;
   *((unsigned long *)&__m256i_op1[2]) = 0xfffe97c020010001;
   *((unsigned long *)&__m256i_op1[1]) = 0xfffeb6839ffffd80;
@@ -731,17 +598,17 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0xfffe97c020010001;
   *((unsigned long *)&__m256i_op2[1]) = 0xfffeb6839ffffd80;
   *((unsigned long *)&__m256i_op2[0]) = 0xfffe97c020010001;
-  *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_result[3]) = 0xfffe97c020010001;
+  *((unsigned long *)&__m256i_result[2]) = 0xfffeb6839ffffd80;
+  *((unsigned long *)&__m256i_result[1]) = 0xfffe97c020010001;
+  *((unsigned long *)&__m256i_result[0]) = 0xfffeb6839ffffd80;
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
-  *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m256i_op0[3]) = 0x000000000000001a;
+  *((unsigned long *)&__m256i_op0[2]) = 0x000000000000001b;
+  *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002;
+  *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000007;
   *((unsigned long *)&__m256i_op1[3]) = 0x0000000000010001;
   *((unsigned long *)&__m256i_op1[2]) = 0x0000000000010001;
   *((unsigned long *)&__m256i_op1[1]) = 0x0000000000010001;
@@ -750,10 +617,10 @@  main ()
   *((unsigned long *)&__m256i_op2[2]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op2[1]) = 0x0000000000000000;
   *((unsigned long *)&__m256i_op2[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;
+  *((unsigned long *)&__m256i_result[3]) = 0x0000000000010001;
+  *((unsigned long *)&__m256i_result[2]) = 0x0000000000010001;
+  *((unsigned long *)&__m256i_result[1]) = 0x0000000000010001;
+  *((unsigned long *)&__m256i_result[0]) = 0x0000000000010001;
   __m256i_out = __lasx_xvshuf_d (__m256i_op0, __m256i_op1, __m256i_op2);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
index 4e7fcc02b12..646935c921a 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vshuf.c
@@ -21,7 +21,7 @@  main ()
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000401000001;
   *((unsigned long *)&__m128i_op1[0]) = 0x0001000100000004;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x00000000007f0000;
+  *((unsigned long *)&__m128i_op2[0]) = 0x00000000003f0000;
   *((unsigned long *)&__m128i_result[1]) = 0x0404040404040404;
   *((unsigned long *)&__m128i_result[0]) = 0x0404040404000404;
   __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
@@ -32,7 +32,7 @@  main ()
   *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
+  *((unsigned long *)&__m128i_op2[0]) = 0x3f2f1f0f00000000;
   *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
   __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
@@ -64,10 +64,10 @@  main ()
   *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
   *((unsigned long *)&__m128i_op1[1]) = 0x52525252adadadad;
   *((unsigned long *)&__m128i_op1[0]) = 0x52525252adadadad;
-  *((unsigned long *)&__m128i_op2[1]) = 0x800000007fffffff;
-  *((unsigned long *)&__m128i_op2[0]) = 0x800000007fffffff;
-  *((unsigned long *)&__m128i_result[1]) = 0x00adadad00000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x00adadad00000000;
+  *((unsigned long *)&__m128i_op2[1]) = 0x2000000004030201;
+  *((unsigned long *)&__m128i_op2[0]) = 0x2000000014131211;
+  *((unsigned long *)&__m128i_result[1]) = 0xadadadad52adadad;
+  *((unsigned long *)&__m128i_result[0]) = 0xadadadadffffffff;
   __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
@@ -97,10 +97,10 @@  main ()
   *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000100;
   *((unsigned long *)&__m128i_op1[1]) = 0x04040403fafafafc;
   *((unsigned long *)&__m128i_op1[0]) = 0x000000000000ff80;
-  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x8080808080808080;
-  *((unsigned long *)&__m128i_result[0]) = 0x8080808080808080;
+  *((unsigned long *)&__m128i_op2[1]) = 0x00101a1b1c1d1e1f;
+  *((unsigned long *)&__m128i_op2[0]) = 0x0807060504030201;
+  *((unsigned long *)&__m128i_result[1]) = 0x8000020202000000;
+  *((unsigned long *)&__m128i_result[0]) = 0xfc000000000000ff;
   __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
@@ -119,10 +119,10 @@  main ()
   *((unsigned long *)&__m128i_op0[0]) = 0xffd7ff8dffa4ff7a;
   *((unsigned long *)&__m128i_op1[1]) = 0x34947b4b11684f92;
   *((unsigned long *)&__m128i_op1[0]) = 0xee297a731e5c5f86;
-  *((unsigned long *)&__m128i_op2[1]) = 0x7fffffffffffffff;
-  *((unsigned long *)&__m128i_op2[0]) = 0xffc0000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000868686868686;
+  *((unsigned long *)&__m128i_op2[1]) = 0x1f0710301a2b332d;
+  *((unsigned long *)&__m128i_op2[0]) = 0x1f20000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0xffee7a7a9811ff7b;
+  *((unsigned long *)&__m128i_result[0]) = 0xff86868686868686;
   __m128i_out = __lsx_vshuf_b (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
@@ -137,19 +137,19 @@  main ()
   __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+  *((unsigned long *)&__m128i_op0[1]) = 0x001f002f003f000f;
+  *((unsigned long *)&__m128i_op0[0]) = 0x001f002f003f000f;
   *((unsigned long *)&__m128i_op1[1]) = 0x7fffffffffffffff;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0x7fff7fff7fff7fff;
+  *((unsigned long *)&__m128i_result[0]) = 0x7fff7fff7fff7fff;
   __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_op0[1]) = 0x000100040010001f;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0002000300110012;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x000000002bfd9461;
   *((unsigned long *)&__m128i_op2[1]) = 0x00007fff00007fff;
@@ -170,74 +170,41 @@  main ()
   __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
-  __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
-  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
-
-  *((unsigned long *)&__m128i_op0[1]) = 0x000300037ff000ff;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0003000300a10003;
+  *((unsigned long *)&__m128i_op0[1]) = 0x000300030000001f;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0003000300000003;
   *((unsigned long *)&__m128i_op1[1]) = 0x000300037ff000ff;
   *((unsigned long *)&__m128i_op1[0]) = 0x0003000300a10003;
   *((unsigned long *)&__m128i_op2[1]) = 0x000000007ff000ff;
   *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000003;
   *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
   __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0909000009090000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0909000009090000;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0019000000090000;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0019000000090000;
   *((unsigned long *)&__m128i_op1[1]) = 0x0909000009090000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0909000009090000;
   *((unsigned long *)&__m128i_op2[1]) = 0x002a05a2f059094a;
   *((unsigned long *)&__m128i_op2[0]) = 0x05ad3ba576eae048;
-  *((unsigned long *)&__m128i_result[1]) = 0x0909e0480909e048;
-  *((unsigned long *)&__m128i_result[0]) = 0x0909e0480909e048;
-  __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
-  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
-
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0x909e0480909e048;
+  *((unsigned long *)&__m128i_result[0]) = 0x909e0480909e048;
   __m128i_out = __lsx_vshuf_h (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x00000000000000c0;
-  *((unsigned long *)&__m128i_op0[0]) = 0x00000001ffffff29;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000030;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000029;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x00000000000000c0;
   *((unsigned long *)&__m128i_op2[0]) = 0x00000001ffffff29;
-  *((unsigned long *)&__m128i_result[1]) = 0xffffff2900000000;
+  *((unsigned long *)&__m128i_result[1]) = 0xffffff29ffffff29;
   *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
   *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
-  __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
-  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
-
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x00000000000000ff;
+  *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001f;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x1f54e0ab00000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0101010101010101;
@@ -247,19 +214,8 @@  main ()
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
-  __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
-  ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
-
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000007fff;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000002f0000002f;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000001000000000;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000020000020;
@@ -280,30 +236,30 @@  main ()
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000004870ba0;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000900000010;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000003;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000001000000010;
   *((unsigned long *)&__m128i_op2[1]) = 0x8000000100000000;
   *((unsigned long *)&__m128i_op2[0]) = 0x8000000000000103;
   *((unsigned long *)&__m128i_result[1]) = 0x0000010300000103;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000010300000000;
+  *((unsigned long *)&__m128i_result[0]) = 0x0000010380000001;
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x000000ff0000857a;
-  *((unsigned long *)&__m128i_op0[0]) = 0x05fafe0101fe000e;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000001000000007;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000001;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
   *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
   *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0xffffffff00000000;
+  *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0xada4808924882588;
-  *((unsigned long *)&__m128i_op0[0]) = 0xacad25090caca5a4;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000001a0000001b;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000a0000000b;
   *((unsigned long *)&__m128i_op1[1]) = 0x021b7d24c9678a35;
   *((unsigned long *)&__m128i_op1[0]) = 0x030298a6a1030a49;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
@@ -313,8 +269,8 @@  main ()
   __m128i_out = __lsx_vshuf_w (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffffff;
-  *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000003;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000013;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
@@ -324,14 +280,14 @@  main ()
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0xdfa6e0c6d46cdc13;
-  *((unsigned long *)&__m128i_op0[0]) = 0x21fc7081ec69b5f2;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000011;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x000000002c002400;
   *((unsigned long *)&__m128i_op2[1]) = 0xffffb96bffff57c9;
   *((unsigned long *)&__m128i_op2[0]) = 0xffff6080ffff4417;
-  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0xffffb96bffff57c9;
+  *((unsigned long *)&__m128i_result[0]) = 0xffffb96bffff57c9;
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
@@ -346,8 +302,8 @@  main ()
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000020;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000010;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000002000;
   *((unsigned long *)&__m128i_op1[0]) = 0xf0003000f0003000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
@@ -357,30 +313,30 @@  main ()
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x021b7d2449678a35;
-  *((unsigned long *)&__m128i_op0[0]) = 0x030298a621030a49;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000007;
+  *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001a;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x7fff7fff7fff7fff;
   *((unsigned long *)&__m128i_op2[1]) = 0x021b7d24c9678a35;
   *((unsigned long *)&__m128i_op2[0]) = 0x030298a6a1030a49;
-  *((unsigned long *)&__m128i_result[1]) = 0x021b7d24c9678a35;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[0]) = 0x7fff7fff7fff7fff;
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0x7f7f00007f7f0000;
-  *((unsigned long *)&__m128i_op0[0]) = 0x7f7f80807f7f8080;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000002;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000fffe0000fffe;
   *((unsigned long *)&__m128i_op2[1]) = 0x7f8000007f800000;
   *((unsigned long *)&__m128i_op2[0]) = 0x7f8000007f800000;
-  *((unsigned long *)&__m128i_result[1]) = 0x7f8000007f800000;
-  *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+  *((unsigned long *)&__m128i_result[1]) = 0x0000fffe0000fffe;
+  *((unsigned long *)&__m128i_result[0]) = 0x7f8000007f800000;
   __m128i_out = __lsx_vshuf_d (__m128i_op0, __m128i_op1, __m128i_op2);
   ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
 
-  *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
-  *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffff10000;
+  *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000010;
+  *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000020;
   *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
   *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;