代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ceef99197d4db1d34e5c8aeae2b5492d831685d0 Mon Sep 17 00:00:00 2001
From: Xiaolong Chen <chenxiaolong@loongson.cn>
Date: Tue, 12 Sep 2023 15:42:34 +0800
Subject: [PATCH 105/124] LoongArch: Add tests for ASX vector
xvand/xvandi/xvandn/xvor/xvori/ xvnor/xvnori/xvxor/xvxori instructions.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/vector/lasx/lasx-xvand.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvandi.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvandn.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvnor.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvnori.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvor.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvori.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvorn.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvxor.c: New test.
* gcc.target/loongarch/vector/lasx/lasx-xvxori.c: New test.
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
---
.../loongarch/vector/lasx/lasx-xvand.c | 155 +++++++++++
.../loongarch/vector/lasx/lasx-xvandi.c | 196 ++++++++++++++
.../loongarch/vector/lasx/lasx-xvandn.c | 125 +++++++++
.../loongarch/vector/lasx/lasx-xvnor.c | 170 ++++++++++++
.../loongarch/vector/lasx/lasx-xvnori.c | 152 +++++++++++
.../loongarch/vector/lasx/lasx-xvor.c | 215 +++++++++++++++
.../loongarch/vector/lasx/lasx-xvori.c | 141 ++++++++++
.../loongarch/vector/lasx/lasx-xvorn.c | 245 ++++++++++++++++++
.../loongarch/vector/lasx/lasx-xvxor.c | 185 +++++++++++++
.../loongarch/vector/lasx/lasx-xvxori.c | 163 ++++++++++++
10 files changed, 1747 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvand.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandi.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandn.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnor.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnori.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvor.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvori.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvorn.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxor.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxori.c
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvand.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvand.c
new file mode 100644
index 000000000..e485786dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvand.c
@@ -0,0 +1,155 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0010001000100010;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0010001000100010;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0010001000100010;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0010001000100010;
+ *((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_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x2020202020202020;
+ *((unsigned long *)&__m256i_op0[2]) = 0x2020202020202020;
+ *((unsigned long *)&__m256i_op0[1]) = 0x2020202020202020;
+ *((unsigned long *)&__m256i_op0[0]) = 0x2020202020202020;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x000000000000ffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[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;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xfefee00000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0xfefee00000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xfffffffe00000001;
+ *((unsigned long *)&__m256i_op1[2]) = 0xfffffffe00000001;
+ *((unsigned long *)&__m256i_op1[1]) = 0xfffffffe00000001;
+ *((unsigned long *)&__m256i_op1[0]) = 0xfffffffe00000001;
+ *((unsigned long *)&__m256i_result[3]) = 0xfefee00000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0xfefee00000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x00000004843ffdff;
+ *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x00000004843ffdff;
+ *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x00000000000000ff;
+ *((unsigned long *)&__m256i_op1[3]) = 0xff1cff1cff1cff1c;
+ *((unsigned long *)&__m256i_op1[2]) = 0xff1cff1cff1cff1c;
+ *((unsigned long *)&__m256i_op1[1]) = 0xff1cff1cff1cff1c;
+ *((unsigned long *)&__m256i_op1[0]) = 0xff1cff1cff1cff1c;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x000000000000001c;
+ __m256i_out = __lasx_xvand_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandi.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandi.c
new file mode 100644
index 000000000..26cddc53a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandi.c
@@ -0,0 +1,196 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0xe2);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000505;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000101;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x19);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x001175f10e4330e8;
+ *((unsigned long *)&__m256i_op0[2]) = 0xff8f0842ff29211e;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xfffff8d9ffa7103d;
+ *((unsigned long *)&__m256i_result[3]) = 0x001151510a431048;
+ *((unsigned long *)&__m256i_result[2]) = 0x5b0b08425b09011a;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x5b5b58595b031019;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x5b);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_result[3]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_result[2]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_result[1]) = 0x0400040004000400;
+ *((unsigned long *)&__m256i_result[0]) = 0x0400040004000400;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x2d);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000002;
+ *((unsigned long *)&__m256i_op0[2]) = 0xfffffff900000003;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000002;
+ *((unsigned long *)&__m256i_op0[0]) = 0xfffffff900000003;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000002;
+ *((unsigned long *)&__m256i_result[2]) = 0x3f3f3f3900000003;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000002;
+ *((unsigned long *)&__m256i_result[0]) = 0x3f3f3f3900000003;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x3f);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xbabababababababa;
+ *((unsigned long *)&__m256i_result[2]) = 0xbabababababababa;
+ *((unsigned long *)&__m256i_result[1]) = 0xbabababababababa;
+ *((unsigned long *)&__m256i_result[0]) = 0xbabababababababa;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0xba);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xff00ffffff00ffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xff00ffffff00ffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x4040404040404040;
+ *((unsigned long *)&__m256i_result[2]) = 0x4000404040004040;
+ *((unsigned long *)&__m256i_result[1]) = 0x4040404040404040;
+ *((unsigned long *)&__m256i_result[0]) = 0x4000404040004040;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x40);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x3f);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffff3c;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffff31;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x5e5e5e5e5e5e5e1c;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x5e5e5e5e5e5e5e10;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x5e);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x86);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x7f70000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x7f70000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x7f70000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x7f70000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x7f);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0xa3);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0x98);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0xd9);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandi_b (__m256i_op0, 0xcc);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandn.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandn.c
new file mode 100644
index 000000000..bc3590c21
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvandn.c
@@ -0,0 +1,125 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x1828f0e09bad7249;
+ *((unsigned long *)&__m256i_op0[2]) = 0x07ffc1b723953cec;
+ *((unsigned long *)&__m256i_op0[1]) = 0x61f2e9b333aab104;
+ *((unsigned long *)&__m256i_op0[0]) = 0x6bf742aa0d7856a0;
+ *((unsigned long *)&__m256i_op1[3]) = 0x000019410000e69a;
+ *((unsigned long *)&__m256i_op1[2]) = 0xf259905a09c23be0;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000883a00000f20;
+ *((unsigned long *)&__m256i_op1[0]) = 0x6d3c2d3a89167aeb;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000090100008492;
+ *((unsigned long *)&__m256i_result[2]) = 0xf000104808420300;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000800000e20;
+ *((unsigned long *)&__m256i_result[0]) = 0x04082d108006284b;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0002000200020002;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xfffdfffdfffdfffd;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x1020102010201020;
+ *((unsigned long *)&__m256i_op0[2]) = 0x1020102010201020;
+ *((unsigned long *)&__m256i_op0[1]) = 0x1020102010201020;
+ *((unsigned long *)&__m256i_op0[0]) = 0x1020102010201020;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffff00000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xefdfefdf00000000;
+ *((unsigned long *)&__m256i_result[2]) = 0xefdfefdfefdfefdf;
+ *((unsigned long *)&__m256i_result[1]) = 0xefdfefdf00000000;
+ *((unsigned long *)&__m256i_result[0]) = 0xefdfefdfefdfefdf;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000008;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000008;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000008;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000008;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_op1[2]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_op1[1]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_op1[0]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_result[3]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_result[2]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_result[1]) = 0x00000000000d6d6d;
+ *((unsigned long *)&__m256i_result[0]) = 0x00000000000d6d6d;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0fff0fff0fff0fff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0fff0fff0fff0fff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000010101010101;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0101000000010000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000010101010101;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0101000000010000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000010101010101;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000010101010101;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvandn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnor.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnor.c
new file mode 100644
index 000000000..3a491ecab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnor.c
@@ -0,0 +1,170 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x00000000ffff0000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x40d74f979f99419f;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffff0000ffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xbf28b0686066be60;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000f6ff00000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000f6ff00000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xfffff6ff00000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0xfffff6ff00000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x00000900ffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x00000900ffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x8888888808888888;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0888888888888888;
+ *((unsigned long *)&__m256i_op0[1]) = 0x8888888808888888;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0888888888888888;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x77777777f7777777;
+ *((unsigned long *)&__m256i_result[2]) = 0xf777777777777777;
+ *((unsigned long *)&__m256i_result[1]) = 0x77777777f7777777;
+ *((unsigned long *)&__m256i_result[0]) = 0xf777777777777777;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x40ff40ff40ff40ff;
+ *((unsigned long *)&__m256i_op0[2]) = 0x407b40ff40ff40f1;
+ *((unsigned long *)&__m256i_op0[1]) = 0x40ff40ff40ff40ff;
+ *((unsigned long *)&__m256i_op0[0]) = 0x407b40ff40ff40f1;
+ *((unsigned long *)&__m256i_op1[3]) = 0x40ff40ff40ff40ff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x407b40ff40ff40f1;
+ *((unsigned long *)&__m256i_op1[1]) = 0x40ff40ff40ff40ff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x407b40ff40ff40f1;
+ *((unsigned long *)&__m256i_result[3]) = 0xbf00bf00bf00bf00;
+ *((unsigned long *)&__m256i_result[2]) = 0xbf84bf00bf00bf0e;
+ *((unsigned long *)&__m256i_result[1]) = 0xbf00bf00bf00bf00;
+ *((unsigned long *)&__m256i_result[0]) = 0xbf84bf00bf00bf0e;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000033;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000033;
+ *((unsigned long *)&__m256i_op1[3]) = 0x8000420080000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x5fff5fff607f0000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x8000420080000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x5fff5fff607f0000;
+ *((unsigned long *)&__m256i_result[3]) = 0x7fffbdff7fffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xa000a0009f80ffcc;
+ *((unsigned long *)&__m256i_result[1]) = 0x7fffbdff7fffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xa000a0009f80ffcc;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op0[2]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op0[1]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op0[0]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op1[3]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op1[2]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op1[1]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_op1[0]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_result[3]) = 0x6f6f6f6f6f6f6f6f;
+ *((unsigned long *)&__m256i_result[2]) = 0x6f6f6f6f6f6f6f6f;
+ *((unsigned long *)&__m256i_result[1]) = 0x6f6f6f6f6f6f6f6f;
+ *((unsigned long *)&__m256i_result[0]) = 0x6f6f6f6f6f6f6f6f;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000fffcfffcfffc;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000fffcfffcfffc;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000003fff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000003fff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000003fff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000003fff;
+ *((unsigned long *)&__m256i_result[3]) = 0xffff000300030000;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffc000;
+ *((unsigned long *)&__m256i_result[1]) = 0xffff000300030000;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffc000;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffff8000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffff8000;
+ *((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_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x800fffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0x800fffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x800fffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0x800fffffffffffff;
+ __m256i_out = __lasx_xvnor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnori.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnori.c
new file mode 100644
index 000000000..995a34c18
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvnori.c
@@ -0,0 +1,152 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000100000001;
+ *((unsigned long *)&__m256i_op0[2]) = 0x8000000080000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m256i_op0[0]) = 0x8000000080000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xc5c5c5c4c5c5c5c4;
+ *((unsigned long *)&__m256i_result[2]) = 0x45c5c5c545c5c5c5;
+ *((unsigned long *)&__m256i_result[1]) = 0xc5c5c5c4c5c5c5c4;
+ *((unsigned long *)&__m256i_result[0]) = 0x45c5c5c545c5c5c5;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x3a);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000007773;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000003373;
+ *((unsigned long *)&__m256i_result[3]) = 0xbbbbbbbbbbbbbbbb;
+ *((unsigned long *)&__m256i_result[2]) = 0xbbbbbbbbbbbb8888;
+ *((unsigned long *)&__m256i_result[1]) = 0xbbbbbbbbbbbbbbbb;
+ *((unsigned long *)&__m256i_result[0]) = 0xbbbbbbbbbbbb8888;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x44);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xf7f7f7f7f7f7f7f7;
+ *((unsigned long *)&__m256i_result[2]) = 0xf7f7f7f7f7f7f7f7;
+ *((unsigned long *)&__m256i_result[1]) = 0xf7f7f7f7f7f7f7f7;
+ *((unsigned long *)&__m256i_result[0]) = 0xf7f7f7f7f7f7f7f7;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x8);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xdededededededede;
+ *((unsigned long *)&__m256i_result[2]) = 0xdededededededede;
+ *((unsigned long *)&__m256i_result[1]) = 0xdededededededede;
+ *((unsigned long *)&__m256i_result[0]) = 0xdededededededede;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x21);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x33);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_result[2]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_result[1]) = 0x9090909090909090;
+ *((unsigned long *)&__m256i_result[0]) = 0x9090909090909090;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x6f);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0808080808080808;
+ *((unsigned long *)&__m256i_result[2]) = 0x0808080808080808;
+ *((unsigned long *)&__m256i_result[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m256i_result[0]) = 0x0808080808080808;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0xf7);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x5858585858585858;
+ *((unsigned long *)&__m256i_result[2]) = 0x5858585858585858;
+ *((unsigned long *)&__m256i_result[1]) = 0x5858585858585858;
+ *((unsigned long *)&__m256i_result[0]) = 0x5858585858585858;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0xa7);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x3d3d3d3d3d3d3d3d;
+ *((unsigned long *)&__m256i_result[2]) = 0x3d3d3d3d3d3d3d3d;
+ *((unsigned long *)&__m256i_result[1]) = 0x3d3d3d3d3d3d3d3d;
+ *((unsigned long *)&__m256i_result[0]) = 0x3d3d3d3d3d3d3d3d;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0xc2);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000010;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000010;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x9d9d9d9d9d9d9d8d;
+ *((unsigned long *)&__m256i_result[2]) = 0x9d9d9d9d9d9d9d9d;
+ *((unsigned long *)&__m256i_result[1]) = 0x9d9d9d9d9d9d9d8d;
+ *((unsigned long *)&__m256i_result[0]) = 0x9d9d9d9d9d9d9d9d;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x62);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x2a2a2a2a2a2a2a2a;
+ *((unsigned long *)&__m256i_result[2]) = 0x2a2a2a2a2a2a2a2a;
+ *((unsigned long *)&__m256i_result[1]) = 0x2a2a2a2a2a2a2a2a;
+ *((unsigned long *)&__m256i_result[0]) = 0x2a2a2a2a2a2a2a2a;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0xd5);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x000081220000812c;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000812000008120;
+ *((unsigned long *)&__m256i_op0[1]) = 0x000081220000812c;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000812000008120;
+ *((unsigned long *)&__m256i_result[3]) = 0xe9e968c9e9e968c1;
+ *((unsigned long *)&__m256i_result[2]) = 0xe9e968c9e9e968c9;
+ *((unsigned long *)&__m256i_result[1]) = 0xe9e968c9e9e968c1;
+ *((unsigned long *)&__m256i_result[0]) = 0xe9e968c9e9e968c9;
+ __m256i_out = __lasx_xvnori_b (__m256i_op0, 0x16);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvor.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvor.c
new file mode 100644
index 000000000..27eef710d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvor.c
@@ -0,0 +1,215 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x7fff01fd7fff7fff;
+ *((unsigned long *)&__m256i_op0[0]) = 0x00007fff7fff7fff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x7fff01fd7fff7fff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x00007fff7fff7fff;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m256i_result[1]) = 0x7fff01fd7fff7fff;
+ *((unsigned long *)&__m256i_result[0]) = 0x00007fff7fff7fff;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000005e02;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000005e02;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000005e02;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000005e02;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000002a54290;
+ *((unsigned long *)&__m256i_op1[2]) = 0x000000000154dc84;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000002a54290;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000089;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000002a54290;
+ *((unsigned long *)&__m256i_result[2]) = 0x000000000154dc84;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000002a54290;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000089;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x7fefffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7fefffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x7fefffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x7fefffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0x7fffffffffffffff;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x7fe37fe3001d001d;
+ *((unsigned long *)&__m256i_op0[2]) = 0x7fff7fff7fff0000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x7fe37fe3001d001d;
+ *((unsigned long *)&__m256i_op0[0]) = 0x7fff7fff7fff0000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000001e0007ffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000001e0007ffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000001e0007ffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000001e0007ffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x7fe37fff001fffff;
+ *((unsigned long *)&__m256i_result[2]) = 0x7fff7fff7fffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x7fe37fff001fffff;
+ *((unsigned long *)&__m256i_result[0]) = 0x7fff7fff7fffffff;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x003f60041f636003;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x003f60041f636003;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x003f60041f636003;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x003f60041f636003;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x003f60041f636003;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x003f60041f636003;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_op1[2]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_op1[1]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_op1[0]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_result[3]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_result[2]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_result[1]) = 0xfff1fff1fff1fff1;
+ *((unsigned long *)&__m256i_result[0]) = 0xfff1fff1fff1fff1;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000200;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000200;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000200;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000200;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000100;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000100;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000100;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_op0[2]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_op0[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_result[2]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_result[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m256i_result[0]) = 0x00ff00ff00ff00ff;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x000000ff800000ff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x000000ff800000ff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_result[3]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_result[2]) = 0x800080ff800080ff;
+ *((unsigned long *)&__m256i_result[1]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_result[0]) = 0x800080ff800080ff;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7fff80007fff0000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x7fff80007fff0000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x7fff80007fff0000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x7fff80007fff0000;
+ __m256i_out = __lasx_xvor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvori.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvori.c
new file mode 100644
index 000000000..ee91af95f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvori.c
@@ -0,0 +1,141 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0101010101010101;
+ *((unsigned long *)&__m256i_result[2]) = 0x0101010101010101;
+ *((unsigned long *)&__m256i_result[1]) = 0x0101010101010101;
+ *((unsigned long *)&__m256i_result[0]) = 0x0101010101010101;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x6c6c6c6c6c6c6c6c;
+ *((unsigned long *)&__m256i_result[2]) = 0x6c6c6c6c6c6c6c6c;
+ *((unsigned long *)&__m256i_result[1]) = 0x6c6c6c6c6c6c6c6c;
+ *((unsigned long *)&__m256i_result[0]) = 0x6c6c6c6c6c6c6c6c;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x6c);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffff00fffffff0;
+ *((unsigned long *)&__m256i_result[3]) = 0x9f9f9f9f9f9f9f9f;
+ *((unsigned long *)&__m256i_result[2]) = 0x9f9f9f9fffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x9f9f9f9f9f9f9f9f;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffff9fffffffff;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x9f);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x6a);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffbdff3cffbdff44;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffbdff3cffbdff44;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffff7effffff46;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffff7effffff46;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x42);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xbfbfbfbfbfbfbfbf;
+ *((unsigned long *)&__m256i_result[2]) = 0xbfbfbfbfbfbfbfbf;
+ *((unsigned long *)&__m256i_result[1]) = 0xbfbfbfbfbfbfbfbf;
+ *((unsigned long *)&__m256i_result[0]) = 0xbfbfbfbfbfbfbfbf;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0xbf);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x2c2c2c2c2c2c2c2c;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x2c2c2c2c2c2c2c2c;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x2c);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x5252525252525252;
+ *((unsigned long *)&__m256i_result[2]) = 0x5252525252525252;
+ *((unsigned long *)&__m256i_result[1]) = 0x5252525252525252;
+ *((unsigned long *)&__m256i_result[0]) = 0x5252525252525252;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x52);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m256i_result[3]) = 0x7fe363637fe36363;
+ *((unsigned long *)&__m256i_result[2]) = 0x7fe363637fe36363;
+ *((unsigned long *)&__m256i_result[1]) = 0x7fe363637fe36363;
+ *((unsigned long *)&__m256i_result[0]) = 0x7fe363637fe36363;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x63);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0xfefefefe3f800000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xfefefefe3f800000;
+ *((unsigned long *)&__m256i_result[3]) = 0xe0e0e0e0e0e0e0e0;
+ *((unsigned long *)&__m256i_result[2]) = 0xfefefefeffe0e0e0;
+ *((unsigned long *)&__m256i_result[1]) = 0xe0e0e0e0e0e0e0e0;
+ *((unsigned long *)&__m256i_result[0]) = 0xfefefefeffe0e0e0;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0xe0);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x6b6b6b6b6b6b6b6b;
+ *((unsigned long *)&__m256i_result[2]) = 0x6b6b6b6b6b6b6b6b;
+ *((unsigned long *)&__m256i_result[1]) = 0x6b6b6b6b6b6b6b6b;
+ *((unsigned long *)&__m256i_result[0]) = 0x6b6b6b6b6b6b6b6b;
+ __m256i_out = __lasx_xvori_b (__m256i_op0, 0x6b);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvorn.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvorn.c
new file mode 100644
index 000000000..fa6cdff31
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvorn.c
@@ -0,0 +1,245 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffff0000ffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xbf28b0686066be60;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x00000000ffff0000;
+ *((unsigned long *)&__m256i_result[0]) = 0x40d74f979f99419f;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m256i_op0[2]) = 0xfffffffefffffefc;
+ *((unsigned long *)&__m256i_op0[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m256i_op0[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x01480000052801a2;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffdcff64;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffefd;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0006000000040000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0002555500000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0006000000040000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0002555500000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xfff9fffffffbffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xfffdaaaaffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xfff9fffffffbffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xfffdaaaaffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000022;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000022;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000236200005111;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000175e0000490d;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000236200005111;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000175e0000490d;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0002000000020000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x00220021004a007e;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0002000000020000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x00220021004a007e;
+ *((unsigned long *)&__m256i_result[3]) = 0xfffdfffffffdffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffddffdeffb5ff8d;
+ *((unsigned long *)&__m256i_result[1]) = 0xfffdfffffffdffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffddffdeffb5ff8d;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000040;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000040;
+ *((unsigned long *)&__m256i_op1[3]) = 0x00ff010000ff017e;
+ *((unsigned long *)&__m256i_op1[2]) = 0x01fe01ae00ff00ff;
+ *((unsigned long *)&__m256i_op1[1]) = 0x00ff010000ff017e;
+ *((unsigned long *)&__m256i_op1[0]) = 0x01fe01ae00ff00ff;
+ *((unsigned long *)&__m256i_result[3]) = 0xff00feffff00fe81;
+ *((unsigned long *)&__m256i_result[2]) = 0xfe01fe51ff00ff40;
+ *((unsigned long *)&__m256i_result[1]) = 0xff00feffff00fe81;
+ *((unsigned long *)&__m256i_result[0]) = 0xfe01fe51ff00ff40;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffe0df9f8e;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffe0df9f8e;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0xe07de0801f20607a;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xe07de0801f20607a;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffe0df9f8f;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffffffffe0df9f8f;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x800000ff800000ff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x800000ff800000ff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x8000800080008000;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffff7fffffff7fff;
+ *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0xffff7fffffff7fff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000001;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000001;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0xdf80df80df80dfff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x8080808080808080;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffdf80dfff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x8080808080808080;
+ *((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_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x498100814843ffe1;
+ *((unsigned long *)&__m256i_op0[2]) = 0x4981008168410001;
+ *((unsigned long *)&__m256i_op0[1]) = 0x498100814843ffe1;
+ *((unsigned long *)&__m256i_op0[0]) = 0x4981008168410001;
+ *((unsigned long *)&__m256i_op1[3]) = 0x40f69fe73c26f4ee;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x40f69fe73c26f4ee;
+ *((unsigned long *)&__m256i_op1[0]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xff896099cbdbfff1;
+ *((unsigned long *)&__m256i_result[2]) = 0xc987ffffffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0xff896099cbdbfff1;
+ *((unsigned long *)&__m256i_result[0]) = 0xc987ffffffffffff;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xfffffffeffff97a1;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffdf5b000041b0;
+ *((unsigned long *)&__m256i_op1[1]) = 0xfffffffeffff97a1;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffdf5b000041b0;
+ *((unsigned long *)&__m256i_result[3]) = 0x000000010000685e;
+ *((unsigned long *)&__m256i_result[2]) = 0x000020a4ffffbe4f;
+ *((unsigned long *)&__m256i_result[1]) = 0x000000010000685e;
+ *((unsigned long *)&__m256i_result[0]) = 0x000020a4ffffbe4f;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000600000006;
+ *((unsigned long *)&__m256i_op0[2]) = 0x000000070002000a;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000600000006;
+ *((unsigned long *)&__m256i_op0[0]) = 0x000000070002000a;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0040000000000003;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000007;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0040000000000003;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000007;
+ *((unsigned long *)&__m256i_result[3]) = 0xffbffffffffffffe;
+ *((unsigned long *)&__m256i_result[2]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m256i_result[1]) = 0xffbffffffffffffe;
+ *((unsigned long *)&__m256i_result[0]) = 0xfffffffffffffffa;
+ __m256i_out = __lasx_xvorn_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxor.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxor.c
new file mode 100644
index 000000000..18b36c873
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxor.c
@@ -0,0 +1,185 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_op1[2]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_op1[1]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_op1[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_result[2]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_result[1]) = 0x7be2468acf15f39c;
+ *((unsigned long *)&__m256i_result[0]) = 0x7ff0000000000000;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0xff3eff3eff3eff3e;
+ *((unsigned long *)&__m256i_op1[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xff3eff3eff3eff3e;
+ *((unsigned long *)&__m256i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x00c100c100c100c1;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x00c100c100c100c1;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0xfffefffefffefffe;
+ *((unsigned long *)&__m256i_op1[2]) = 0xfffefffefffefffe;
+ *((unsigned long *)&__m256i_op1[1]) = 0xfffefffefffefffe;
+ *((unsigned long *)&__m256i_op1[0]) = 0xfffefffefffefffe;
+ *((unsigned long *)&__m256i_result[3]) = 0x0001000100010001;
+ *((unsigned long *)&__m256i_result[2]) = 0x0001000100010001;
+ *((unsigned long *)&__m256i_result[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m256i_result[0]) = 0x0001000100010001;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0100000001000100;
+ *((unsigned long *)&__m256i_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0100000001000100;
+ *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_result[2]) = 0x0100000001000100;
+ *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_result[0]) = 0x0100000001000100;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000f91;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000f91;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000001;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000f90;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000f90;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x6018000000000cd1;
+ *((unsigned long *)&__m256i_op0[2]) = 0x6040190d20227a78;
+ *((unsigned long *)&__m256i_op0[1]) = 0x132feeabd2d33b38;
+ *((unsigned long *)&__m256i_op0[0]) = 0x6040190d00000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[2]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x9fe7fffffffff32e;
+ *((unsigned long *)&__m256i_result[2]) = 0x6040190ddfdd8587;
+ *((unsigned long *)&__m256i_result[1]) = 0xecd011542d2cc4c7;
+ *((unsigned long *)&__m256i_result[0]) = 0x6040190dffffffff;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000101000001010;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000101000001010;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000101000001010;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000101000001010;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x00000000ffffffff;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
+ __m256i_out = __lasx_xvxor_v (__m256i_op0, __m256i_op1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxori.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxori.c
new file mode 100644
index 000000000..8fd6298f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvxori.c
@@ -0,0 +1,163 @@
+/* { dg-do run } */
+/* { dg-options "-mlasx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lasxintrin.h>
+
+int
+main ()
+{
+ __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
+ __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
+ __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
+
+ int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
+ long int long_op0, long_op1, long_op2, lont_out, lont_result;
+ long int long_int_out, long_int_result;
+ unsigned int unsigned_int_out, unsigned_int_result;
+ unsigned long int unsigned_long_int_out, unsigned_long_int_result;
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000005e02;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000005e02;
+ *((unsigned long *)&__m256i_result[3]) = 0xc2c2c2c2c2c2c2c2;
+ *((unsigned long *)&__m256i_result[2]) = 0xc2c2c2c2c2c29cc0;
+ *((unsigned long *)&__m256i_result[1]) = 0xc2c2c2c2c2c2c2c2;
+ *((unsigned long *)&__m256i_result[0]) = 0xc2c2c2c2c2c29cc0;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xc2);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x1616161616161616;
+ *((unsigned long *)&__m256i_op0[2]) = 0x161616167fffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x7ffe16167f161616;
+ *((unsigned long *)&__m256i_op0[0]) = 0x161616167fffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xc7c7c7c7c7c7c7c7;
+ *((unsigned long *)&__m256i_result[2]) = 0xc7c7c7c7ae2e2e2e;
+ *((unsigned long *)&__m256i_result[1]) = 0xae2fc7c7aec7c7c7;
+ *((unsigned long *)&__m256i_result[0]) = 0xc7c7c7c7ae2e2e2e;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xd1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x5353535353535353;
+ *((unsigned long *)&__m256i_result[2]) = 0x5353535353535353;
+ *((unsigned long *)&__m256i_result[1]) = 0x5353535353535353;
+ *((unsigned long *)&__m256i_result[0]) = 0x5353535353535353;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x53);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x6d6d6d6d6d6d6d6d;
+ *((unsigned long *)&__m256i_result[2]) = 0x6d6d6d6d6d6d6d6d;
+ *((unsigned long *)&__m256i_result[1]) = 0x6d6d6d6d6d6d6d6d;
+ *((unsigned long *)&__m256i_result[0]) = 0x6d6d6d6d6d6d6d6d;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x6d);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0x7171717171717171;
+ *((unsigned long *)&__m256i_result[2]) = 0x8e8e8e8e8e8e8e8e;
+ *((unsigned long *)&__m256i_result[1]) = 0x7171717171717171;
+ *((unsigned long *)&__m256i_result[0]) = 0x8e8e8e8e8e8e8e8e;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x71);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x7575757575757575;
+ *((unsigned long *)&__m256i_result[2]) = 0x7575757575757575;
+ *((unsigned long *)&__m256i_result[1]) = 0x7575757575757575;
+ *((unsigned long *)&__m256i_result[0]) = 0x7575757575757575;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x75);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xa4a4a4a4a4a4a4a4;
+ *((unsigned long *)&__m256i_result[2]) = 0xa4a4a4a4a4a4a4a4;
+ *((unsigned long *)&__m256i_result[1]) = 0xa4a4a4a4a4a4a4a4;
+ *((unsigned long *)&__m256i_result[0]) = 0xa4a4a4a4a4a4a4a4;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xa4);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xa1a1a1a1a1a1a1a1;
+ *((unsigned long *)&__m256i_result[2]) = 0xa1a1a1a15e5e5e5e;
+ *((unsigned long *)&__m256i_result[1]) = 0xa1a1a1a1a1a1a1a1;
+ *((unsigned long *)&__m256i_result[0]) = 0xa1a1a1a15e5e5e5e;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xa1);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m256i_result[3]) = 0x8d8d72728d8d7272;
+ *((unsigned long *)&__m256i_result[2]) = 0x8d8d72728d8d8d8d;
+ *((unsigned long *)&__m256i_result[1]) = 0x8d8d72728d8d7272;
+ *((unsigned long *)&__m256i_result[0]) = 0x8d8d72728d8d8d8d;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x8d);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_result[3]) = 0xb3b3b3b3b3b3b3b3;
+ *((unsigned long *)&__m256i_result[2]) = 0xb3b3b3b3b3b3b3b3;
+ *((unsigned long *)&__m256i_result[1]) = 0xb3b3b3b3b3b3b3b3;
+ *((unsigned long *)&__m256i_result[0]) = 0xb3b3b3b3b3b3b3b3;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x4c);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffff800000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x007f0000ff807f81;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffff800000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x007f0000ff807f81;
+ *((unsigned long *)&__m256i_result[3]) = 0x5d5d5d5d5d22a2a2;
+ *((unsigned long *)&__m256i_result[2]) = 0xa2dda2a25d22dd23;
+ *((unsigned long *)&__m256i_result[1]) = 0x5d5d5d5d5d22a2a2;
+ *((unsigned long *)&__m256i_result[0]) = 0xa2dda2a25d22dd23;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xa2);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[2]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m256i_result[3]) = 0xd3d3d3d3d3d3d3d3;
+ *((unsigned long *)&__m256i_result[2]) = 0xd3d3d3d3d3d3d3d3;
+ *((unsigned long *)&__m256i_result[1]) = 0xd3d3d3d3d3d3d3d3;
+ *((unsigned long *)&__m256i_result[0]) = 0xd3d3d3d3d3d3d3d3;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0xd3);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ *((unsigned long *)&__m256i_op0[3]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[2]) = 0xfa15fa15fa15fa14;
+ *((unsigned long *)&__m256i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m256i_op0[0]) = 0xfa15fa15fa15fa14;
+ *((unsigned long *)&__m256i_result[3]) = 0x8282828282828282;
+ *((unsigned long *)&__m256i_result[2]) = 0x8768876887688769;
+ *((unsigned long *)&__m256i_result[1]) = 0x8282828282828282;
+ *((unsigned long *)&__m256i_result[0]) = 0x8768876887688769;
+ __m256i_out = __lasx_xvxori_b (__m256i_op0, 0x7d);
+ ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
+
+ return 0;
+}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。