1 Star 0 Fork 139

贾超/gcc

forked from src-openEuler/gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LoongArch-Add-tests-for-ASX-vector-xvand-xvandi-xvan.patch 97.96 KB
一键复制 编辑 原始数据 按行查看 历史
ticat_fp 提交于 2024-03-26 09:26 . LoongArch: update from gcc upstream
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiachao2130/gcc.git
git@gitee.com:jiachao2130/gcc.git
jiachao2130
gcc
gcc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385