加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LoongArch-Add-tests-for-SX-vector-addition-instructi.patch 382.79 KB
一键复制 编辑 原始数据 按行查看 历史
ticat_fp 提交于 2024-03-26 09:26 . LoongArch: update from gcc upstream
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181
From 2cb3122527add8fee54dca91824d82a02d5602e3 Mon Sep 17 00:00:00 2001
From: Xiaolong Chen <chenxiaolong@loongson.cn>
Date: Mon, 11 Sep 2023 09:58:48 +0800
Subject: [PATCH 080/124] LoongArch: Add tests for SX vector addition
instructions.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/vector/lsx/lsx-vadd.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vadda.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddi.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwev-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwev-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwev-3.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwod-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwod-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vaddwod-3.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vhaddw-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vhaddw-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmadd.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwev-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwev-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwev-3.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwod-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwod-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vmaddwod-3.c: New test.
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
---
.../loongarch/vector/lsx/lsx-vadd.c | 416 +++++++++++++++
.../loongarch/vector/lsx/lsx-vadda.c | 344 ++++++++++++
.../loongarch/vector/lsx/lsx-vaddi.c | 251 +++++++++
.../loongarch/vector/lsx/lsx-vaddwev-1.c | 335 ++++++++++++
.../loongarch/vector/lsx/lsx-vaddwev-2.c | 344 ++++++++++++
.../loongarch/vector/lsx/lsx-vaddwev-3.c | 425 +++++++++++++++
.../loongarch/vector/lsx/lsx-vaddwod-1.c | 408 +++++++++++++++
.../loongarch/vector/lsx/lsx-vaddwod-2.c | 344 ++++++++++++
.../loongarch/vector/lsx/lsx-vaddwod-3.c | 237 +++++++++
.../loongarch/vector/lsx/lsx-vhaddw-1.c | 488 ++++++++++++++++++
.../loongarch/vector/lsx/lsx-vhaddw-2.c | 452 ++++++++++++++++
.../loongarch/vector/lsx/lsx-vmadd.c | 450 ++++++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwev-1.c | 472 +++++++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwev-2.c | 383 ++++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwev-3.c | 383 ++++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwod-1.c | 372 +++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwod-2.c | 438 ++++++++++++++++
.../loongarch/vector/lsx/lsx-vmaddwod-3.c | 460 +++++++++++++++++
18 files changed, 7002 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadd.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadda.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddi.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-3.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-3.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmadd.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-3.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-3.c
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadd.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadd.c
new file mode 100644
index 000000000..7cfb989e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadd.c
@@ -0,0 +1,416 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000b0000000b;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000201000000000b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000fc0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000b0000000b;
+ *((unsigned long *)&__m128i_result[0]) = 0x0002010000fc000b;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000017fda829;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000017fda829;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000001fffe;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7f7f7f7f00107f04;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7f0000fd7f0000fd;
+ *((unsigned long *)&__m128i_result[1]) = 0x7e7e7e7eff0f7f04;
+ *((unsigned long *)&__m128i_result[0]) = 0x7f0000fd7f01fffb;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0080000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf4b6f3f52f4ef4a8;
+ *((unsigned long *)&__m128i_op1[1]) = 0x195f307a5d04acbb;
+ *((unsigned long *)&__m128i_op1[0]) = 0x6a1a3fbb3c90260e;
+ *((unsigned long *)&__m128i_result[1]) = 0x19df307a5d04acbb;
+ *((unsigned long *)&__m128i_result[0]) = 0x5ed032b06bde1ab6;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5555001400005111;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffabbeab55110140;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5555001400005111;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffabbeab55110140;
+ *((unsigned long *)&__m128i_result[1]) = 0xaaaa00280000a222;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe567c56aa220280;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xf51cf8dad6040188;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0982e2daf234ed87;
+ *((unsigned long *)&__m128i_result[1]) = 0xf51cf8dad6040188;
+ *((unsigned long *)&__m128i_result[0]) = 0x0982e2daf234ed87;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000490000004d;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000001ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000073;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000002a;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000049000000c0;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001ffffff29;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000bd3d;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000007fff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000bd30;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000d7fff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000007a6d;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000dfefe0000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffd000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffd000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfefa000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xfefefefefefefefe;
+ *((unsigned long *)&__m128i_result[0]) = 0xfefefefefefefefe;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0038000000051fff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003c000000022021;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff0101ffffe000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffffa0204000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7f370101ff04ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x7f3bffffa0226021;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x1baf8eabd26bc629;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1c2640b9a8e9fb49;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0002dab8746acf8e;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00036dd1c5c15856;
+ *((unsigned long *)&__m128i_result[1]) = 0x1bb1686346d595b7;
+ *((unsigned long *)&__m128i_result[0]) = 0x1c29ad8a6daa539f;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000003;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfeffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfeffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xfeffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xfeffffffffff0002;
+ __m128i_out = __lsx_vadd_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001ffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff800000c3080000;
+ *((unsigned long *)&__m128i_result[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_result[0]) = 0xff81ffffc3080000;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x004200a000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x004200a000200001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x004200a000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x004200a000200001;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000001f0000001f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000001f0000001f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000001f0000001f;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001f0000001f;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff00ff00ff;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0029aeaca57d74e6;
+ *((unsigned long *)&__m128i_op0[0]) = 0xdbe332365392c686;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000056f64adb9464;
+ *((unsigned long *)&__m128i_op1[0]) = 0x29ca096f235819c2;
+ *((unsigned long *)&__m128i_result[1]) = 0x002a05a2f059094a;
+ *((unsigned long *)&__m128i_result[0]) = 0x05ad3ba576eae048;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000010;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000010;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000000d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000400;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000040d;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001300000013;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000100000100;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100000100;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000100;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001000000ff;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000300000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000002fffffffb;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000010000fffb;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000060000000e;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001201fe01e9;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000060000000e;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000001201fe01e9;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000c0000001c;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000002403fc03d2;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfff0000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfff0000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfff1000100010001;
+ *((unsigned long *)&__m128i_result[0]) = 0xfff1000100010001;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xd70b30c96ea9f4e8;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa352bfac9269e0aa;
+ *((unsigned long *)&__m128i_result[1]) = 0xd70b30c96ea9f4e8;
+ *((unsigned long *)&__m128i_result[0]) = 0xa352bfac9269e0aa;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffa;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001001100110068;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001001100110067;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x379674c000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3789f68000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x379674c000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x3789f68000000000;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000555889;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000002580f01;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00060fbf02040fbf;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00020fbf02000fbf;
+ *((unsigned long *)&__m128i_result[1]) = 0x00060fbf02596848;
+ *((unsigned long *)&__m128i_result[0]) = 0x00020fbf04581ec0;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001388928513889;
+ *((unsigned long *)&__m128i_op0[0]) = 0x006938094a013889;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001388928513889;
+ *((unsigned long *)&__m128i_op1[0]) = 0x006938094a013889;
+ *((unsigned long *)&__m128i_result[1]) = 0x0002711250a27112;
+ *((unsigned long *)&__m128i_result[0]) = 0x00d2701294027112;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op0[0]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op1[1]) = 0x2006454690d3de87;
+ *((unsigned long *)&__m128i_op1[0]) = 0x2006454690d3de87;
+ *((unsigned long *)&__m128i_result[1]) = 0x202544f490f2de35;
+ *((unsigned long *)&__m128i_result[0]) = 0x202544f490f2de35;
+ __m128i_out = __lsx_vadd_q (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadda.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadda.c
new file mode 100644
index 000000000..4bb699eab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vadda.c
@@ -0,0 +1,344 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x52527d7d52527d7d;
+ *((unsigned long *)&__m128i_op1[0]) = 0x52527d7d52527d7d;
+ *((unsigned long *)&__m128i_result[1]) = 0x52527d7d52527d7d;
+ *((unsigned long *)&__m128i_result[0]) = 0x52527d7d52527d7d;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000001fffc001f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0101010202050120;
+ *((unsigned long *)&__m128i_result[0]) = 0x0101010102020202;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0003000300030003;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0003000700020005;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0003000300030003;
+ *((unsigned long *)&__m128i_result[0]) = 0x0003000700020005;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_result[0]) = 0x0101010101010101;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x4f8000004f800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4f8000004f800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x4f8000004f800000;
+ *((unsigned long *)&__m128i_result[0]) = 0x4f8000004f800000;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffcfffcfffcfffc;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffcfffcfffcfffc;
+ *((unsigned long *)&__m128i_result[1]) = 0x0003000300030004;
+ *((unsigned long *)&__m128i_result[0]) = 0x0003000300030004;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5c9c9c9ce3636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x63635c9e63692363;
+ *((unsigned long *)&__m128i_op1[1]) = 0xf0fd800080000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000a00028004000;
+ *((unsigned long *)&__m128i_result[1]) = 0x6b9fe3649c9d6363;
+ *((unsigned long *)&__m128i_result[0]) = 0x6363bc9e8b696363;
+ __m128i_out = __lsx_vadda_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x1111111111111111;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1111111111111111;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_result[1]) = 0x1111113111111131;
+ *((unsigned long *)&__m128i_result[0]) = 0x1111113111111131;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000006a9a5c;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000092444;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000006a9a5c;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000092444;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000d4ccb8;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000124888;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x76f424887fffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfff082f000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x003f000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000f7d1000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x773324887fffffff;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffacdb6dbecac;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1f5533a694f902c0;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5a6f5c53ebed3faa;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa36aca4435b8b8e1;
+ *((unsigned long *)&__m128i_result[1]) = 0x5a6f61865d36d3aa;
+ *((unsigned long *)&__m128i_result[0]) = 0x7bea6962a0bfb621;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000008140c80;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000008140c80;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000fffe0000ff45;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff000000b9;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffd5002affffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x343d8dc6b0ed5a08;
+ *((unsigned long *)&__m128i_result[1]) = 0x012b012c01010246;
+ *((unsigned long *)&__m128i_result[0]) = 0x353e743b50135a4f;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0003c853c843c87e;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0003c853c843c87e;
+ *((unsigned long *)&__m128i_result[1]) = 0x0003c853c843c87e;
+ *((unsigned long *)&__m128i_result[0]) = 0x0003c853c843c87e;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000200000002000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffe000ffdf;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000200000002001;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000001fff0021;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0101010101010109;
+ *((unsigned long *)&__m128i_result[0]) = 0x0101010101010101;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000005452505;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000004442403e4;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffe0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000005452505;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000044525043c;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5d7f5d807fea807f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5d7f5d807fea807f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xbafebb00ffd500fe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000208000002080;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x003f0000003f0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x003f0000003f0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x803e0000803e0000;
+ *((unsigned long *)&__m128i_result[0]) = 0x803e0000803e0000;
+ __m128i_out = __lsx_vadda_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000800000008000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000800000008000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000800000008000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000800000008000;
+ __m128i_out = __lsx_vadda_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001400000014;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001400000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfff9000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffc000400000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0007001400000014;
+ *((unsigned long *)&__m128i_result[0]) = 0x0004001000000000;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op1[0]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_result[1]) = 0xfefeff00fefeff00;
+ *((unsigned long *)&__m128i_result[0]) = 0xfefeff00fefeff00;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vadda_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000084d12ce;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000024170000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000020300000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000084d12ce;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000044470000;
+ __m128i_out = __lsx_vadda_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff01ff01ac025c87;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff01ff01ac465ca1;
+ *((unsigned long *)&__m128i_result[1]) = 0x64616462b76106dc;
+ *((unsigned long *)&__m128i_result[0]) = 0x64616462b71d06c2;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffaeffaeffaeffae;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffaeffaeffaeffae;
+ *((unsigned long *)&__m128i_result[1]) = 0x0051005200510052;
+ *((unsigned long *)&__m128i_result[0]) = 0x0051005200510052;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x3a8000003a800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3bc000003a800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0a0000000a000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0a0000000a000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x4480000044800000;
+ *((unsigned long *)&__m128i_result[0]) = 0x45c0000044800000;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_result[0]) = 0x6363636463636363;
+ __m128i_out = __lsx_vadda_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddi.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddi.c
new file mode 100644
index 000000000..77afabe92
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddi.c
@@ -0,0 +1,251 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x1414141414141415;
+ *((unsigned long *)&__m128i_result[0]) = 0x1414141414141415;
+ __m128i_out = __lsx_vaddi_bu (__m128i_op0, 0x14);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0505050505050505;
+ *((unsigned long *)&__m128i_result[0]) = 0x0505050504040404;
+ __m128i_out = __lsx_vaddi_bu (__m128i_op0, 0x5);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000008140c80;
+ *((unsigned long *)&__m128i_result[1]) = 0x1f1f1f1f1f1f1f1f;
+ *((unsigned long *)&__m128i_result[0]) = 0x1f1f1f1f27332b9f;
+ __m128i_out = __lsx_vaddi_bu (__m128i_op0, 0x1f);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0303030303030303;
+ *((unsigned long *)&__m128i_result[0]) = 0x0303030303030304;
+ __m128i_out = __lsx_vaddi_bu (__m128i_op0, 0x3);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_result[1]) = 0x8f8f8f8f8f8f8f8f;
+ *((unsigned long *)&__m128i_result[0]) = 0x8f8f8f8f8f8f8f8f;
+ __m128i_out = __lsx_vaddi_bu (__m128i_op0, 0xf);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0018001800180018;
+ *((unsigned long *)&__m128i_result[0]) = 0x0018001800180018;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0x18);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000080000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000080000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0019081900190019;
+ *((unsigned long *)&__m128i_result[0]) = 0x0019081900190019;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0x19);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000a000a000a000a;
+ *((unsigned long *)&__m128i_result[0]) = 0x000a000a000a000a;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0xa);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffc1000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000ff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffcc000b000b000b;
+ *((unsigned long *)&__m128i_result[0]) = 0x000b000b010a000b;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0xb);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x001f001f001f001f;
+ *((unsigned long *)&__m128i_result[0]) = 0x001f001f001f001f;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0x1f);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x001c001c001c001c;
+ *((unsigned long *)&__m128i_result[0]) = 0x001c001c001c001c;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0x1c);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x67eb85afb2ebb000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xc8847ef6ed3f2000;
+ *((unsigned long *)&__m128i_result[1]) = 0x680485c8b304b019;
+ *((unsigned long *)&__m128i_result[0]) = 0xc89d7f0fed582019;
+ __m128i_out = __lsx_vaddi_hu (__m128i_op0, 0x19);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000a0000000a;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000a0000000a;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0xa);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000001000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffe000ffff1fff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000090100000a;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffe009ffff2008;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x9);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000200000002;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000300000003;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x3);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfc01fcfefc02fdf7;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfe00fcfffe01fd01;
+ *((unsigned long *)&__m128i_result[1]) = 0xfc01fd13fc02fe0c;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe00fd14fe01fd16;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x15);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001300000013;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x13);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000bd3d;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000007fff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000c0000bd49;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000c7fff000c;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0xc);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fffe0001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000500000005;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000005fffe0006;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x5);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000fffffeff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000009ffffff08;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000900000009;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x9);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x55aa55aa55aa55ab;
+ *((unsigned long *)&__m128i_op0[0]) = 0xaa55555655aaaaa8;
+ *((unsigned long *)&__m128i_result[1]) = 0x55aa55c355aa55c4;
+ *((unsigned long *)&__m128i_result[0]) = 0xaa55556f55aaaac1;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x19);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000020;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000e0000002e;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000e0000004e;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0xe);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000400000004;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000400000004;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x4);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x003f000400000003;
+ *((unsigned long *)&__m128i_result[0]) = 0x003f000400000003;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x4);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff8000010f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000900000009;
+ *((unsigned long *)&__m128i_result[0]) = 0xff80000a0f800009;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x9);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x30eb020302101b03;
+ *((unsigned long *)&__m128i_op0[0]) = 0x020310d0c0030220;
+ *((unsigned long *)&__m128i_result[1]) = 0x30eb022002101b20;
+ *((unsigned long *)&__m128i_result[0]) = 0x020310edc003023d;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x1d);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x59f7fd7059f7fd70;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000001700000017;
+ *((unsigned long *)&__m128i_result[0]) = 0x59f7fd8759f7fd87;
+ __m128i_out = __lsx_vaddi_wu (__m128i_op0, 0x17);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6420e0208400c4c4;
+ *((unsigned long *)&__m128i_op0[0]) = 0x20c4e0c4e0da647a;
+ *((unsigned long *)&__m128i_result[1]) = 0x6420e0208400c4e3;
+ *((unsigned long *)&__m128i_result[0]) = 0x20c4e0c4e0da6499;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0x1f);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x21201f1e1d001b1a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1918171615141312;
+ *((unsigned long *)&__m128i_result[1]) = 0x21201f1e1d001b25;
+ *((unsigned long *)&__m128i_result[0]) = 0x191817161514131d;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0xb);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000014;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0x14);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000004000000040;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00007770ffff9411;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000400000004c;
+ *((unsigned long *)&__m128i_result[0]) = 0x00007770ffff941d;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0xc);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000016;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000016;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0x16);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000800000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000080000000b;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000000b;
+ __m128i_out = __lsx_vaddi_du (__m128i_op0, 0xb);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-1.c
new file mode 100644
index 000000000..b7b16a325
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-1.c
@@ -0,0 +1,335 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000007b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000100010001007c;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001000100010001;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x3fffffff80000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00003ffd000a4000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffd000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffcffff00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000fffd000a0000;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0800080008000800;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0800080008000800;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffff0000ffff0000;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000490000004d;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000001ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff000000ff00ff00;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff00ff0000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000049ffffff4d;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffff01ffffffff;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x003fffff00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x003fffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffff00000000;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000005e695e95;
+ *((unsigned long *)&__m128i_op0[0]) = 0x5e695e96c396b402;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000005e94;
+ *((unsigned long *)&__m128i_result[0]) = 0x00005e96ffffb402;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffb;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffb;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000100000000fc;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000100000000fc;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000158;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000158;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000005d5d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000005d5d;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5c9c9c9ce3636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x63635c9e63692363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffe3636363;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000063692363;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0202020202020203;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0202020202020203;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000002020202;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000002020202;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x1817161517161514;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1615141315141312;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x76f424887fffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000017161515;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000095141311;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff00000000ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000fffe;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfdfef9ff0efff900;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffcfd000000fb00;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001fe00f8000700;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000fb01;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000007000000;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000080806362;
+ *((unsigned long *)&__m128i_op1[0]) = 0x807f808000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffff80806362;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000ff00ff;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000010002;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ff960015;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000010002;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffff960015;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xf6548a1747e59090;
+ *((unsigned long *)&__m128i_op0[0]) = 0x27b169bbb8145f50;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000047e59090;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffb8145f50;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00bbfff7fffffff7;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff008ff820;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00bbfff7fffffff7;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff008ff820;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffee;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000011ff040;
+ __m128i_out = __lsx_vaddwev_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000100010001fffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000100010001fffd;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001000000010;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffc2ffe700000007;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffc100010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffc100010001;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff80df00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000dfa6e0c6;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000d46cdc13;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000d46cdc13;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfe813f00fe813f00;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfe813f00fe813f00;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe813f00fe813f00;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffe;
+ __m128i_out = __lsx_vaddwev_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-2.c
new file mode 100644
index 000000000..a407cadfb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-2.c
@@ -0,0 +1,344 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0400040004000400;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0400040004000400;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x061006100613030c;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4d6814ef9c77ce46;
+ *((unsigned long *)&__m128i_result[1]) = 0x010f010f0112010b;
+ *((unsigned long *)&__m128i_result[0]) = 0x016701ee01760145;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x1000100010001000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1000100010001000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffac0a000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000ac00000000;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf589caff5605f2fa;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000014eb54ab;
+ *((unsigned long *)&__m128i_op1[0]) = 0x14eb6a002a406a00;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000eb00ab;
+ *((unsigned long *)&__m128i_result[0]) = 0x017400ff004500fa;
+ __m128i_out = __lsx_vaddwev_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x10f917d72d3d01e4;
+ *((unsigned long *)&__m128i_op0[0]) = 0x203e16d116de012b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000017d7000001e4;
+ *((unsigned long *)&__m128i_result[0]) = 0x000016d10000012b;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000ffff3fbfffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000100fe000100fe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff0000ffff;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0003c853c843c87e;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0003c853c843c87e;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff000000ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001c8520000c97d;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001c8520001c87d;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff0000ffff;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x67eb85afb2ebb000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xc8847ef6ed3f2000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffac0a000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000085af0000b000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00017ea200002000;
+ __m128i_out = __lsx_vaddwev_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000024;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000024;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00307028003f80b0;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0040007fff800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000003f80b0;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ff800000;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000001f;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff80ffffff80ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000018080807f;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001ffff80fe;
+ __m128i_out = __lsx_vaddwev_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffff8000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffff8000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffff8000000000;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x1000000010000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000180100100000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000b5207f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00001801b5307f80;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001300000013;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001300000013;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffe218ffffea10;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffff208fffffa02;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffff208fffffa02;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000080000000;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000003fbf3fbf;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fff7fff7fff7ff8;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000000f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fff7fff7fff8007;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0002000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000014;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7f8000007f800000;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffd27db010d20fbf;
+ *((unsigned long *)&__m128i_op1[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffd27db010d20fbf;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0xffa4fb6021a41f7e;
+ __m128i_out = __lsx_vaddwev_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-3.c
new file mode 100644
index 000000000..4d5c60998
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwev-3.c
@@ -0,0 +1,425 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0403cfcf01c1595e;
+ *((unsigned long *)&__m128i_op0[0]) = 0x837cd5db43fc55d4;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0404038383838404;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0404038383838404;
+ *((unsigned long *)&__m128i_result[1]) = 0x0007005200440062;
+ *((unsigned long *)&__m128i_result[0]) = 0x0080005e007f00d8;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffcafff8ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000000000a0;
+ *((unsigned long *)&__m128i_op1[1]) = 0xe6d4572c8a5835bc;
+ *((unsigned long *)&__m128i_op1[0]) = 0xe5017c2ac9ca9fd0;
+ *((unsigned long *)&__m128i_result[1]) = 0x00d3012b015700bb;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001002affca0070;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000fea0000fffe;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x6363771163631745;
+ *((unsigned long *)&__m128i_op1[0]) = 0x636363ec6363636c;
+ *((unsigned long *)&__m128i_result[1]) = 0x006300fb00630143;
+ *((unsigned long *)&__m128i_result[0]) = 0x0063ffec0063006c;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x9c9c9c9c9c9c9c9d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffff0000;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8080ffffffff8080;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00008080ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xff80ffffffffff80;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ff80ffffffff;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00197f26cb658837;
+ *((unsigned long *)&__m128i_op0[0]) = 0x01009aa4a301084b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op1[0]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_result[1]) = 0x0037ffd40083ffe5;
+ *((unsigned long *)&__m128i_result[0]) = 0x001e0052001ffff9;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff00ffffff00ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000f50000000900;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000090900000998;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff000900ffff98;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x10f881a20ffd02b0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ff800000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfff8ffa2fffdffb0;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ff800000;
+ __m128i_out = __lsx_vaddwev_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00007fff00007fff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000007b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000007b;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x1e0200001e020000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffcfffcfffcfffd;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffcfffdfffcfffd;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffcfffffffd;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffdfffffffd;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff00ff00ff00ff00;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff00ff00ff00ff00;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ff000000ff00;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ff000000ff00;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000005;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000005;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000010100000101;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000010100000101;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000400000004;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000400000004;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000400000004;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000400000004;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8000000080000008;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa2f54a1ea2f54a1e;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_result[0]) = 0x00004a1e00004a1e;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000868686868686;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000000000ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000868600008785;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x63636b6afe486741;
+ *((unsigned long *)&__m128i_op0[0]) = 0x41f8e880ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xe363636363abdf16;
+ *((unsigned long *)&__m128i_op1[0]) = 0x41f8e08016161198;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000cecd00004657;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000c90000011197;
+ __m128i_out = __lsx_vaddwev_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000001000f000e;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000fff1000ffffe;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000000f000e;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000000ffffe;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0c07e181ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3430af9effffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000fe00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000fe00ff;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00060012000e002b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000049ffffffaa;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000000e002b;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffaa;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000006f00001f0a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000958affff995d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000bfffffffe0f6;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000001f0a;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffff7a53;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff7f80ffff7f80;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffff7f80ffff7f80;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff7f80ffff7f80;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff7f80ffff7f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000fffeff00;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000fffeff00;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0008000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000003dffc2;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0080008000800080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0080006b0000000b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000800080;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000000b;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000ff00ff;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000455555555;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000055555555;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff7f810100001000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000400530050ffa6;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff007fff810001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000400530050ffa6;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffff811001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000a1ff4c;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001f0000001f;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000008000001e;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xd3259a2984048c23;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf9796558e39953fd;
+ *((unsigned long *)&__m128i_op1[1]) = 0x86dd8341b164f12b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x9611c3985b3159f5;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000035697d4e;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000013ecaadf2;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00ff00ef00ff010f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00ff00ff00ff010f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[0]) = 0xc1f03e1042208410;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000001000110;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000431f851f;
+ __m128i_out = __lsx_vaddwev_d_wu_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000030000003f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000030000003f;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffbfffffffbf;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffbfffffffbf;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffbfffffffbe;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x06b1213ef1efa299;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8312f5424ca4a07f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x1f1f1f1f1f1f1f00;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1f1f1f27332b9f00;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xa23214697fd03f7f;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x80000000ffffd860;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff80000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff80000000;
+ __m128i_out = __lsx_vaddwev_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-1.c
new file mode 100644
index 000000000..0ebe8c8a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-1.c
@@ -0,0 +1,408 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ca354688;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0404038383838404;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0404038383838404;
+ *((unsigned long *)&__m128i_result[1]) = 0x00040003ff83ff84;
+ *((unsigned long *)&__m128i_result[0]) = 0x00040003ff4dffca;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000040d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00001f5400000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001f00000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000f80007;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ unsigned_int_out = __lsx_vpickve2gr_bu (__m128i_op0, 0xb);
+ *((unsigned long *)&__m128i_op0[1]) = 0x003fffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003fffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff00000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffff0100ff;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffefffefffefffe;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffefffefffeffff;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x478b478b38031779;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6b769e690fa1e119;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000001030103;
+ *((unsigned long *)&__m128i_result[1]) = 0x0047004700380017;
+ *((unsigned long *)&__m128i_result[0]) = 0x006bff9e0010ffe2;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xc0b4d1a5f8babad3;
+ *((unsigned long *)&__m128i_op0[0]) = 0xbbc8ecc5f3ced5f3;
+ *((unsigned long *)&__m128i_op1[1]) = 0xc0b4d1a5f8babad3;
+ *((unsigned long *)&__m128i_op1[0]) = 0xbbc8ecc5f3ced5f3;
+ *((unsigned long *)&__m128i_result[1]) = 0xff80ffa2fff0ff74;
+ *((unsigned long *)&__m128i_result[0]) = 0xff76ffd8ffe6ffaa;
+ __m128i_out = __lsx_vaddwod_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000800;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1f54e0ab00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00001f5400000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000000f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op1[1]) = 0xd70b30c96ea9f4e8;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa352bfac9269e0aa;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffd70b00006ea9;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffa352ffff9269;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000208000002080;
+ *((unsigned long *)&__m128i_op1[1]) = 0xd70b30c96ea9f4e8;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa352bfac9269e0aa;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffd70b00006ea9;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffa352ffff9269;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xe593c8c4e593c8c4;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8144ffff01c820a4;
+ *((unsigned long *)&__m128i_op1[0]) = 0x9b2ee1a4034b4e34;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff80c400000148;
+ *((unsigned long *)&__m128i_result[0]) = 0xffff80c1ffffe8de;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffefffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffefffffffe;
+ __m128i_out = __lsx_vaddwod_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xa486c90f6537b8d7;
+ *((unsigned long *)&__m128i_op0[0]) = 0x58bcc2013ea1cc1e;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffa486c90f;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000058bcc201;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00001802041b0013;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00001802041b0014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000003004;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff02000200;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffe000ffffe000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffe000ffffe000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffdfff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffdfff;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fbf83468;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000fbf83468;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff82bb9784;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffc6bb97ac;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000007ffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x4f804f804f804f80;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4f804f804f804f80;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000001000fbff9;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000002ff9afef;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000004f804f81;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000004f804f80;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001000000010;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000001000000010;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000001000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000020;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000020;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001000000010;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000fff0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000010;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000010;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffe00029f9f6061;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x64e464e464e464e4;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffeffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000064e264e6;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0305030203020502;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0301030203020502;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000003050302;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000003010302;
+ __m128i_out = __lsx_vaddwod_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ff0000ff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x01fc020000fe0100;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ff0000ff0000;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff84fff4ff84fff4;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00a6ffceffb60052;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xff84fff4ff84fff4;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000fefefe6a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000c2bac2c2;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000fefefe6a;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0032000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000002000000020;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffff0000;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5a57bacbd7e39680;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6bae051ffed76001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xf3e6586b60d7b152;
+ *((unsigned long *)&__m128i_op1[0]) = 0xf7077b934ac0e000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x4e3e133738bb47d2;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000117d00007f7b;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000093d0000187f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7d7f027f7c7f7c79;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7e7f7e7f027f032f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7d7f13fc7c7ffbf4;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-2.c
new file mode 100644
index 000000000..379517f39
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-2.c
@@ -0,0 +1,344 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x08fdc221bfdb1927;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4303c67e9b7fb213;
+ *((unsigned long *)&__m128i_op1[1]) = 0x08fdc221bfdb1927;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4303c67e9b7fb213;
+ *((unsigned long *)&__m128i_result[1]) = 0x00100184017e0032;
+ *((unsigned long *)&__m128i_result[0]) = 0x0086018c01360164;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff77777807777775;
+ *((unsigned long *)&__m128i_op0[0]) = 0xe6eeef00eeeeeebf;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000000000f00f;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff007700070077;
+ *((unsigned long *)&__m128i_result[0]) = 0x00e600ef00ee01de;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff00ff00ff;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff00ff00ff;
+ __m128i_out = __lsx_vaddwod_h_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff0000ffff;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000030000003f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x4429146a7b4c88b2;
+ *((unsigned long *)&__m128i_op1[0]) = 0xe22b3595efa4aa0c;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000442900007b4c;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000e22b0000efa4;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0006000000040000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0002000000000007;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000600000004;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000636500006363;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000000000a6;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000080800000808;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000800000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000ffff;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001fffe0001fefc;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001fffe0001fefc;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000200000002;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fff80000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff8000010f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ff8000010f78;
+ __m128i_out = __lsx_vaddwod_w_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffff7;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffc01;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffff7;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffc01;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001fffffffe;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x370bdfecffecffec;
+ *((unsigned long *)&__m128i_op0[0]) = 0x370bdfecffecffec;
+ *((unsigned long *)&__m128i_op1[1]) = 0x370bdfecffecffec;
+ *((unsigned long *)&__m128i_op1[0]) = 0x370bdfecffecffec;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000006e17bfd8;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000158;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x003f000400000003;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003f000400000003;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001000000010000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000400004;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000003f0004;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7f8000017f800001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7f8000017f800001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000007f800001;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000007f800001;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_d_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000200000000;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x379674c000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3789f68000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x379674c000000000;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000001000000010;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-3.c
new file mode 100644
index 000000000..30dc83518
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vaddwod-3.c
@@ -0,0 +1,237 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000a16316b0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x16161616a16316b0;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff00ffffa10016;
+ *((unsigned long *)&__m128i_result[0]) = 0x01150115ffa10016;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7f7f7f7f7f7f7f7f;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x007e007e007e007e;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff00ff00ff;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000120002000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000200020;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000003f;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000fe00fe;
+ *((unsigned long *)&__m128i_result[0]) = 0x00fe00fe00fe00fe;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000011ffee;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000000dfff2;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000000000ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000000000ff;
+ __m128i_out = __lsx_vaddwod_h_bu_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00e0000000e00000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000e0000000e0;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffff7100fffc;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00ff00ffffa10016;
+ *((unsigned long *)&__m128i_op1[0]) = 0x01150115ffa10016;
+ *((unsigned long *)&__m128i_result[1]) = 0x000100fe000070a1;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000115ffffffa1;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000fffe0000fffe;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffe218ffffea10;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffff208fffffa02;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff0000ffff;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000001000f00fe00;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000017fff00fe7f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000f00;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffff00;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ unsigned_int_out = __lsx_vpickve2gr_hu (__m128i_op0, 0x5);
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x04faf60009f5f092;
+ *((unsigned long *)&__m128i_op0[0]) = 0x04fafa9200000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfff9fffefff9ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000004fa000009f5;
+ *((unsigned long *)&__m128i_result[0]) = 0x000004f3fffffff9;
+ __m128i_out = __lsx_vaddwod_w_hu_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000c2f90000bafa;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8000c2fa8000c2fa;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000c2f90000bafa;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00001fff00001fff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000003fffffffc;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00001fff00001fff;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000807bf0a1f80;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000800ecedee68;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5847b72626ce61ef;
+ *((unsigned long *)&__m128i_op1[0]) = 0x110053f401e7cced;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x5847bf2de5d8816f;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffff000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000100000155;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffff000000000000;
+ __m128i_out = __lsx_vaddwod_q_du_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-1.c
new file mode 100644
index 000000000..af75f8e4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-1.c
@@ -0,0 +1,488 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x4ee85545068f3133;
+ *((unsigned long *)&__m128i_op0[0]) = 0x870968c1f56bb3cd;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x004e005500060031;
+ *((unsigned long *)&__m128i_result[0]) = 0xff870068fff5ffb3;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000000d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfff082f000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003f000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xc04d600d3aded151;
+ *((unsigned long *)&__m128i_op1[0]) = 0xc000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x004cff8fffde0051;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x800000007fffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x800000007fffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x003f0000ffffffff;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0042003e0042002f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001fffc0001fffc;
+ *((unsigned long *)&__m128i_result[1]) = 0x0042003e0042002f;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001fffc0001fffc;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_h_b (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7505443065413aed;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0100d6effefd0498;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000750500006541;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000100fffffefd;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffff00ff00;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00ffff00;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffff7;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffff00;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffe000000f6;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001fffffffe;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4050000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000f80007;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000000000f8;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff80ffffffffff80;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ff80ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffff7ffffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000fffffffe;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xce9035c49ffff570;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000004;
+ *((unsigned long *)&__m128i_op1[0]) = 0xce9035c49ffff574;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000004;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000454ffff9573;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x80007fc000003f00;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7d187e427c993f80;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7500000075000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7500000075000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff800000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00007d1800007c99;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5555000054100000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x5555000154100155;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000155;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_w_h (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000200;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000200;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000200;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000200;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffebe6ed565;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffebe6ed565;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffbe6ed563;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x78c00000ff000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000078c00000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7d3ac60000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000007d3ac600;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fffffff82bb9784;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffffc6bb97ac;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffff82bb9784;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffc6bb97ac;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000003effff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000003effff;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xf359f359f359f359;
+ *((unsigned long *)&__m128i_op1[0]) = 0xf359f359f359f359;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffff359f358;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffff359f358;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000e2e36363;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000063636363;
+ __m128i_out = __lsx_vhaddw_d_w (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffe000ffffe000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffe000ffffe000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff02000200;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffe00001ffe200;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000383;
+ *((unsigned long *)&__m128i_op0[0]) = 0xe400000003ffc001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000001000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffe000ffff1fff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffe000ffff2382;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x03574e39e496cbc9;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000001010000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x03574e38e496cbc9;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xabff54e911f71b07;
+ *((unsigned long *)&__m128i_op0[0]) = 0xa9ec4882f216ea11;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfc01fcfefc02fdf7;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfe00fcfffe01fd01;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xaa0051e90ff91808;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffe00000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000030000003f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000030000003f;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffff000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000ffff53d9;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff0001ffff9515;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffff0001ffff9514;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x9c9c9c9c9c9c9c9c;
+ *((unsigned long *)&__m128i_op0[0]) = 0x9c9c9c9c9c9c9c9c;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x9c9c9c9c9c9c9c9c;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0002000200000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0002000200000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0002000400000001;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff80ff807e017f01;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7f3b7f3f7f3b7f21;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0a0000001e000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0a000000f6000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0980ff8174017f01;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x3a8000003a800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000ef0000000003b;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000ef0000000003b;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000011ff040;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000011ff040;
+ __m128i_out = __lsx_vhaddw_q_d (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-2.c
new file mode 100644
index 000000000..37c769a2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vhaddw-2.c
@@ -0,0 +1,452 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x00000000fff8fff8;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fff80000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000ff0000;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff80000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff80000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0080000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0080000000000000;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5252525252525252;
+ *((unsigned long *)&__m128i_op0[0]) = 0x5252525252525252;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0052005200520052;
+ *((unsigned long *)&__m128i_result[0]) = 0x0052005200520052;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000fffd;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff000000ff;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00060012000e002b;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000049ffffffaa;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000060000000e;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000127fffffea;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000060000000e;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000001201fe01e9;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5d7f5d807fea807f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x007f008000ea007f;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff00ff00ff00ff;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_hu_bu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4f804f804f804f80;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4f804f804f804f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00009f0000009f00;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000bd3d00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000bd3d00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000bd3d00000000;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001f;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff007f00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff007f00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000007f00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000007f00000000;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7ef400ad21fc7081;
+ *((unsigned long *)&__m128i_op1[0]) = 0x28bf0351ec69b5f2;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000ad00007081;
+ *((unsigned long *)&__m128i_result[0]) = 0x000003510000b5f2;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x5252adadadadadad;
+ *((unsigned long *)&__m128i_op1[0]) = 0xadad52525252adad;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000adad0000adad;
+ *((unsigned long *)&__m128i_result[0]) = 0x000052520000adad;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ff8000010f78;
+ *((unsigned long *)&__m128i_op1[1]) = 0x002a001a001a000b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000001a0000000b;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7500000075007500;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00feff8000ff80ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff800000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00007d1800007c99;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000f50000007500;
+ *((unsigned long *)&__m128i_result[0]) = 0x00007e1600007d98;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff760386bdae46;
+ *((unsigned long *)&__m128i_op0[0]) = 0xc1fc7941bc7e00ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0802080408060803;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ffff000086bd;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ca000000c481;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000007fff9;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff2356fe165486;
+ *((unsigned long *)&__m128i_op1[0]) = 0x5efeb3165bd7653d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000235600005486;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000b31600006544;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x9c83e21a22001818;
+ *((unsigned long *)&__m128i_op0[0]) = 0xdd3b8b02563b2d7b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x4f4f4f4f4f4f4f4f;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4f4f4f4f4f4f4f4f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ebd20000714f;
+ *((unsigned long *)&__m128i_result[0]) = 0x00012c8a0000a58a;
+ __m128i_out = __lsx_vhaddw_wu_hu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000003;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xa8beed87bc3f2be1;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0024d8f6a494006a;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfeffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfeffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001a8beed86;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000010024d8f5;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000078c00000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x6a57a30ff0000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000f0000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000040d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000001fffffffe;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x80000000b57ec564;
+ *((unsigned long *)&__m128i_op1[0]) = 0x8000000083ff0be0;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001b57ec563;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000183ff0bdf;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8000e2e3ffffd1d3;
+ *((unsigned long *)&__m128i_op0[0]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000008000e2e3;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000080000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000200010002;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000200000002;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000200010002;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000200000002;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000010004;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffffffff;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001fffffffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000001000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000001000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_du_wu (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x4ee85545ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x870968c1f56bb3cd;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x870968c1f56bb3cd;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000013d;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0010001000030000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0006000200000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0006000200000000;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffff01ff01;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffe;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000001b;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000001b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000001b0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000001b0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000001b001b;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000004870ba0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000004870ba0;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000010000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000010000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xff8000010f800000;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00007fff7fff8000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000000003e2;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vhaddw_qu_du (__m128i_op0, __m128i_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmadd.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmadd.c
new file mode 100644
index 000000000..3fade5157
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmadd.c
@@ -0,0 +1,450 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffa486c90f;
+ *((unsigned long *)&__m128i_op2[0]) = 0x1f52d710bf295626;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff7f01ff01;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x78c00000ff000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffff7f01ff01;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfa31dfa21672e711;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1304db85e468073a;
+ *((unsigned long *)&__m128i_op2[1]) = 0x887c8beb969e00f2;
+ *((unsigned long *)&__m128i_op2[0]) = 0x101f8b680b6f8095;
+ *((unsigned long *)&__m128i_result[1]) = 0x7582ed22cb1c6e12;
+ *((unsigned long *)&__m128i_result[0]) = 0x35aaa61c944f34c2;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x5252525252525252;
+ *((unsigned long *)&__m128i_op0[0]) = 0x5252525252525252;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x5252525252525252;
+ *((unsigned long *)&__m128i_result[0]) = 0x5252525252525252;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ int_out = __lsx_vpickve2gr_b (__m128i_op0, 0xc);
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[1]) = 0xbfffbfffbfffbffe;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x4000400040004002;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfe01fe01fe01fe01;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfe01fe01fe01fe01;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfe01fe01fe01fe01;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfe01fe01fe01fe01;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff00ff00ff00ff00;
+ *((unsigned long *)&__m128i_op2[0]) = 0xff00ff00ff00ff00;
+ *((unsigned long *)&__m128i_result[1]) = 0xf10cf508f904fd01;
+ *((unsigned long *)&__m128i_result[0]) = 0xf10cf508f904fd01;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffb080ffffb080;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffb080ffffb080;
+ *((unsigned long *)&__m128i_op2[1]) = 0x004fcfcfd01f9f9f;
+ *((unsigned long *)&__m128i_op2[0]) = 0x9f4fcfcfcf800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x3504b5fd2dee1f80;
+ *((unsigned long *)&__m128i_result[0]) = 0x4676f70fc0000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xf7f7f7ff8e8c6d7e;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf7f7f7f7f7f7fbff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xf7f7f7ff8e8c6d7e;
+ *((unsigned long *)&__m128i_result[0]) = 0xf7f7f7f7f7f7fbff;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0fbc1df53c1ae3f9;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ff820f81;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xf144e32bc4e61d27;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000020017ef19f;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000004b01;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00d3012acc56f9bb;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000000000a0;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000004b01;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000001000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000ffff0000ff00;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffefffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000001010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff0000ffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0fff0fff0fff0fff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0fff0fff0fff0fff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xf001f0010101f002;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000fffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0010000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000007f41;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000fffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0010000000000001;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x01ff020000ff03ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x01346b8d00b04c5a;
+ *((unsigned long *)&__m128i_op1[1]) = 0x002affd600000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0xcbc2723a4f12a5f8;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x01ff020000ff03ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x01346b8d00b04c5a;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000080808000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000080808000;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00ff000000ff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ff000000ff0000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000455555555;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000455555555;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x007f00ff00ff00fe;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7ffffffe00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7ffffffe00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x007f00ff00ff00fe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xdcec560380000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x08ec7f7f80000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff010181010102;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff81010102;
+ *((unsigned long *)&__m128i_op2[1]) = 0x32d8f0a905b6c59b;
+ *((unsigned long *)&__m128i_op2[0]) = 0x322a52fc2ba83b96;
+ *((unsigned long *)&__m128i_result[1]) = 0xaa14efac3bb62636;
+ *((unsigned long *)&__m128i_result[0]) = 0xd6c22c8353a80d2c;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op2[0]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00009c7c00007176;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff000000001f1f00;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00009c7c00007176;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00060fbf00040fbf;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00020fbf00000fbf;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x9727b8499727b849;
+ *((unsigned long *)&__m128i_op2[0]) = 0x12755900b653f081;
+ *((unsigned long *)&__m128i_result[1]) = 0x00060fbf00040fbf;
+ *((unsigned long *)&__m128i_result[0]) = 0x00020fbf00000fbf;
+ __m128i_out = __lsx_vmadd_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000021100000211;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfb141d31fb141d31;
+ *((unsigned long *)&__m128i_op1[1]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op1[0]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op2[1]) = 0x2006454690d3de87;
+ *((unsigned long *)&__m128i_op2[0]) = 0x2006454690d3de87;
+ *((unsigned long *)&__m128i_result[1]) = 0xc0b4d1a5f8babad3;
+ *((unsigned long *)&__m128i_result[0]) = 0xbbc8ecc5f3ced5f3;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0674c886fcba4e98;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfdce8003090b0906;
+ *((unsigned long *)&__m128i_op1[1]) = 0x003fffc0ffc0003f;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffc0ffc0003f003f;
+ *((unsigned long *)&__m128i_op2[1]) = 0x002a05a2f059094a;
+ *((unsigned long *)&__m128i_op2[0]) = 0x05ad3ba576eae048;
+ *((unsigned long *)&__m128i_result[1]) = 0xd4a6cc27d02397ce;
+ *((unsigned long *)&__m128i_result[0]) = 0x24b85f887e903abe;
+ __m128i_out = __lsx_vmadd_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0700f8ff0700f8ff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000007020701;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000007010701;
+ *((unsigned long *)&__m128i_result[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7f8000008680f1ff;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636463abdf17;
+ *((unsigned long *)&__m128i_op0[0]) = 0x41f8e08016161198;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x6363636463abdf17;
+ *((unsigned long *)&__m128i_result[0]) = 0x41f8e08016161198;
+ __m128i_out = __lsx_vmadd_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffff00ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ff800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x17c64aaef639f093;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xf6548a1747e59090;
+ *((unsigned long *)&__m128i_op2[0]) = 0x27b169bbb8145f50;
+ *((unsigned long *)&__m128i_result[1]) = 0x10f881a20ffd02b0;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ff800000;
+ __m128i_out = __lsx_vmadd_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-1.c
new file mode 100644
index 000000000..d3fd83da7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-1.c
@@ -0,0 +1,472 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000036de0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000003be14000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000001f0a;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00000000ffff7a53;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000001f0000;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000000006f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000001f0a;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000000006f;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000001f0a;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000cdc1;
+ *((unsigned long *)&__m128i_op1[1]) = 0xe93d0bd19ff0c170;
+ *((unsigned long *)&__m128i_op1[0]) = 0x5237c1bac9eadf55;
+ *((unsigned long *)&__m128i_op2[1]) = 0x05d0ae6002e8748e;
+ *((unsigned long *)&__m128i_op2[0]) = 0xcd1de80217374041;
+ *((unsigned long *)&__m128i_result[1]) = 0xf490ee600180ce20;
+ *((unsigned long *)&__m128i_result[0]) = 0x063bff74fb46e356;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_op1[0]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_op2[1]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_op2[0]) = 0x4040404040404040;
+ *((unsigned long *)&__m128i_result[1]) = 0x0fff0fff0fff0fff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0fff0fff0fff0fff;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op1[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_result[0]) = 0x6363636363636363;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffe00029f9f6061;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x3f5ec0a0feefa0b0;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000007fff7fff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffe00029fb060b1;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ int_out = __lsx_vpickve2gr_w (__m128i_op0, 0x3);
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffff8;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8d78336c83652b86;
+ *((unsigned long *)&__m128i_op1[0]) = 0x39c51f389c0d6112;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffff0001ffff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ff9b0082;
+ *((unsigned long *)&__m128i_result[0]) = 0x003a0037fff2fff8;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000ff0000857a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x05fafe0101fe000e;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000ff0000857a;
+ *((unsigned long *)&__m128i_op1[0]) = 0x05fafe0101fe000e;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000ff0000857a;
+ *((unsigned long *)&__m128i_result[0]) = 0x05fafe0101fe000e;
+ __m128i_out = __lsx_vmaddwev_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffff82bb9784;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffc6bb97ac;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7fffffff82bb9784;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fffffffc6bb97ac;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffff82bb9784;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffc6bb97ac;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x05d0ba0002e8802e;
+ *((unsigned long *)&__m128i_op0[0]) = 0xd005e802174023d6;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xc000c000c000ff81;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0ba00ba00ba00ba0;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0ba00ba00ba011eb;
+ *((unsigned long *)&__m128i_result[1]) = 0x05d0ae6002e8748e;
+ *((unsigned long *)&__m128i_result[0]) = 0xcd1de80217374041;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000010000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00ff00ff00fe00ff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00000fff00000e36;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000fef01000e27ca;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fff00007fff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000040;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x680485c8b304b019;
+ *((unsigned long *)&__m128i_op0[0]) = 0xc89d7f0fed582019;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000003ddc5dac;
+ *((unsigned long *)&__m128i_op2[1]) = 0x67157b5100005000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x387c7e0a133f2000;
+ *((unsigned long *)&__m128i_result[1]) = 0x680485c8b304b019;
+ *((unsigned long *)&__m128i_result[0]) = 0xc89d7f0ff90da019;
+ __m128i_out = __lsx_vmaddwev_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000ff0000ff0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x01fc020000fe0100;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8000000080000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000080000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff7fffffff;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000100fe000100fe;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000100fe000100fe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffff0000ffff;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xa23214697fd03f7f;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000010000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7c7c9c0000007176;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00000000f3040705;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7c7c9c0000007176;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x022002101b200203;
+ *((unsigned long *)&__m128i_op0[0]) = 0x022002101b200203;
+ *((unsigned long *)&__m128i_op1[1]) = 0x022002101b200203;
+ *((unsigned long *)&__m128i_op1[0]) = 0x022002101b200203;
+ *((unsigned long *)&__m128i_op2[1]) = 0x000000080c43b700;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x036caeeca7592703;
+ *((unsigned long *)&__m128i_result[0]) = 0x022002101b200203;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x9c83e21a22001818;
+ *((unsigned long *)&__m128i_op1[0]) = 0xdd3b8b02563b2d7b;
+ *((unsigned long *)&__m128i_op2[1]) = 0x000000009c83e21a;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000022001818;
+ *((unsigned long *)&__m128i_result[1]) = 0xf2c97aaa7d8fa270;
+ *((unsigned long *)&__m128i_result[0]) = 0x0b73e427f7cfcb88;
+ __m128i_out = __lsx_vmaddwev_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0010001000030000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0006000200000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7505445465593af1;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0100d6effefd0498;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0010001000030000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0006000200000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000800;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000800;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000800;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0007000000040000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0003000000010000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000780000007800;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0007000000040000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0003000000010000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xf047ef0000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffff80800001;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff80800001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffff7fff7ef;
+ *((unsigned long *)&__m128i_op1[0]) = 0x80808080ffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffbff8888080a;
+ *((unsigned long *)&__m128i_result[0]) = 0x080803ff807ff7f9;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x3fc03fc000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7f801fe000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x3fc03fc000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7f801fe000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x01fe01fd01fd01fd;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x5d7f5d007f6a007f;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fff7fff7fff7f00;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000060000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000500000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000060000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xf8f8f8f8f8f8f8f8;
+ *((unsigned long *)&__m128i_op2[0]) = 0xf8f8f8f8f8f8f8f8;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-2.c
new file mode 100644
index 000000000..839285685
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-2.c
@@ -0,0 +1,383 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7fffffff00000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7e00fe0000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffbffffff85;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffc0000fdfc;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_result[0]) = 0x0808080808080808;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3941248880000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x3941248880000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x40f3fa0000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x76f4248880000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000e36400005253;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000035ed0000e000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0080008000800080;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x400000003fffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4000000040000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x400000003fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x4000000040000000;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xf1f1f1f149ed7273;
+ *((unsigned long *)&__m128i_op0[0]) = 0x78508ad4ec2ffcde;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffdfdc0d;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00000000ffdfdc0d;
+ *((unsigned long *)&__m128i_result[1]) = 0xf1f1f1f149ed7273;
+ *((unsigned long *)&__m128i_result[0]) = 0x78508ad4ae70fd87;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000440efffff000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000003b;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x440ef000440ef000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x4400000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000440efffff000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000003b;
+ __m128i_out = __lsx_vmaddwev_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000000ffc2f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00201df000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffc2ffe700000007;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffc100010001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00010020fffeffde;
+ *((unsigned long *)&__m128i_op2[0]) = 0x011f57c100201a46;
+ *((unsigned long *)&__m128i_result[1]) = 0x001ffce00016fb41;
+ *((unsigned long *)&__m128i_result[0]) = 0x57cb857100001a46;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7c7c9c0000007176;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00ff000000001f1f;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7c7c9c0000007176;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xbfd10d0d7b6b6b73;
+ *((unsigned long *)&__m128i_op0[0]) = 0xc5c53492f25acbf2;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff000000001f1f00;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xbfd10d0d7b6b6b73;
+ *((unsigned long *)&__m128i_result[0]) = 0xc5c53492f25acbf2;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x34947b4b11684f92;
+ *((unsigned long *)&__m128i_op0[0]) = 0xd73691661e5b68b4;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000016f303dff6d2;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000016f303dff6d2;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fffffff00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x34947b4b11684f92;
+ *((unsigned long *)&__m128i_result[0]) = 0xee297a731e5c5f86;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0177fff0fffffff0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000011ff8bc;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00bbfff7fffffff7;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff008ff820;
+ *((unsigned long *)&__m128i_result[1]) = 0xffe8008fffe7008f;
+ *((unsigned long *)&__m128i_result[0]) = 0x00010001f1153780;
+ __m128i_out = __lsx_vmaddwev_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000100000021;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100010002;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001000100010002;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_op2[0]) = 0x8080808080808080;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001808281820102;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001808201018081;
+ __m128i_out = __lsx_vmaddwev_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000010100fe0101;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffff0200ffff01ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000017fda829;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00ffff0000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00ffff0000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x007f7f80807f7f80;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000020302030;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000020302030;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3fffffffc0000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0101010101010101;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffff0100000001;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffff0100000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000006e17bfd8;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x00010000fffffffc;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000008000e2e3;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000008000e2e3;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000080806362;
+ *((unsigned long *)&__m128i_result[0]) = 0x807f808000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffa;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8101010181010101;
+ *((unsigned long *)&__m128i_op1[0]) = 0x8101010181010101;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000101010001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001000101010015;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffed00010001;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-3.c
new file mode 100644
index 000000000..bab2c6cf3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwev-3.c
@@ -0,0 +1,383 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xc0c00000c0c00000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xc0c00c01c2cd0009;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7f78787f00f7f700;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000f7f700f7f700;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000400;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000400;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000400;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000400;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000000000040d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000080003f80ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000002000000020;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3ff0010000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x3ff0010000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000080003f80ffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000007b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff81ff82ff810081;
+ *((unsigned long *)&__m128i_op2[0]) = 0xff82ff810081ff81;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0808080808080808;
+ *((unsigned long *)&__m128i_result[0]) = 0x0808080808080808;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffff8000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffff8000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffff8000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x841f000fc28f801f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x841f000fc28f801f;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xe593c8c4e593c8c4;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x76ecfc8b85ac78db;
+ __m128i_out = __lsx_vmaddwev_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000fff3;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000000000040d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000010400;
+ __m128i_out = __lsx_vmaddwev_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000001ca02f854;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000001ca02f854;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000001ca02f854;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100013fa0;
+ __m128i_out = __lsx_vmaddwev_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000002b0995850;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff80005613;
+ *((unsigned long *)&__m128i_op1[0]) = 0x007f800000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffff80005613;
+ *((unsigned long *)&__m128i_op2[0]) = 0x007f800000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff00011cf0c569;
+ *((unsigned long *)&__m128i_result[0]) = 0xc0000002b0995850;
+ __m128i_out = __lsx_vmaddwev_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000ffffff81fe;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffff00ffff7e01;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000fffe01fd02;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00fe00fffe86f901;
+ __m128i_out = __lsx_vmaddwev_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000004000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfff8004000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xbfffbfffbfffbffe;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xbfffbfffbfffbffe;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xbfffbfffbfffbffe;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffd3000000130000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffd3000000130000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffd3000000130000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffd3000000130000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffd3000000130000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffd3000000130000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00000000003dffc2;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000f02e1f80f04;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000f02e1f80f04;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffefffe00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffefffe00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x98147a504d145000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x377b810912c0e000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x5a57bacbd7e39680;
+ *((unsigned long *)&__m128i_op2[0]) = 0x6bae051ffed76001;
+ *((unsigned long *)&__m128i_result[1]) = 0xf3eb458161080000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffe9454286c0e000;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0051005200510052;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0051005200510052;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffaeffaeffaeffae;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffaeffaeffaeffae;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffe65ecc1be5bc;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffe65ecc1be5bc;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xf1f1f1f149ed7273;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf1f1f1f1865e65a1;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffff941d;
+ *((unsigned long *)&__m128i_op2[1]) = 0xf1f1f1f149ed7273;
+ *((unsigned long *)&__m128i_op2[0]) = 0xf1f1f1f1865e65a1;
+ *((unsigned long *)&__m128i_result[1]) = 0xf1f1f1f149ed7273;
+ *((unsigned long *)&__m128i_result[0]) = 0x78508ad4ec2ffcde;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x000000120000000d;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000e0000000e;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001000cfffffff2;
+ *((unsigned long *)&__m128i_result[0]) = 0x0001000dfffffff1;
+ __m128i_out = __lsx_vmaddwev_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff80ffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7ffffffeffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000002fe800000ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x7ffffe0100000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff00000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xff80000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe80000000000001;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000080;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-1.c
new file mode 100644
index 000000000..5875aa597
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-1.c
@@ -0,0 +1,372 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000010000000002;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000008000000080;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000c7fff000c;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1000100010001000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xfffff000f0008d3c;
+ *((unsigned long *)&__m128i_op2[0]) = 0xfffff0016fff8d3d;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000100f8100002;
+ *((unsigned long *)&__m128i_result[0]) = 0xfff0ff8006f0f950;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x007ffd0001400840;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x007ffd0001400840;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000002000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000002000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff0000ffff0000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000002000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000002000;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100010058;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001000100010058;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ffac0a000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000200000001b;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000002000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffac0a000000;
+ __m128i_out = __lsx_vmaddwod_h_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000017fda829;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000017fda829;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff8000000000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000800000000ffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x697eba2bedfa9c82;
+ *((unsigned long *)&__m128i_op2[0]) = 0xd705c77a7025c899;
+ *((unsigned long *)&__m128i_result[1]) = 0xffcb410000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffeb827ffffffff;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fffffc00;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000200010;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000fffffc00;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000000000000f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000c5ac01015b;
+ *((unsigned long *)&__m128i_op1[0]) = 0xaaacac88a3a9a96a;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000000000000f;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7ef4002d21fc7001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x28bf02d1ec6a35b2;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffb96bffff57c9;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffff6080ffff4417;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff800000ff800000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xff8000007fc00000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7ef400ad21fc7081;
+ *((unsigned long *)&__m128i_result[0]) = 0x28bf0351ec69b5f2;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001200100012001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xbf8000000000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xcf00000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xbf80000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xcf00000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x1040400000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0961000100000001;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x03574e3a62407e03;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000001010000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7da9b23a624082fd;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffff0000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x03574e39e496cbc9;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000001010000;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0400040004000400;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xfffffffff8f8dada;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff01018888;
+ *((unsigned long *)&__m128i_result[1]) = 0x0400040004000400;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000030000003f;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x3f77aab500000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffc100010001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3f77aab500000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000ffc100010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0fbc1df53c1ae3f9;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ff820f81;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000020000020;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000020000020;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ff801c9e;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000810000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000700000004e000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0003000000012020;
+ *((unsigned long *)&__m128i_op1[1]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x003f0000ffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000e00a18f5;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000002023dcdc;
+ *((unsigned long *)&__m128i_result[1]) = 0x000700000004e000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0003000000012020;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000120000000d;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000e0000000e;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000011ffee;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000000dfff2;
+ __m128i_out = __lsx_vmaddwod_d_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffff7fffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffff8000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffff7fffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffff8000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000003fff;
+ *((unsigned long *)&__m128i_result[0]) = 0x7ff8010000000001;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ff000000ff00;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000ff000000ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000ff000000ff00;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000ff0000ff0000;
+ *((unsigned long *)&__m128i_result[0]) = 0x01fc020000fe0100;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x78c00000ff000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x78c00000ff000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x78c00000ff000000;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfefefefefefefefe;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfefefefefefefefe;
+ *((unsigned long *)&__m128i_op1[1]) = 0x1000100010001000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x1000100010001000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x1000100012030e02;
+ *((unsigned long *)&__m128i_result[1]) = 0xfefefefefefefefe;
+ *((unsigned long *)&__m128i_result[0]) = 0xfefefefefefefefe;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x010105017878f8f6;
+ *((unsigned long *)&__m128i_op2[0]) = 0xf8f8fd0180810907;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000080800000808;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000080800000808;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000158;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0001000100010058;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000158;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x328e1080889415a0;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3960b1a401811060;
+ *((unsigned long *)&__m128i_op1[1]) = 0x328e1080889415a0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x3960b1a401811060;
+ *((unsigned long *)&__m128i_op2[1]) = 0x020310edc003023d;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x32f3c7a38f9f4b8b;
+ *((unsigned long *)&__m128i_result[0]) = 0x2c9e5069f5d57780;
+ __m128i_out = __lsx_vmaddwod_q_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-2.c
new file mode 100644
index 000000000..4be7fce82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-2.c
@@ -0,0 +1,438 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xd8248069ffe78077;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0d0d0d0d0d0d0d0d;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xd8248069ffe78077;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xe31c86e90cda86f7;
+ __m128i_out = __lsx_vmaddwod_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00010020fffeffde;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0100400100200e68;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00010020fffeffde;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0100400100200e68;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x1ff85ffe2ae5d973;
+ *((unsigned long *)&__m128i_result[1]) = 0x00010020fffeffde;
+ *((unsigned long *)&__m128i_result[0]) = 0x011f57c100201a46;
+ __m128i_out = __lsx_vmaddwod_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xbafebb00ffd500fe;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0c0b0a090b0a0908;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0a09080709080706;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwod_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffc0800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffc0800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffc0800000;
+ __m128i_out = __lsx_vmaddwod_h_bu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000003a24;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003dbe88077c78c1;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0020002000200020;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000008;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0020002000200020;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000003a24;
+ *((unsigned long *)&__m128i_result[0]) = 0x003dc288077c7cc1;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffc0000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffc0000000000004;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000455555555;
+ *((unsigned long *)&__m128i_result[1]) = 0xffc0000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffc0000000000004;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000053a;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000020;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000036280001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x42a0000042a02001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000005555555554;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000005555555554;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000036280001;
+ *((unsigned long *)&__m128i_result[0]) = 0x42a0000042a02001;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000fe00ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000ff00fe;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000fe00ff;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffff946c;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffff946b;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff3c992b2e;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffff730f;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ffff946c;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffff946b;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffff946c;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffdffff946c;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000080000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000080000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000401000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000080000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000080000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffff800;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00ff000000ff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffff800;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff000000ff0000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0006ffff0004ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0002ffff0000ffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff7f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0002fffefffd0001;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffe000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000c6fde000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xe000e0006080b040;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffe000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000c6fde000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x021b7d24c9678a35;
+ *((unsigned long *)&__m128i_op1[0]) = 0x030298a6a1030a49;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000000a752a55;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0a753500950fa306;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000100000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000200000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x000000000a752a55;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0a753500950fa306;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000000a752a55;
+ *((unsigned long *)&__m128i_result[0]) = 0x0a753500a9fa0d06;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x4f4f4f4f4f4f4f4f;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4f4f4f4f4f4f4f4f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x4f4f4f4f4f4f4f4f;
+ *((unsigned long *)&__m128i_result[0]) = 0x4f4f4f4f4f4f4f4f;
+ __m128i_out = __lsx_vmaddwod_d_wu (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000017fda829;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00ffff0000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00ffff0000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x007f7f80807f7f80;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000020302030;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000020302030;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3fffffffc0000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0101010101010101;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffff0100000001;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffff0100000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000006e17bfd8;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000006e17bfd8;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000100000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[1]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x00010000fffffffc;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000004;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000000008000e2e3;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000008000e2e3;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000080806362;
+ *((unsigned long *)&__m128i_result[0]) = 0x807f808000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xfffffffffffffffa;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffffffa;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x8101010181010101;
+ *((unsigned long *)&__m128i_op1[0]) = 0x8101010181010101;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001000101010001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0001000101010015;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000ffed00010001;
+ __m128i_out = __lsx_vmaddwev_q_du (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-3.c
new file mode 100644
index 000000000..8a4c39502
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vmaddwod-3.c
@@ -0,0 +1,460 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+int
+main ()
+{
+ __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
+ __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
+ __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00003fe00ffe3fe0;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000b5207f80;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000b5207f80;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffe218ffffea10;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfffff208fffffa02;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000004;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000004;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xfffff208fffffa02;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffe218ffffea10;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffff208fffffa02;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000bd3d00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000bd3d00000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000bd3d00000000;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffff0000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0032000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x2020202020202020;
+ *((unsigned long *)&__m128i_op2[0]) = 0x2020202020207f7f;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000ffff0000;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00d3012acc56f9bb;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000000000a0;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000120002000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_result[1]) = 0x00d3012acc56f9bb;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000001021;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0002000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0002000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0002000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000014;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x4399d3221a29d3f2;
+ *((unsigned long *)&__m128i_op2[0]) = 0xc3818bffe7b7a7b8;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000467fe000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000003ff8;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000003ff8;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000467fef81;
+ __m128i_out = __lsx_vmaddwod_h_bu_b (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fc0000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x1e801ffc00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000000000000ffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ff020000fff4;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x7fc0000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x1e801ffc00000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x3c600000ff800000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfe80000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe80000000000001;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00007f7f00007f7f;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00ffffff03ffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffff00013fff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000088500000f6a0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0001fffd00000407;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000442900007b4c;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000e22b0000efa4;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ffffff03ffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffff00013fff;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x14ccc6320176a4d2;
+ *((unsigned long *)&__m128i_op0[0]) = 0x685670d37e80682a;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x14ccc6320176a4d2;
+ *((unsigned long *)&__m128i_result[0]) = 0x685670d37e80682a;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xc0411fe800000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x601fbfbeffffffff;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffc105d1aa;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffbc19ecca;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff0000ffff3efa;
+ *((unsigned long *)&__m128i_result[0]) = 0xffff0000ffff43e6;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffffffa7;
+ *((unsigned long *)&__m128i_op1[1]) = 0x00c2758000bccf42;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00a975be00accf03;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00c2758000bccf42;
+ *((unsigned long *)&__m128i_op2[0]) = 0x00a975be00accf03;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000930400008a10;
+ *((unsigned long *)&__m128i_result[0]) = 0x00006f9100007337;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_w_hu_h (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000ffff00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0010001000100010;
+ *((unsigned long *)&__m128i_op2[0]) = 0x001000100010c410;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff02ff1bff02ff23;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ffffff02fff4;
+ *((unsigned long *)&__m128i_op1[1]) = 0xff02ff1bff02ff23;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000ffffff02fff4;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7fc000007fc00000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x1e801ffc7fc00000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7e44bde9b842ff23;
+ *((unsigned long *)&__m128i_result[0]) = 0x00011e80007edff8;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xfffffffeffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xe0d56a9774f3ea31;
+ *((unsigned long *)&__m128i_op0[0]) = 0xe0dd268932a5edf9;
+ *((unsigned long *)&__m128i_op1[1]) = 0xe0d56a9774f3ea31;
+ *((unsigned long *)&__m128i_op1[0]) = 0xe0dd268932a5edf9;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xd8248069ffe78077;
+ *((unsigned long *)&__m128i_result[1]) = 0xe0d56a9774f3ea31;
+ *((unsigned long *)&__m128i_result[0]) = 0xbddaa86803e33c2a;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0028280000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0028280000282800;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x7505853d654185f5;
+ *((unsigned long *)&__m128i_op2[0]) = 0x01010000fefe0101;
+ *((unsigned long *)&__m128i_result[1]) = 0x0028280000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x012927ffff272800;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00ffff7f00ff00ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00ff007f0101017f;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000020000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000183fffffe5;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000073;
+ *((unsigned long *)&__m128i_op2[0]) = 0x000000000000002a;
+ *((unsigned long *)&__m128i_result[1]) = 0x00ffff7f00ff00ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x00ff007f0101017f;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000000002bfd9461;
+ *((unsigned long *)&__m128i_op2[1]) = 0x3f8000003f800001;
+ *((unsigned long *)&__m128i_op2[0]) = 0x3f8000003f800001;
+ *((unsigned long *)&__m128i_result[1]) = 0x3f8000003f800000;
+ *((unsigned long *)&__m128i_result[0]) = 0x3f8000003f800000;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000095896a760000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x006f0efe258ca851;
+ *((unsigned long *)&__m128i_op2[1]) = 0xffff7fc8ffff8000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xffff200000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000015516a768038;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffff9ed2e1c000;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000120002000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128i_op1[1]) = 0x2000200000013fa0;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000013fa0;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000120002000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100013fa0;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0080008000800080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0080006b00000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x001b19b1c9c6da5a;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x001b19b1c9c6da5a;
+ *((unsigned long *)&__m128i_result[1]) = 0x0080008000800080;
+ *((unsigned long *)&__m128i_result[0]) = 0x008003496dea0c61;
+ __m128i_out = __lsx_vmaddwod_d_wu_w (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000001ff000001ff;
+ *((unsigned long *)&__m128i_op2[1]) = 0xff80ffffffffffff;
+ *((unsigned long *)&__m128i_op2[0]) = 0x7ffffffeffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000002fe800000ff;
+ *((unsigned long *)&__m128i_result[0]) = 0x7ffffe0100000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff00000000000001;
+ *((unsigned long *)&__m128i_op1[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0xff80000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfe80000000000001;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op2[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_op2[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000080;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vmaddwev_q_du_d (__m128i_op0, __m128i_op1, __m128i_op2);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化