IntrinsicsNVVM.td 224 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673
  1. //===- IntrinsicsNVVM.td - Defines NVVM intrinsics ---------*- tablegen -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines all of the NVVM-specific intrinsics for use with NVPTX.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. // The following intrinsics were once defined here, but are now auto-upgraded
  13. // to target-generic LLVM intrinsics.
  14. //
  15. // * llvm.nvvm.brev32 --> llvm.bitreverse.i32
  16. // * llvm.nvvm.brev64 --> llvm.bitreverse.i64
  17. // * llvm.nvvm.clz.i --> llvm.ctlz.i32
  18. // * llvm.nvvm.clz.ll --> trunc i64 llvm.ctlz.i64(x) to i32
  19. // * llvm.nvvm.popc.i --> llvm.ctpop.i32
  20. // * llvm.nvvm.popc.ll --> trunc i64 llvm.ctpop.i64 to i32
  21. // * llvm.nvvm.abs.i --> select(x >= -x, x, -x)
  22. // * llvm.nvvm.abs.ll --> ibid.
  23. // * llvm.nvvm.max.i --> select(x sge y, x, y)
  24. // * llvm.nvvm.max.ll --> ibid.
  25. // * llvm.nvvm.max.ui --> select(x uge y, x, y)
  26. // * llvm.nvvm.max.ull --> ibid.
  27. // * llvm.nvvm.max.i --> select(x sle y, x, y)
  28. // * llvm.nvvm.max.ll --> ibid.
  29. // * llvm.nvvm.max.ui --> select(x ule y, x, y)
  30. // * llvm.nvvm.max.ull --> ibid.
  31. // * llvm.nvvm.h2f --> llvm.convert.to.fp16.f32
  32. def llvm_global_i8ptr_ty : LLVMQualPointerType<llvm_i8_ty, 1>; // (global)i8*
  33. def llvm_shared_i8ptr_ty : LLVMQualPointerType<llvm_i8_ty, 3>; // (shared)i8*
  34. def llvm_i64ptr_ty : LLVMPointerType<llvm_i64_ty>; // i64*
  35. def llvm_any_i64ptr_ty : LLVMAnyPointerType<llvm_i64_ty>; // (space)i64*
  36. def llvm_shared_i64ptr_ty : LLVMQualPointerType<llvm_i64_ty, 3>; // (shared)i64*
  37. //
  38. // MISC
  39. //
  40. // Helper class that represents a 'fragment' of an NVPTX *MMA instruction.
  41. // Geom: m<M>n<N>k<K>. E.g. m8n32k16
  42. // Frag: [a|b|c|d] ([x1|x2|x4] for ldmatrix)
  43. // PtxEltType: PTX type for the element.
  44. class WMMA_REGS<string Geom, string Frag, string PtxEltType> {
  45. string geom = Geom;
  46. string frag = Frag;
  47. string ptx_elt_type = PtxEltType;
  48. string gft = Geom#":"#Frag#":"#ptx_elt_type;
  49. string ft = frag#":"#ptx_elt_type;
  50. list<LLVMType> regs = !cond(
  51. // mma fp ops use smaller fragments than wmma fp ops
  52. !eq(gft,"m8n8k4:a:f16") : !listsplat(llvm_v2f16_ty, 2),
  53. !eq(gft,"m8n8k4:b:f16") : !listsplat(llvm_v2f16_ty, 2),
  54. !eq(gft,"m16n8k8:a:f16") : !listsplat(llvm_v2f16_ty, 2),
  55. !eq(gft,"m16n8k8:b:f16") : [llvm_v2f16_ty],
  56. !eq(gft,"m16n8k8:c:f16") : !listsplat(llvm_v2f16_ty, 2),
  57. !eq(gft,"m16n8k8:d:f16") : !listsplat(llvm_v2f16_ty, 2),
  58. !eq(gft,"m16n8k8:c:f32") : !listsplat(llvm_float_ty, 4),
  59. !eq(gft,"m16n8k8:d:f32") : !listsplat(llvm_float_ty, 4),
  60. !eq(gft,"m16n8k16:a:f16") : !listsplat(llvm_v2f16_ty, 4),
  61. !eq(gft,"m16n8k16:b:f16") : !listsplat(llvm_v2f16_ty, 2),
  62. !eq(gft,"m16n8k16:c:f16") : !listsplat(llvm_v2f16_ty, 2),
  63. !eq(gft,"m16n8k16:d:f16") : !listsplat(llvm_v2f16_ty, 2),
  64. !eq(gft,"m16n8k16:c:f32") : !listsplat(llvm_float_ty, 4),
  65. !eq(gft,"m16n8k16:d:f32") : !listsplat(llvm_float_ty, 4),
  66. !eq(gft,"m16n8k4:c:f32") : !listsplat(llvm_float_ty, 4),
  67. !eq(gft,"m16n8k4:d:f32") : !listsplat(llvm_float_ty, 4),
  68. // wmma fp16 -> fp16/fp32 @ m16n16k16/m8n32k16/m32n8k16
  69. // All other supported geometries use the same fragment format for f32 and
  70. // f16, so we only need to consider {fragment, type}.
  71. !eq(ft,"a:f16") : !listsplat(llvm_v2f16_ty, 8),
  72. !eq(ft,"b:f16") : !listsplat(llvm_v2f16_ty, 8),
  73. !eq(ft,"c:f16") : !listsplat(llvm_v2f16_ty, 4),
  74. !eq(ft,"d:f16") : !listsplat(llvm_v2f16_ty, 4),
  75. !eq(ft,"c:f32") : !listsplat(llvm_float_ty, 8),
  76. !eq(ft,"d:f32") : !listsplat(llvm_float_ty, 8),
  77. // wmma tf32 -> s32 @ m16n16k8
  78. !eq(gft,"m16n16k8:a:tf32") : !listsplat(llvm_i32_ty, 4),
  79. !eq(gft,"m16n16k8:b:tf32") : !listsplat(llvm_i32_ty, 4),
  80. // mma tf32 -> s32 @ m16n16k8/m16n8k8
  81. !eq(gft,"m16n8k4:a:tf32") : !listsplat(llvm_i32_ty, 2),
  82. !eq(gft,"m16n8k4:b:tf32") : [llvm_i32_ty],
  83. !eq(gft,"m16n8k8:a:tf32") : !listsplat(llvm_i32_ty, 4),
  84. !eq(gft,"m16n8k8:b:tf32") : !listsplat(llvm_i32_ty, 2),
  85. !eq(gft,"m8n8k4:a:f64") : [llvm_double_ty],
  86. !eq(gft,"m8n8k4:b:f64") : [llvm_double_ty],
  87. !eq(gft,"m8n8k4:c:f64") : !listsplat(llvm_double_ty, 2),
  88. !eq(gft,"m8n8k4:d:f64") : !listsplat(llvm_double_ty, 2),
  89. // wmma bf16 -> s32 @ m16n16k16/m8n32k16/m32n8k16
  90. !eq(gft,"m16n16k16:a:bf16") : !listsplat(llvm_i32_ty, 4),
  91. !eq(gft,"m16n16k16:b:bf16") : !listsplat(llvm_i32_ty, 4),
  92. !eq(gft,"m8n32k16:a:bf16") : !listsplat(llvm_i32_ty, 2),
  93. !eq(gft,"m8n32k16:b:bf16") : !listsplat(llvm_i32_ty, 8),
  94. !eq(gft,"m32n8k16:a:bf16") : !listsplat(llvm_i32_ty, 8),
  95. !eq(gft,"m32n8k16:b:bf16") : !listsplat(llvm_i32_ty, 2),
  96. // mma bf16 -> s32 @ m16n8k16/m16n8k8
  97. !eq(gft,"m16n8k16:a:bf16") : !listsplat(llvm_i32_ty, 4),
  98. !eq(gft,"m16n8k16:b:bf16") : !listsplat(llvm_i32_ty, 2),
  99. !eq(gft,"m16n8k8:a:bf16") : !listsplat(llvm_i32_ty, 2),
  100. !eq(gft,"m16n8k8:b:bf16") : [llvm_i32_ty],
  101. // wmma u8/s8 -> s32 @ m16n16k16/m8n32k16/m32n8k16
  102. !eq(gft,"m16n16k16:a:u8") : !listsplat(llvm_i32_ty, 2),
  103. !eq(gft,"m16n16k16:a:s8") : !listsplat(llvm_i32_ty, 2),
  104. !eq(gft,"m16n16k16:b:u8") : !listsplat(llvm_i32_ty, 2),
  105. !eq(gft,"m16n16k16:b:s8") : !listsplat(llvm_i32_ty, 2),
  106. !eq(gft,"m16n16k16:c:s32") : !listsplat(llvm_i32_ty, 8),
  107. !eq(gft,"m16n16k16:d:s32") : !listsplat(llvm_i32_ty, 8),
  108. !eq(gft,"m8n32k16:a:u8") : [llvm_i32_ty],
  109. !eq(gft,"m8n32k16:a:s8") : [llvm_i32_ty],
  110. !eq(gft,"m8n32k16:b:u8") : !listsplat(llvm_i32_ty, 4),
  111. !eq(gft,"m8n32k16:b:s8") : !listsplat(llvm_i32_ty, 4),
  112. !eq(gft,"m8n32k16:c:s32") : !listsplat(llvm_i32_ty, 8),
  113. !eq(gft,"m8n32k16:d:s32") : !listsplat(llvm_i32_ty, 8),
  114. !eq(gft,"m32n8k16:a:u8") : !listsplat(llvm_i32_ty, 4),
  115. !eq(gft,"m32n8k16:a:s8") : !listsplat(llvm_i32_ty, 4),
  116. !eq(gft,"m32n8k16:b:u8") : [llvm_i32_ty],
  117. !eq(gft,"m32n8k16:b:s8") : [llvm_i32_ty],
  118. !eq(gft,"m32n8k16:c:s32") : !listsplat(llvm_i32_ty, 8),
  119. !eq(gft,"m32n8k16:d:s32") : !listsplat(llvm_i32_ty, 8),
  120. // mma u8/s8 -> s32 @ m8n8k16/m16n8k16/m16n8k32
  121. !eq(gft,"m8n8k16:a:u8") : [llvm_i32_ty],
  122. !eq(gft,"m8n8k16:a:s8") : [llvm_i32_ty],
  123. !eq(gft,"m8n8k16:b:u8") : [llvm_i32_ty],
  124. !eq(gft,"m8n8k16:b:s8") : [llvm_i32_ty],
  125. !eq(gft,"m8n8k16:c:s32") : !listsplat(llvm_i32_ty, 2),
  126. !eq(gft,"m8n8k16:d:s32") : !listsplat(llvm_i32_ty, 2),
  127. !eq(gft,"m16n8k16:a:u8") : !listsplat(llvm_i32_ty, 2),
  128. !eq(gft,"m16n8k16:a:s8") : !listsplat(llvm_i32_ty, 2),
  129. !eq(gft,"m16n8k16:b:u8") : [llvm_i32_ty],
  130. !eq(gft,"m16n8k16:b:s8") : [llvm_i32_ty],
  131. !eq(gft,"m16n8k16:c:s32") : !listsplat(llvm_i32_ty, 4),
  132. !eq(gft,"m16n8k16:d:s32") : !listsplat(llvm_i32_ty, 4),
  133. !eq(gft,"m16n8k32:a:u8") : !listsplat(llvm_i32_ty, 4),
  134. !eq(gft,"m16n8k32:a:s8") : !listsplat(llvm_i32_ty, 4),
  135. !eq(gft,"m16n8k32:b:u8") : !listsplat(llvm_i32_ty, 2),
  136. !eq(gft,"m16n8k32:b:s8") : !listsplat(llvm_i32_ty, 2),
  137. !eq(gft,"m16n8k32:c:s32") : !listsplat(llvm_i32_ty, 4),
  138. !eq(gft,"m16n8k32:d:s32") : !listsplat(llvm_i32_ty, 4),
  139. // wmma/mma u4/s4 -> s32 @ m8n8k32 (u4/s4)
  140. !eq(gft,"m8n8k32:a:u4") : [llvm_i32_ty],
  141. !eq(gft,"m8n8k32:a:s4") : [llvm_i32_ty],
  142. !eq(gft,"m8n8k32:b:u4") : [llvm_i32_ty],
  143. !eq(gft,"m8n8k32:b:s4") : [llvm_i32_ty],
  144. !eq(gft,"m8n8k32:c:s32") : !listsplat(llvm_i32_ty, 2),
  145. !eq(gft,"m8n8k32:d:s32") : !listsplat(llvm_i32_ty, 2),
  146. !eq(gft,"m16n8k32:a:u4") : !listsplat(llvm_i32_ty, 2),
  147. !eq(gft,"m16n8k32:a:s4") : !listsplat(llvm_i32_ty, 2),
  148. !eq(gft,"m16n8k32:b:u4") : [llvm_i32_ty],
  149. !eq(gft,"m16n8k32:b:s4") : [llvm_i32_ty],
  150. !eq(gft,"m16n8k32:c:s32") : !listsplat(llvm_i32_ty, 4),
  151. !eq(gft,"m16n8k32:d:s32") : !listsplat(llvm_i32_ty, 4),
  152. !eq(gft,"m16n8k64:a:u4") : !listsplat(llvm_i32_ty, 4),
  153. !eq(gft,"m16n8k64:a:s4") : !listsplat(llvm_i32_ty, 4),
  154. !eq(gft,"m16n8k64:b:u4") : !listsplat(llvm_i32_ty, 2),
  155. !eq(gft,"m16n8k64:b:s4") : !listsplat(llvm_i32_ty, 2),
  156. !eq(gft,"m16n8k64:c:s32") : !listsplat(llvm_i32_ty, 4),
  157. !eq(gft,"m16n8k64:d:s32") : !listsplat(llvm_i32_ty, 4),
  158. // wmma/mma b1 -> s32 @ m8n8k128(b1)
  159. !eq(gft,"m8n8k128:a:b1") : [llvm_i32_ty],
  160. !eq(gft,"m8n8k128:b:b1") : [llvm_i32_ty],
  161. !eq(gft,"m8n8k128:c:s32") : !listsplat(llvm_i32_ty, 2),
  162. !eq(gft,"m8n8k128:d:s32") : !listsplat(llvm_i32_ty, 2),
  163. !eq(gft,"m16n8k128:a:b1") : !listsplat(llvm_i32_ty, 2),
  164. !eq(gft,"m16n8k128:b:b1") : [llvm_i32_ty],
  165. !eq(gft,"m16n8k128:c:s32") : !listsplat(llvm_i32_ty, 4),
  166. !eq(gft,"m16n8k128:d:s32") : !listsplat(llvm_i32_ty, 4),
  167. !eq(gft,"m16n8k256:a:b1") : !listsplat(llvm_i32_ty, 4),
  168. !eq(gft,"m16n8k256:b:b1") : !listsplat(llvm_i32_ty, 2),
  169. !eq(gft,"m16n8k256:c:s32") : !listsplat(llvm_i32_ty, 4),
  170. !eq(gft,"m16n8k256:d:s32") : !listsplat(llvm_i32_ty, 4),
  171. // ldmatrix b16 -> s32 @ m8n8
  172. !eq(gft,"m8n8:x1:b16") : !listsplat(llvm_i32_ty, 1),
  173. !eq(gft,"m8n8:x2:b16") : !listsplat(llvm_i32_ty, 2),
  174. !eq(gft,"m8n8:x4:b16") : !listsplat(llvm_i32_ty, 4),
  175. );
  176. }
  177. class WMMA_NAME_LDST<string Op, WMMA_REGS Frag, string Layout, int WithStride> {
  178. string intr = "llvm.nvvm.wmma."
  179. # Frag.geom
  180. # "." # Op
  181. # "." # Frag.frag
  182. # "." # Layout
  183. # !if(WithStride, ".stride", "")
  184. # "." # Frag.ptx_elt_type
  185. ;
  186. // TODO(tra): record name should ideally use the same field order as the intrinsic.
  187. // E.g. string record = !subst("llvm", "int",
  188. // !subst(".", "_", llvm));
  189. string record = "int_nvvm_wmma_"
  190. # Frag.geom
  191. # "_" # Op
  192. # "_" # Frag.frag
  193. # "_" # Frag.ptx_elt_type
  194. # "_" # Layout
  195. # !if(WithStride, "_stride", "");
  196. }
  197. class MMA_SIGNATURE<WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
  198. list<WMMA_REGS> id_frags = !cond(
  199. // FP16 ops are identified by accumulator & result type.
  200. !eq(A.ptx_elt_type, "f16") : [D, C],
  201. // other ops are identified by input types.
  202. !ne(A.ptx_elt_type, B.ptx_elt_type): [A, B],
  203. true: [A]
  204. );
  205. string ret = !foldl("", id_frags, a, b, !strconcat(a, ".", b.ptx_elt_type));
  206. }
  207. class WMMA_NAME<string ALayout, string BLayout, int Satfinite, string Rnd, string b1op,
  208. WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
  209. string signature = MMA_SIGNATURE<A, B, C, D>.ret;
  210. string llvm = "llvm.nvvm.wmma."
  211. # A.geom
  212. # ".mma"
  213. # b1op
  214. # "." # ALayout
  215. # "." # BLayout
  216. # !if(!ne(Rnd, ""), !strconcat(".", Rnd), "")
  217. # signature
  218. # !if(Satfinite, ".satfinite", "");
  219. string record = !subst(".", "_",
  220. !subst("llvm.", "int_", llvm));
  221. }
  222. class MMA_NAME<string ALayout, string BLayout, int Satfinite, string b1op,
  223. WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
  224. string signature = MMA_SIGNATURE<A, B, C, D>.ret;
  225. string llvm = "llvm.nvvm.mma"
  226. # b1op
  227. # "." # A.geom
  228. # "." # ALayout
  229. # "." # BLayout
  230. # !if(Satfinite, ".satfinite", "")
  231. # signature;
  232. string record = !subst(".", "_",
  233. !subst("llvm.", "int_", llvm));
  234. }
  235. class LDMATRIX_NAME<WMMA_REGS Frag, int Trans> {
  236. string intr = "llvm.nvvm.ldmatrix.sync.aligned"
  237. # "." # Frag.geom
  238. # "." # Frag.frag
  239. # !if(Trans, ".trans", "")
  240. # "." # Frag.ptx_elt_type
  241. ;
  242. string record = !subst(".", "_",
  243. !subst("llvm.", "int_", intr));
  244. }
  245. // Generates list of 4-tuples of WMMA_REGS representing a valid MMA op.
  246. // Geom: list of supported geometries.
  247. // TypeN: PTX type of the corresponding fragment's element.
  248. // TypeB and TypeD may be empty if it must match that of TypeA or TypeC.
  249. class MMA_OPS<list<string> Geom, list<string> TypeA, list<string> TypeB,
  250. list<string> TypeC, list<string> TypeD> {
  251. list<list<WMMA_REGS>> ret =
  252. !foldl([]<list<WMMA_REGS>>, Geom, t1, geom, !listconcat(t1,
  253. !foldl([]<list<WMMA_REGS>>, TypeA, t2, type_a, !listconcat(t2,
  254. !foldl([]<list<WMMA_REGS>>, !if(!size(TypeB), TypeB, [type_a]), t3, type_b, !listconcat(t3,
  255. !foldl([]<list<WMMA_REGS>>, TypeC, t4, type_c, !listconcat(t4,
  256. !foldl([]<list<WMMA_REGS>>, !if(!size(TypeD), TypeD, [type_c]), t5, type_d, !listconcat(t5,
  257. [[WMMA_REGS<geom, "a", type_a>,
  258. WMMA_REGS<geom, "b", type_b>,
  259. WMMA_REGS<geom, "c", type_c>,
  260. WMMA_REGS<geom, "d", type_d>]]))))))))));
  261. // Debugging aid for readable representation of the list above.
  262. list<list<string>> ops = !foreach(x, ret, [x[0].gft, x[1].gft, x[2].gft, x[3].gft]);
  263. }
  264. class MMA_LDST_OPS<list<string> Geom, list<string> Frags, list<string> Types> {
  265. list<WMMA_REGS> ret =
  266. !foldl([]<WMMA_REGS>, Geom, t1, geom, !listconcat(t1,
  267. !foldl([]<WMMA_REGS>, Frags, t2, frag, !listconcat(t2,
  268. !foldl([]<WMMA_REGS>, Types, t3, type, !listconcat(t3,
  269. [WMMA_REGS<geom, frag, type>]))))));
  270. // Debugging aid for readable representation of the list above.
  271. list<string> ops = !foreach(x, ret, x.gft);
  272. }
  273. class LDMATRIX_OPS<list<string> Geom, list<string> Frags, list<string> Types> {
  274. list<WMMA_REGS> ret =
  275. !foldl([]<WMMA_REGS>, Geom, t1, geom, !listconcat(t1,
  276. !foldl([]<WMMA_REGS>, Frags, t2, frag, !listconcat(t2,
  277. !foldl([]<WMMA_REGS>, Types, t3, type, !listconcat(t3,
  278. [WMMA_REGS<geom, frag, type>]))))));
  279. // Debugging aid for readable representation of the list above.
  280. list<string> ops = !foreach(x, ret, x.gft);
  281. }
  282. // Creates list of valid combinations of fragments. This is the main list that
  283. // drives generation of corresponding intrinsics and instructions.
  284. class NVVM_MMA_OPS {
  285. list<list<WMMA_REGS>> tf32_wmma_ops = MMA_OPS<
  286. ["m16n16k8"],
  287. ["tf32"], [], ["f32"], []>.ret;
  288. list<list<WMMA_REGS>> bf16_wmma_ops = MMA_OPS<
  289. ["m16n16k16", "m32n8k16", "m8n32k16"],
  290. ["bf16"], [], ["f32"], []>.ret;
  291. list<list<WMMA_REGS>> f64_wmma_ops = MMA_OPS<
  292. ["m8n8k4"],
  293. ["f64"], [], ["f64"], []>.ret;
  294. list<list<WMMA_REGS>> fp_wmma_ops = MMA_OPS<
  295. ["m16n16k16", "m32n8k16", "m8n32k16"],
  296. ["f16"], [], ["f16", "f32"], ["f16", "f32"]>.ret;
  297. list<list<WMMA_REGS>> int_wmma_ops = MMA_OPS<
  298. ["m16n16k16", "m32n8k16", "m8n32k16"],
  299. ["s8", "u8"], [], ["s32"], []>.ret;
  300. list<list<WMMA_REGS>> subint_wmma_ops = MMA_OPS<
  301. ["m8n8k32"],
  302. ["s4", "u4"], [], ["s32"], []>.ret;
  303. list<list<WMMA_REGS>> bit_wmma_ops = MMA_OPS<
  304. ["m8n8k128"],
  305. ["b1"], [], ["s32"], []>.ret;
  306. list<list<WMMA_REGS>> all_wmma_ops = !listconcat(
  307. tf32_wmma_ops, bf16_wmma_ops, f64_wmma_ops,
  308. fp_wmma_ops, int_wmma_ops, subint_wmma_ops, bit_wmma_ops);
  309. list<list<WMMA_REGS>> tf32_mma_ops = MMA_OPS<
  310. ["m16n8k4", "m16n8k8"],
  311. ["tf32"], [], ["f32"], []>.ret;
  312. list<list<WMMA_REGS>> bf16_mma_ops = MMA_OPS<
  313. ["m16n8k16", "m16n8k8"],
  314. ["bf16"], [], ["f32"], []>.ret;
  315. list<list<WMMA_REGS>> f64_mma_ops = MMA_OPS<
  316. ["m8n8k4"],
  317. ["f64"], [], ["f64"], []>.ret;
  318. list<list<WMMA_REGS>> fp_mma_ops = MMA_OPS<
  319. ["m8n8k4", "m16n8k8", "m16n8k16"],
  320. ["f16"], [], ["f16", "f32"], ["f16", "f32"]>.ret;
  321. list<list<WMMA_REGS>> int_mma_ops = MMA_OPS<
  322. ["m8n8k16", "m16n8k16", "m16n8k32"],
  323. ["s8", "u8"], ["s8", "u8"], ["s32"], []>.ret;
  324. list<list<WMMA_REGS>> subint_mma_ops = MMA_OPS<
  325. ["m8n8k32", "m16n8k32", "m16n8k64"],
  326. ["s4", "u4"], ["s4", "u4"], ["s32"], []>.ret;
  327. list<list<WMMA_REGS>> bit_mma_ops = MMA_OPS<
  328. ["m8n8k128", "m16n8k128", "m16n8k256"],
  329. ["b1"], [], ["s32"], []>.ret;
  330. list<list<WMMA_REGS>> all_mma_ops = !listconcat(
  331. tf32_mma_ops, bf16_mma_ops, f64_mma_ops,
  332. fp_mma_ops, int_mma_ops, subint_mma_ops, bit_mma_ops);
  333. list<WMMA_REGS> ldst_ab_ops = MMA_LDST_OPS<
  334. ["m16n16k16", "m32n8k16", "m8n32k16"],
  335. ["a", "b"], ["f16", "u8", "s8", "bf16"]>.ret;
  336. list<WMMA_REGS> ldst_cd_ops = MMA_LDST_OPS<
  337. ["m16n16k16", "m32n8k16", "m8n32k16"],
  338. ["c", "d"], ["f16", "f32", "s32"]>.ret;
  339. list<WMMA_REGS> ldst_tf32_ab_ops = MMA_LDST_OPS<
  340. ["m16n16k8"],
  341. ["a", "b"], ["tf32"]>.ret;
  342. list<WMMA_REGS> ldst_tf32_cd_ops = MMA_LDST_OPS<
  343. ["m16n16k8"],
  344. ["c", "d"], ["f32"]>.ret;
  345. list<WMMA_REGS> ldst_f64_abcd_ops = MMA_LDST_OPS<
  346. ["m8n8k4"],
  347. ["a", "b", "c", "d"], ["f64"]>.ret;
  348. list<WMMA_REGS> ldst_subint_ab_ops = MMA_LDST_OPS<
  349. ["m8n8k32"], ["a", "b"], ["s4","u4"]>.ret;
  350. list<WMMA_REGS> ldst_bit_ab_ops = MMA_LDST_OPS<
  351. ["m8n8k128"], ["a", "b"], ["b1"]>.ret;
  352. list<WMMA_REGS> ldst_subint_cd_ops = MMA_LDST_OPS<
  353. ["m8n8k32", "m8n8k128"], ["c", "d"], ["s32"]>.ret;
  354. list<WMMA_REGS> all_ldst_ops = !listconcat(ldst_ab_ops, ldst_cd_ops,
  355. ldst_tf32_ab_ops,
  356. ldst_tf32_cd_ops,
  357. ldst_f64_abcd_ops,
  358. ldst_subint_ab_ops,
  359. ldst_bit_ab_ops,
  360. ldst_subint_cd_ops);
  361. // Separate A/B/C fragments (loads) from D (stores).
  362. list<WMMA_REGS> all_ld_ops = !filter(op, all_ldst_ops, !ne(op.frag, "d"));
  363. list<WMMA_REGS> all_st_ops = !filter(op, all_ldst_ops, !eq(op.frag, "d"));
  364. list<WMMA_REGS> ldmatrix_b16_ops = LDMATRIX_OPS<
  365. ["m8n8"], ["x1", "x2", "x4"], ["b16"]>.ret;
  366. list<WMMA_REGS> all_ldmatrix_ops = ldmatrix_b16_ops;
  367. }
  368. def NVVM_MMA_OPS : NVVM_MMA_OPS;
  369. // Returns true if this combination of fragment and layout for WMMA load/store
  370. // ops is supported; false otherwise.
  371. // E.g.
  372. // if NVVM_WMMA_LDST_SUPPORTED<...>.ret then
  373. // def : FOO<>; // The record will only be defined for supported ops.
  374. //
  375. class NVVM_WMMA_LDST_SUPPORTED<WMMA_REGS frag, string layout> {
  376. string f = frag.frag;
  377. string t = frag.ptx_elt_type;
  378. bit ret = !cond(
  379. // Sub-int load and store requires A fragment to be of row layout and B
  380. // fragments to be of column layout.
  381. !and(!or(!eq(t, "b1"),
  382. !eq(t, "u4"),
  383. !eq(t, "s4")),
  384. !or(!and(!eq(f, "a"),
  385. !ne(layout, "row")),
  386. !and(!eq(f, "b"),
  387. !ne(layout, "col")))) : false,
  388. true: true
  389. );
  390. }
  391. // Returns true if this combination of layout/satf/rnd for WMMA ops is
  392. // supported; false otherwise.
  393. // E.g.
  394. // if NVVM_WMMA_SUPPORTED<...>.ret then
  395. // def : FOO<>; // The record will only be defined for supported ops.
  396. //
  397. class NVVM_WMMA_SUPPORTED<list<WMMA_REGS> frags, string layout_a, string layout_b, int satf, string rnd> {
  398. // WMMA ops check both layouts.
  399. string layout = layout_a # ":" # layout_b;
  400. string t = frags[0].ptx_elt_type;
  401. bit ret = !cond(
  402. // only f64 wmma functions support rnd options
  403. // any non f64 type that uses a rnd value is invalid
  404. !and(!ne(t, "f64"), !ne(rnd, "")) : false,
  405. // satf is only valid for select types
  406. !and(!eq(satf, 1),
  407. !ne(t, "s8"),
  408. !ne(t, "u8"),
  409. !ne(t, "s4"),
  410. !ne(t, "u4"),
  411. !ne(t, "f16")): false,
  412. // Sub-int wmma requires row/column layout
  413. !and(!or(!eq(t, "s4"),
  414. !eq(t, "u4"),
  415. !eq(t, "b1")),
  416. !ne(layout, "row:col")) : false,
  417. true: true
  418. );
  419. }
  420. class NVVM_MMA_B1OPS<list<WMMA_REGS> frags> {
  421. list<string> ret = !cond(
  422. !eq(frags[0].ptx_elt_type, "b1") : [".xor.popc", ".and.popc"],
  423. true: [""]
  424. );
  425. }
  426. // Returns true if this combination of layout/satf for MMA ops is supported;
  427. // false otherwise.
  428. // E.g.
  429. // if NVVM_MMA_SUPPORTED<...>.ret then
  430. // def : FOO<>; // The record will only be defined for supported ops.
  431. //
  432. class NVVM_MMA_SUPPORTED<list<WMMA_REGS> frags, string layout_a, string layout_b, int satf> {
  433. // MMA ops check both layouts.
  434. string layout = layout_a # ":" # layout_b;
  435. string a_type = frags[0].ptx_elt_type;
  436. string b_type = frags[1].ptx_elt_type;
  437. string c_type = frags[2].ptx_elt_type;
  438. string d_type = frags[3].ptx_elt_type;
  439. string geom = frags[0].geom;
  440. // gcd is a shortcut used to identify instructions that depend on
  441. // geom+frag_c+frag_d.
  442. string gcd = geom # ":" # c_type # d_type;
  443. bit ret = !cond(
  444. // Limit satf to valid types
  445. !and(!eq(satf, 1),
  446. !ne(a_type, "s8"),
  447. !ne(a_type, "u8"),
  448. !ne(a_type, "s4"),
  449. !ne(a_type, "u4")): false,
  450. // m8n8k4 has no C=f32 D=f16 variant.
  451. !eq(gcd, "m8n8k4:f32f16"): false,
  452. // only m8n8k4 for f16 does not require row:col layout
  453. !and(!ne(layout, "row:col"),
  454. !or(!ne(geom, "m8n8k4"),
  455. !ne(a_type, "f16"))) : false,
  456. // m16n8k8 requires A and B to be the same type and C and D to be the same
  457. // type.
  458. !and(!eq(geom, "m16n8k8"),
  459. !or(!ne(a_type, b_type),
  460. !ne(c_type, d_type))): false,
  461. // m16n8k8 requires C and D to be the same type.
  462. !and(!eq(geom, "m16n8k8"),
  463. !ne(c_type, d_type)): false,
  464. // All other are OK.
  465. true: true
  466. );
  467. }
  468. // Returns true if the fragment is valid for ldmatrix ops is supported;
  469. // false otherwise.
  470. // E.g.
  471. // if NVVM_LDMATRIX_SUPPORTED<...>.ret then
  472. // def : FOO<>; // The record will only be defined for supported ops.
  473. //
  474. class NVVM_LDMATRIX_SUPPORTED<WMMA_REGS frag> {
  475. string g = frag.geom;
  476. string t = frag.ptx_elt_type;
  477. bit ret = !cond(
  478. // Only currently support m8n8 and b16
  479. !and(!eq(g, "m8n8"), !eq(t, "b16")): true,
  480. true: false
  481. );
  482. }
  483. class SHFL_INFO<bit sync, string mode, string type, bit return_pred> {
  484. string Suffix = !if(sync, "sync_", "")
  485. # mode # "_"
  486. # type
  487. # !if(return_pred, "p", "");
  488. string Name = "int_nvvm_shfl_" # Suffix;
  489. string Builtin = "__nvvm_shfl_" # Suffix;
  490. string IntrName = "llvm.nvvm.shfl." # !subst("_",".", Suffix);
  491. bit withGccBuiltin = !not(return_pred);
  492. bit withoutGccBuiltin = return_pred;
  493. LLVMType OpType = !cond(
  494. !eq(type,"i32"): llvm_i32_ty,
  495. !eq(type,"f32"): llvm_float_ty);
  496. list<LLVMType> RetTy = !if(return_pred, [OpType, llvm_i1_ty], [OpType]);
  497. list<LLVMType> ArgsTy = !if(sync,
  498. [llvm_i32_ty, OpType, llvm_i32_ty, llvm_i32_ty],
  499. [OpType, llvm_i32_ty, llvm_i32_ty]);
  500. }
  501. let TargetPrefix = "nvvm" in {
  502. def int_nvvm_prmt : ClangBuiltin<"__nvvm_prmt">,
  503. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  504. [IntrNoMem, IntrSpeculatable]>;
  505. //
  506. // Min Max
  507. //
  508. foreach operation = ["min", "max"] in {
  509. def int_nvvm_f # operation # _d :
  510. ClangBuiltin<!strconcat("__nvvm_f", operation, "_d")>,
  511. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  512. [IntrNoMem, IntrSpeculatable, Commutative]>;
  513. foreach variant = ["_f", "_ftz_f", "_nan_f", "_ftz_nan_f",
  514. "_xorsign_abs_f", "_ftz_xorsign_abs_f", "_nan_xorsign_abs_f",
  515. "_ftz_nan_xorsign_abs_f"] in {
  516. def int_nvvm_f # operation # variant :
  517. ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
  518. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  519. [IntrNoMem, IntrSpeculatable, Commutative]>;
  520. }
  521. foreach variant = ["_f16", "_ftz_f16", "_nan_f16", "_ftz_nan_f16",
  522. "_xorsign_abs_f16", "_ftz_xorsign_abs_f16", "_nan_xorsign_abs_f16",
  523. "_ftz_nan_xorsign_abs_f16"] in {
  524. def int_nvvm_f # operation # variant :
  525. ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
  526. DefaultAttrsIntrinsic<[llvm_half_ty], [llvm_half_ty, llvm_half_ty],
  527. [IntrNoMem, IntrSpeculatable, Commutative]>;
  528. }
  529. foreach variant = ["_f16x2", "_ftz_f16x2", "_nan_f16x2",
  530. "_ftz_nan_f16x2", "_xorsign_abs_f16x2", "_ftz_xorsign_abs_f16x2",
  531. "_nan_xorsign_abs_f16x2", "_ftz_nan_xorsign_abs_f16x2"] in {
  532. def int_nvvm_f # operation # variant :
  533. ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
  534. DefaultAttrsIntrinsic<[llvm_v2f16_ty], [llvm_v2f16_ty, llvm_v2f16_ty],
  535. [IntrNoMem, IntrSpeculatable, Commutative]>;
  536. }
  537. foreach variant = ["_bf16", "_nan_bf16", "_xorsign_abs_bf16",
  538. "_nan_xorsign_abs_bf16"] in {
  539. def int_nvvm_f # operation # variant :
  540. ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
  541. DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty],
  542. [IntrNoMem, IntrSpeculatable, Commutative]>;
  543. }
  544. foreach variant = ["_bf16x2", "_nan_bf16x2", "_xorsign_abs_bf16x2",
  545. "_nan_xorsign_abs_bf16x2"] in {
  546. def int_nvvm_f # operation # variant :
  547. ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
  548. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  549. [IntrNoMem, IntrSpeculatable, Commutative]>;
  550. }
  551. }
  552. //
  553. // Multiplication
  554. //
  555. def int_nvvm_mulhi_i : ClangBuiltin<"__nvvm_mulhi_i">,
  556. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  557. [IntrNoMem, IntrSpeculatable, Commutative]>;
  558. def int_nvvm_mulhi_ui : ClangBuiltin<"__nvvm_mulhi_ui">,
  559. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  560. [IntrNoMem, IntrSpeculatable, Commutative]>;
  561. def int_nvvm_mulhi_ll : ClangBuiltin<"__nvvm_mulhi_ll">,
  562. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
  563. [IntrNoMem, IntrSpeculatable, Commutative]>;
  564. def int_nvvm_mulhi_ull : ClangBuiltin<"__nvvm_mulhi_ull">,
  565. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
  566. [IntrNoMem, IntrSpeculatable, Commutative]>;
  567. def int_nvvm_mul_rn_ftz_f : ClangBuiltin<"__nvvm_mul_rn_ftz_f">,
  568. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  569. [IntrNoMem, IntrSpeculatable, Commutative]>;
  570. def int_nvvm_mul_rn_f : ClangBuiltin<"__nvvm_mul_rn_f">,
  571. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  572. [IntrNoMem, IntrSpeculatable, Commutative]>;
  573. def int_nvvm_mul_rz_ftz_f : ClangBuiltin<"__nvvm_mul_rz_ftz_f">,
  574. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  575. [IntrNoMem, IntrSpeculatable, Commutative]>;
  576. def int_nvvm_mul_rz_f : ClangBuiltin<"__nvvm_mul_rz_f">,
  577. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  578. [IntrNoMem, IntrSpeculatable, Commutative]>;
  579. def int_nvvm_mul_rm_ftz_f : ClangBuiltin<"__nvvm_mul_rm_ftz_f">,
  580. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  581. [IntrNoMem, IntrSpeculatable, Commutative]>;
  582. def int_nvvm_mul_rm_f : ClangBuiltin<"__nvvm_mul_rm_f">,
  583. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  584. [IntrNoMem, IntrSpeculatable, Commutative]>;
  585. def int_nvvm_mul_rp_ftz_f : ClangBuiltin<"__nvvm_mul_rp_ftz_f">,
  586. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  587. [IntrNoMem, IntrSpeculatable, Commutative]>;
  588. def int_nvvm_mul_rp_f : ClangBuiltin<"__nvvm_mul_rp_f">,
  589. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  590. [IntrNoMem, IntrSpeculatable, Commutative]>;
  591. def int_nvvm_mul_rn_d : ClangBuiltin<"__nvvm_mul_rn_d">,
  592. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  593. [IntrNoMem, IntrSpeculatable, Commutative]>;
  594. def int_nvvm_mul_rz_d : ClangBuiltin<"__nvvm_mul_rz_d">,
  595. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  596. [IntrNoMem, IntrSpeculatable, Commutative]>;
  597. def int_nvvm_mul_rm_d : ClangBuiltin<"__nvvm_mul_rm_d">,
  598. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  599. [IntrNoMem, IntrSpeculatable, Commutative]>;
  600. def int_nvvm_mul_rp_d : ClangBuiltin<"__nvvm_mul_rp_d">,
  601. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  602. [IntrNoMem, IntrSpeculatable, Commutative]>;
  603. def int_nvvm_mul24_i : ClangBuiltin<"__nvvm_mul24_i">,
  604. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  605. [IntrNoMem, IntrSpeculatable, Commutative]>;
  606. def int_nvvm_mul24_ui : ClangBuiltin<"__nvvm_mul24_ui">,
  607. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  608. [IntrNoMem, IntrSpeculatable, Commutative]>;
  609. //
  610. // Div
  611. //
  612. def int_nvvm_div_approx_ftz_f : ClangBuiltin<"__nvvm_div_approx_ftz_f">,
  613. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  614. [IntrNoMem]>;
  615. def int_nvvm_div_approx_f : ClangBuiltin<"__nvvm_div_approx_f">,
  616. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  617. [IntrNoMem]>;
  618. def int_nvvm_div_rn_ftz_f : ClangBuiltin<"__nvvm_div_rn_ftz_f">,
  619. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  620. [IntrNoMem]>;
  621. def int_nvvm_div_rn_f : ClangBuiltin<"__nvvm_div_rn_f">,
  622. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  623. [IntrNoMem]>;
  624. def int_nvvm_div_rz_ftz_f : ClangBuiltin<"__nvvm_div_rz_ftz_f">,
  625. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  626. [IntrNoMem]>;
  627. def int_nvvm_div_rz_f : ClangBuiltin<"__nvvm_div_rz_f">,
  628. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  629. [IntrNoMem]>;
  630. def int_nvvm_div_rm_ftz_f : ClangBuiltin<"__nvvm_div_rm_ftz_f">,
  631. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  632. [IntrNoMem]>;
  633. def int_nvvm_div_rm_f : ClangBuiltin<"__nvvm_div_rm_f">,
  634. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  635. [IntrNoMem]>;
  636. def int_nvvm_div_rp_ftz_f : ClangBuiltin<"__nvvm_div_rp_ftz_f">,
  637. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  638. [IntrNoMem]>;
  639. def int_nvvm_div_rp_f : ClangBuiltin<"__nvvm_div_rp_f">,
  640. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  641. [IntrNoMem]>;
  642. def int_nvvm_div_rn_d : ClangBuiltin<"__nvvm_div_rn_d">,
  643. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  644. [IntrNoMem]>;
  645. def int_nvvm_div_rz_d : ClangBuiltin<"__nvvm_div_rz_d">,
  646. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  647. [IntrNoMem]>;
  648. def int_nvvm_div_rm_d : ClangBuiltin<"__nvvm_div_rm_d">,
  649. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  650. [IntrNoMem]>;
  651. def int_nvvm_div_rp_d : ClangBuiltin<"__nvvm_div_rp_d">,
  652. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  653. [IntrNoMem]>;
  654. //
  655. // Sad
  656. //
  657. def int_nvvm_sad_i : ClangBuiltin<"__nvvm_sad_i">,
  658. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  659. [IntrNoMem, Commutative]>;
  660. def int_nvvm_sad_ui : ClangBuiltin<"__nvvm_sad_ui">,
  661. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  662. [IntrNoMem, Commutative]>;
  663. //
  664. // Floor Ceil
  665. //
  666. def int_nvvm_floor_ftz_f : ClangBuiltin<"__nvvm_floor_ftz_f">,
  667. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  668. def int_nvvm_floor_f : ClangBuiltin<"__nvvm_floor_f">,
  669. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  670. def int_nvvm_floor_d : ClangBuiltin<"__nvvm_floor_d">,
  671. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  672. def int_nvvm_ceil_ftz_f : ClangBuiltin<"__nvvm_ceil_ftz_f">,
  673. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  674. def int_nvvm_ceil_f : ClangBuiltin<"__nvvm_ceil_f">,
  675. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  676. def int_nvvm_ceil_d : ClangBuiltin<"__nvvm_ceil_d">,
  677. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  678. //
  679. // Abs
  680. //
  681. def int_nvvm_fabs_ftz_f : ClangBuiltin<"__nvvm_fabs_ftz_f">,
  682. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  683. def int_nvvm_fabs_f : ClangBuiltin<"__nvvm_fabs_f">,
  684. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  685. def int_nvvm_fabs_d : ClangBuiltin<"__nvvm_fabs_d">,
  686. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  687. //
  688. // Abs, Neg bf16, bf16x2
  689. //
  690. foreach unary = ["abs", "neg"] in {
  691. def int_nvvm_ # unary # _bf16 :
  692. ClangBuiltin<!strconcat("__nvvm_", unary, "_bf16")>,
  693. DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem]>;
  694. def int_nvvm_ # unary # _bf16x2 :
  695. ClangBuiltin<!strconcat("__nvvm_", unary, "_bf16x2")>,
  696. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
  697. }
  698. //
  699. // Round
  700. //
  701. def int_nvvm_round_ftz_f : ClangBuiltin<"__nvvm_round_ftz_f">,
  702. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  703. def int_nvvm_round_f : ClangBuiltin<"__nvvm_round_f">,
  704. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  705. def int_nvvm_round_d : ClangBuiltin<"__nvvm_round_d">,
  706. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  707. //
  708. // Trunc
  709. //
  710. def int_nvvm_trunc_ftz_f : ClangBuiltin<"__nvvm_trunc_ftz_f">,
  711. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  712. def int_nvvm_trunc_f : ClangBuiltin<"__nvvm_trunc_f">,
  713. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  714. def int_nvvm_trunc_d : ClangBuiltin<"__nvvm_trunc_d">,
  715. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  716. //
  717. // Saturate
  718. //
  719. def int_nvvm_saturate_ftz_f : ClangBuiltin<"__nvvm_saturate_ftz_f">,
  720. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  721. def int_nvvm_saturate_f : ClangBuiltin<"__nvvm_saturate_f">,
  722. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  723. def int_nvvm_saturate_d : ClangBuiltin<"__nvvm_saturate_d">,
  724. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  725. //
  726. // Exp2 Log2
  727. //
  728. def int_nvvm_ex2_approx_ftz_f : ClangBuiltin<"__nvvm_ex2_approx_ftz_f">,
  729. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  730. def int_nvvm_ex2_approx_f : ClangBuiltin<"__nvvm_ex2_approx_f">,
  731. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  732. def int_nvvm_ex2_approx_d : ClangBuiltin<"__nvvm_ex2_approx_d">,
  733. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  734. def int_nvvm_ex2_approx_f16 : ClangBuiltin<"__nvvm_ex2_approx_f16">,
  735. DefaultAttrsIntrinsic<[llvm_half_ty], [llvm_half_ty], [IntrNoMem]>;
  736. def int_nvvm_ex2_approx_f16x2 : ClangBuiltin<"__nvvm_ex2_approx_f16x2">,
  737. DefaultAttrsIntrinsic<[llvm_v2f16_ty], [llvm_v2f16_ty], [IntrNoMem]>;
  738. def int_nvvm_lg2_approx_ftz_f : ClangBuiltin<"__nvvm_lg2_approx_ftz_f">,
  739. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  740. def int_nvvm_lg2_approx_f : ClangBuiltin<"__nvvm_lg2_approx_f">,
  741. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  742. def int_nvvm_lg2_approx_d : ClangBuiltin<"__nvvm_lg2_approx_d">,
  743. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  744. //
  745. // Sin Cos
  746. //
  747. def int_nvvm_sin_approx_ftz_f : ClangBuiltin<"__nvvm_sin_approx_ftz_f">,
  748. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  749. def int_nvvm_sin_approx_f : ClangBuiltin<"__nvvm_sin_approx_f">,
  750. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  751. def int_nvvm_cos_approx_ftz_f : ClangBuiltin<"__nvvm_cos_approx_ftz_f">,
  752. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  753. def int_nvvm_cos_approx_f : ClangBuiltin<"__nvvm_cos_approx_f">,
  754. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  755. //
  756. // Fma
  757. //
  758. foreach variant = ["_rn_f16", "_rn_ftz_f16", "_rn_sat_f16",
  759. "_rn_ftz_sat_f16", "_rn_relu_f16", "_rn_ftz_relu_f16"] in {
  760. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  761. DefaultAttrsIntrinsic<[llvm_half_ty],
  762. [llvm_half_ty, llvm_half_ty, llvm_half_ty],
  763. [IntrNoMem, IntrSpeculatable]>;
  764. }
  765. foreach variant = ["_rn_f16x2", "_rn_ftz_f16x2", "_rn_sat_f16x2",
  766. "_rn_ftz_sat_f16x2", "_rn_relu_f16x2", "_rn_ftz_relu_f16x2"] in {
  767. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  768. DefaultAttrsIntrinsic<[llvm_v2f16_ty],
  769. [llvm_v2f16_ty, llvm_v2f16_ty, llvm_v2f16_ty],
  770. [IntrNoMem, IntrSpeculatable]>;
  771. }
  772. foreach variant = ["_rn_bf16", "_rn_relu_bf16"] in {
  773. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  774. DefaultAttrsIntrinsic<[llvm_i16_ty],
  775. [llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  776. [IntrNoMem, IntrSpeculatable]>;
  777. }
  778. foreach variant = ["_rn_bf16x2", "_rn_relu_bf16x2"] in {
  779. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  780. DefaultAttrsIntrinsic<[llvm_i32_ty],
  781. [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  782. [IntrNoMem, IntrSpeculatable]>;
  783. }
  784. foreach variant = ["_rn_ftz_f", "_rn_f", "_rz_ftz_f", "_rz_f", "_rm_ftz_f",
  785. "_rm_f", "_rp_ftz_f", "_rp_f"] in {
  786. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  787. DefaultAttrsIntrinsic<[llvm_float_ty],
  788. [llvm_float_ty, llvm_float_ty, llvm_float_ty],
  789. [IntrNoMem, IntrSpeculatable]>;
  790. }
  791. foreach variant = ["_rn_d", "_rz_d", "_rm_d", "_rp_d"] in {
  792. def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
  793. DefaultAttrsIntrinsic<[llvm_double_ty],
  794. [llvm_double_ty, llvm_double_ty, llvm_double_ty],
  795. [IntrNoMem, IntrSpeculatable]>;
  796. }
  797. //
  798. // Rcp
  799. //
  800. def int_nvvm_rcp_rn_ftz_f : ClangBuiltin<"__nvvm_rcp_rn_ftz_f">,
  801. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  802. def int_nvvm_rcp_rn_f : ClangBuiltin<"__nvvm_rcp_rn_f">,
  803. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  804. def int_nvvm_rcp_rz_ftz_f : ClangBuiltin<"__nvvm_rcp_rz_ftz_f">,
  805. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  806. def int_nvvm_rcp_rz_f : ClangBuiltin<"__nvvm_rcp_rz_f">,
  807. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  808. def int_nvvm_rcp_rm_ftz_f : ClangBuiltin<"__nvvm_rcp_rm_ftz_f">,
  809. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  810. def int_nvvm_rcp_rm_f : ClangBuiltin<"__nvvm_rcp_rm_f">,
  811. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  812. def int_nvvm_rcp_rp_ftz_f : ClangBuiltin<"__nvvm_rcp_rp_ftz_f">,
  813. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  814. def int_nvvm_rcp_rp_f : ClangBuiltin<"__nvvm_rcp_rp_f">,
  815. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  816. def int_nvvm_rcp_rn_d : ClangBuiltin<"__nvvm_rcp_rn_d">,
  817. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  818. def int_nvvm_rcp_rz_d : ClangBuiltin<"__nvvm_rcp_rz_d">,
  819. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  820. def int_nvvm_rcp_rm_d : ClangBuiltin<"__nvvm_rcp_rm_d">,
  821. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  822. def int_nvvm_rcp_rp_d : ClangBuiltin<"__nvvm_rcp_rp_d">,
  823. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  824. def int_nvvm_rcp_approx_ftz_f : ClangBuiltin<"__nvvm_rcp_approx_ftz_f">,
  825. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  826. def int_nvvm_rcp_approx_ftz_d : ClangBuiltin<"__nvvm_rcp_approx_ftz_d">,
  827. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  828. //
  829. // Sqrt
  830. //
  831. def int_nvvm_sqrt_f : ClangBuiltin<"__nvvm_sqrt_f">,
  832. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  833. def int_nvvm_sqrt_rn_ftz_f : ClangBuiltin<"__nvvm_sqrt_rn_ftz_f">,
  834. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  835. def int_nvvm_sqrt_rn_f : ClangBuiltin<"__nvvm_sqrt_rn_f">,
  836. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  837. def int_nvvm_sqrt_rz_ftz_f : ClangBuiltin<"__nvvm_sqrt_rz_ftz_f">,
  838. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  839. def int_nvvm_sqrt_rz_f : ClangBuiltin<"__nvvm_sqrt_rz_f">,
  840. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  841. def int_nvvm_sqrt_rm_ftz_f : ClangBuiltin<"__nvvm_sqrt_rm_ftz_f">,
  842. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  843. def int_nvvm_sqrt_rm_f : ClangBuiltin<"__nvvm_sqrt_rm_f">,
  844. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  845. def int_nvvm_sqrt_rp_ftz_f : ClangBuiltin<"__nvvm_sqrt_rp_ftz_f">,
  846. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  847. def int_nvvm_sqrt_rp_f : ClangBuiltin<"__nvvm_sqrt_rp_f">,
  848. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  849. def int_nvvm_sqrt_approx_ftz_f : ClangBuiltin<"__nvvm_sqrt_approx_ftz_f">,
  850. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  851. def int_nvvm_sqrt_approx_f : ClangBuiltin<"__nvvm_sqrt_approx_f">,
  852. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  853. def int_nvvm_sqrt_rn_d : ClangBuiltin<"__nvvm_sqrt_rn_d">,
  854. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  855. def int_nvvm_sqrt_rz_d : ClangBuiltin<"__nvvm_sqrt_rz_d">,
  856. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  857. def int_nvvm_sqrt_rm_d : ClangBuiltin<"__nvvm_sqrt_rm_d">,
  858. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  859. def int_nvvm_sqrt_rp_d : ClangBuiltin<"__nvvm_sqrt_rp_d">,
  860. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  861. //
  862. // Rsqrt
  863. //
  864. def int_nvvm_rsqrt_approx_ftz_f : ClangBuiltin<"__nvvm_rsqrt_approx_ftz_f">,
  865. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  866. def int_nvvm_rsqrt_approx_f : ClangBuiltin<"__nvvm_rsqrt_approx_f">,
  867. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
  868. def int_nvvm_rsqrt_approx_d : ClangBuiltin<"__nvvm_rsqrt_approx_d">,
  869. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
  870. //
  871. // Add
  872. //
  873. def int_nvvm_add_rn_ftz_f : ClangBuiltin<"__nvvm_add_rn_ftz_f">,
  874. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  875. [IntrNoMem, IntrSpeculatable, Commutative]>;
  876. def int_nvvm_add_rn_f : ClangBuiltin<"__nvvm_add_rn_f">,
  877. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  878. [IntrNoMem, IntrSpeculatable, Commutative]>;
  879. def int_nvvm_add_rz_ftz_f : ClangBuiltin<"__nvvm_add_rz_ftz_f">,
  880. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  881. [IntrNoMem, IntrSpeculatable, Commutative]>;
  882. def int_nvvm_add_rz_f : ClangBuiltin<"__nvvm_add_rz_f">,
  883. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  884. [IntrNoMem, IntrSpeculatable, Commutative]>;
  885. def int_nvvm_add_rm_ftz_f : ClangBuiltin<"__nvvm_add_rm_ftz_f">,
  886. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  887. [IntrNoMem, IntrSpeculatable, Commutative]>;
  888. def int_nvvm_add_rm_f : ClangBuiltin<"__nvvm_add_rm_f">,
  889. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  890. [IntrNoMem, IntrSpeculatable, Commutative]>;
  891. def int_nvvm_add_rp_ftz_f : ClangBuiltin<"__nvvm_add_rp_ftz_f">,
  892. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  893. [IntrNoMem, IntrSpeculatable, Commutative]>;
  894. def int_nvvm_add_rp_f : ClangBuiltin<"__nvvm_add_rp_f">,
  895. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
  896. [IntrNoMem, IntrSpeculatable, Commutative]>;
  897. def int_nvvm_add_rn_d : ClangBuiltin<"__nvvm_add_rn_d">,
  898. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  899. [IntrNoMem, IntrSpeculatable, Commutative]>;
  900. def int_nvvm_add_rz_d : ClangBuiltin<"__nvvm_add_rz_d">,
  901. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  902. [IntrNoMem, IntrSpeculatable, Commutative]>;
  903. def int_nvvm_add_rm_d : ClangBuiltin<"__nvvm_add_rm_d">,
  904. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  905. [IntrNoMem, IntrSpeculatable, Commutative]>;
  906. def int_nvvm_add_rp_d : ClangBuiltin<"__nvvm_add_rp_d">,
  907. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  908. [IntrNoMem, IntrSpeculatable, Commutative]>;
  909. //
  910. // Convert
  911. //
  912. def int_nvvm_d2f_rn_ftz : ClangBuiltin<"__nvvm_d2f_rn_ftz">,
  913. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  914. def int_nvvm_d2f_rn : ClangBuiltin<"__nvvm_d2f_rn">,
  915. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  916. def int_nvvm_d2f_rz_ftz : ClangBuiltin<"__nvvm_d2f_rz_ftz">,
  917. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  918. def int_nvvm_d2f_rz : ClangBuiltin<"__nvvm_d2f_rz">,
  919. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  920. def int_nvvm_d2f_rm_ftz : ClangBuiltin<"__nvvm_d2f_rm_ftz">,
  921. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  922. def int_nvvm_d2f_rm : ClangBuiltin<"__nvvm_d2f_rm">,
  923. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  924. def int_nvvm_d2f_rp_ftz : ClangBuiltin<"__nvvm_d2f_rp_ftz">,
  925. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  926. def int_nvvm_d2f_rp : ClangBuiltin<"__nvvm_d2f_rp">,
  927. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  928. def int_nvvm_d2i_rn : ClangBuiltin<"__nvvm_d2i_rn">,
  929. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  930. def int_nvvm_d2i_rz : ClangBuiltin<"__nvvm_d2i_rz">,
  931. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  932. def int_nvvm_d2i_rm : ClangBuiltin<"__nvvm_d2i_rm">,
  933. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  934. def int_nvvm_d2i_rp : ClangBuiltin<"__nvvm_d2i_rp">,
  935. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  936. def int_nvvm_d2ui_rn : ClangBuiltin<"__nvvm_d2ui_rn">,
  937. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  938. def int_nvvm_d2ui_rz : ClangBuiltin<"__nvvm_d2ui_rz">,
  939. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  940. def int_nvvm_d2ui_rm : ClangBuiltin<"__nvvm_d2ui_rm">,
  941. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  942. def int_nvvm_d2ui_rp : ClangBuiltin<"__nvvm_d2ui_rp">,
  943. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  944. def int_nvvm_i2d_rn : ClangBuiltin<"__nvvm_i2d_rn">,
  945. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  946. def int_nvvm_i2d_rz : ClangBuiltin<"__nvvm_i2d_rz">,
  947. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  948. def int_nvvm_i2d_rm : ClangBuiltin<"__nvvm_i2d_rm">,
  949. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  950. def int_nvvm_i2d_rp : ClangBuiltin<"__nvvm_i2d_rp">,
  951. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  952. def int_nvvm_ui2d_rn : ClangBuiltin<"__nvvm_ui2d_rn">,
  953. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  954. def int_nvvm_ui2d_rz : ClangBuiltin<"__nvvm_ui2d_rz">,
  955. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  956. def int_nvvm_ui2d_rm : ClangBuiltin<"__nvvm_ui2d_rm">,
  957. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  958. def int_nvvm_ui2d_rp : ClangBuiltin<"__nvvm_ui2d_rp">,
  959. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  960. def int_nvvm_f2i_rn_ftz : ClangBuiltin<"__nvvm_f2i_rn_ftz">,
  961. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  962. def int_nvvm_f2i_rn : ClangBuiltin<"__nvvm_f2i_rn">,
  963. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  964. def int_nvvm_f2i_rz_ftz : ClangBuiltin<"__nvvm_f2i_rz_ftz">,
  965. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  966. def int_nvvm_f2i_rz : ClangBuiltin<"__nvvm_f2i_rz">,
  967. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  968. def int_nvvm_f2i_rm_ftz : ClangBuiltin<"__nvvm_f2i_rm_ftz">,
  969. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  970. def int_nvvm_f2i_rm : ClangBuiltin<"__nvvm_f2i_rm">,
  971. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  972. def int_nvvm_f2i_rp_ftz : ClangBuiltin<"__nvvm_f2i_rp_ftz">,
  973. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  974. def int_nvvm_f2i_rp : ClangBuiltin<"__nvvm_f2i_rp">,
  975. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  976. def int_nvvm_f2ui_rn_ftz : ClangBuiltin<"__nvvm_f2ui_rn_ftz">,
  977. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  978. def int_nvvm_f2ui_rn : ClangBuiltin<"__nvvm_f2ui_rn">,
  979. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  980. def int_nvvm_f2ui_rz_ftz : ClangBuiltin<"__nvvm_f2ui_rz_ftz">,
  981. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  982. def int_nvvm_f2ui_rz : ClangBuiltin<"__nvvm_f2ui_rz">,
  983. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  984. def int_nvvm_f2ui_rm_ftz : ClangBuiltin<"__nvvm_f2ui_rm_ftz">,
  985. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  986. def int_nvvm_f2ui_rm : ClangBuiltin<"__nvvm_f2ui_rm">,
  987. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  988. def int_nvvm_f2ui_rp_ftz : ClangBuiltin<"__nvvm_f2ui_rp_ftz">,
  989. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  990. def int_nvvm_f2ui_rp : ClangBuiltin<"__nvvm_f2ui_rp">,
  991. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  992. def int_nvvm_i2f_rn : ClangBuiltin<"__nvvm_i2f_rn">,
  993. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  994. def int_nvvm_i2f_rz : ClangBuiltin<"__nvvm_i2f_rz">,
  995. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  996. def int_nvvm_i2f_rm : ClangBuiltin<"__nvvm_i2f_rm">,
  997. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  998. def int_nvvm_i2f_rp : ClangBuiltin<"__nvvm_i2f_rp">,
  999. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1000. def int_nvvm_ui2f_rn : ClangBuiltin<"__nvvm_ui2f_rn">,
  1001. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1002. def int_nvvm_ui2f_rz : ClangBuiltin<"__nvvm_ui2f_rz">,
  1003. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1004. def int_nvvm_ui2f_rm : ClangBuiltin<"__nvvm_ui2f_rm">,
  1005. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1006. def int_nvvm_ui2f_rp : ClangBuiltin<"__nvvm_ui2f_rp">,
  1007. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1008. def int_nvvm_lohi_i2d : ClangBuiltin<"__nvvm_lohi_i2d">,
  1009. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty, llvm_i32_ty],
  1010. [IntrNoMem, IntrSpeculatable, Commutative]>;
  1011. def int_nvvm_d2i_lo : ClangBuiltin<"__nvvm_d2i_lo">,
  1012. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1013. def int_nvvm_d2i_hi : ClangBuiltin<"__nvvm_d2i_hi">,
  1014. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1015. def int_nvvm_f2ll_rn_ftz : ClangBuiltin<"__nvvm_f2ll_rn_ftz">,
  1016. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1017. def int_nvvm_f2ll_rn : ClangBuiltin<"__nvvm_f2ll_rn">,
  1018. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1019. def int_nvvm_f2ll_rz_ftz : ClangBuiltin<"__nvvm_f2ll_rz_ftz">,
  1020. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1021. def int_nvvm_f2ll_rz : ClangBuiltin<"__nvvm_f2ll_rz">,
  1022. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1023. def int_nvvm_f2ll_rm_ftz : ClangBuiltin<"__nvvm_f2ll_rm_ftz">,
  1024. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1025. def int_nvvm_f2ll_rm : ClangBuiltin<"__nvvm_f2ll_rm">,
  1026. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1027. def int_nvvm_f2ll_rp_ftz : ClangBuiltin<"__nvvm_f2ll_rp_ftz">,
  1028. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1029. def int_nvvm_f2ll_rp : ClangBuiltin<"__nvvm_f2ll_rp">,
  1030. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1031. def int_nvvm_f2ull_rn_ftz : ClangBuiltin<"__nvvm_f2ull_rn_ftz">,
  1032. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1033. def int_nvvm_f2ull_rn : ClangBuiltin<"__nvvm_f2ull_rn">,
  1034. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1035. def int_nvvm_f2ull_rz_ftz : ClangBuiltin<"__nvvm_f2ull_rz_ftz">,
  1036. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1037. def int_nvvm_f2ull_rz : ClangBuiltin<"__nvvm_f2ull_rz">,
  1038. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1039. def int_nvvm_f2ull_rm_ftz : ClangBuiltin<"__nvvm_f2ull_rm_ftz">,
  1040. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1041. def int_nvvm_f2ull_rm : ClangBuiltin<"__nvvm_f2ull_rm">,
  1042. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1043. def int_nvvm_f2ull_rp_ftz : ClangBuiltin<"__nvvm_f2ull_rp_ftz">,
  1044. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1045. def int_nvvm_f2ull_rp : ClangBuiltin<"__nvvm_f2ull_rp">,
  1046. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1047. def int_nvvm_d2ll_rn : ClangBuiltin<"__nvvm_d2ll_rn">,
  1048. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1049. def int_nvvm_d2ll_rz : ClangBuiltin<"__nvvm_d2ll_rz">,
  1050. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1051. def int_nvvm_d2ll_rm : ClangBuiltin<"__nvvm_d2ll_rm">,
  1052. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1053. def int_nvvm_d2ll_rp : ClangBuiltin<"__nvvm_d2ll_rp">,
  1054. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1055. def int_nvvm_d2ull_rn : ClangBuiltin<"__nvvm_d2ull_rn">,
  1056. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1057. def int_nvvm_d2ull_rz : ClangBuiltin<"__nvvm_d2ull_rz">,
  1058. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1059. def int_nvvm_d2ull_rm : ClangBuiltin<"__nvvm_d2ull_rm">,
  1060. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1061. def int_nvvm_d2ull_rp : ClangBuiltin<"__nvvm_d2ull_rp">,
  1062. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1063. def int_nvvm_ll2f_rn : ClangBuiltin<"__nvvm_ll2f_rn">,
  1064. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1065. def int_nvvm_ll2f_rz : ClangBuiltin<"__nvvm_ll2f_rz">,
  1066. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1067. def int_nvvm_ll2f_rm : ClangBuiltin<"__nvvm_ll2f_rm">,
  1068. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1069. def int_nvvm_ll2f_rp : ClangBuiltin<"__nvvm_ll2f_rp">,
  1070. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1071. def int_nvvm_ull2f_rn : ClangBuiltin<"__nvvm_ull2f_rn">,
  1072. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1073. def int_nvvm_ull2f_rz : ClangBuiltin<"__nvvm_ull2f_rz">,
  1074. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1075. def int_nvvm_ull2f_rm : ClangBuiltin<"__nvvm_ull2f_rm">,
  1076. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1077. def int_nvvm_ull2f_rp : ClangBuiltin<"__nvvm_ull2f_rp">,
  1078. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1079. def int_nvvm_ll2d_rn : ClangBuiltin<"__nvvm_ll2d_rn">,
  1080. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1081. def int_nvvm_ll2d_rz : ClangBuiltin<"__nvvm_ll2d_rz">,
  1082. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1083. def int_nvvm_ll2d_rm : ClangBuiltin<"__nvvm_ll2d_rm">,
  1084. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1085. def int_nvvm_ll2d_rp : ClangBuiltin<"__nvvm_ll2d_rp">,
  1086. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1087. def int_nvvm_ull2d_rn : ClangBuiltin<"__nvvm_ull2d_rn">,
  1088. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1089. def int_nvvm_ull2d_rz : ClangBuiltin<"__nvvm_ull2d_rz">,
  1090. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1091. def int_nvvm_ull2d_rm : ClangBuiltin<"__nvvm_ull2d_rm">,
  1092. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1093. def int_nvvm_ull2d_rp : ClangBuiltin<"__nvvm_ull2d_rp">,
  1094. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1095. def int_nvvm_f2h_rn_ftz : ClangBuiltin<"__nvvm_f2h_rn_ftz">,
  1096. DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1097. def int_nvvm_f2h_rn : ClangBuiltin<"__nvvm_f2h_rn">,
  1098. DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1099. def int_nvvm_ff2bf16x2_rn : ClangBuiltin<"__nvvm_ff2bf16x2_rn">,
  1100. Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1101. def int_nvvm_ff2bf16x2_rn_relu : ClangBuiltin<"__nvvm_ff2bf16x2_rn_relu">,
  1102. Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1103. def int_nvvm_ff2bf16x2_rz : ClangBuiltin<"__nvvm_ff2bf16x2_rz">,
  1104. Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1105. def int_nvvm_ff2bf16x2_rz_relu : ClangBuiltin<"__nvvm_ff2bf16x2_rz_relu">,
  1106. Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem]>;
  1107. def int_nvvm_ff2f16x2_rn : ClangBuiltin<"__nvvm_ff2f16x2_rn">,
  1108. Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1109. def int_nvvm_ff2f16x2_rn_relu : ClangBuiltin<"__nvvm_ff2f16x2_rn_relu">,
  1110. Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1111. def int_nvvm_ff2f16x2_rz : ClangBuiltin<"__nvvm_ff2f16x2_rz">,
  1112. Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1113. def int_nvvm_ff2f16x2_rz_relu : ClangBuiltin<"__nvvm_ff2f16x2_rz_relu">,
  1114. Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1115. def int_nvvm_f2bf16_rn : ClangBuiltin<"__nvvm_f2bf16_rn">,
  1116. Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1117. def int_nvvm_f2bf16_rn_relu : ClangBuiltin<"__nvvm_f2bf16_rn_relu">,
  1118. Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1119. def int_nvvm_f2bf16_rz : ClangBuiltin<"__nvvm_f2bf16_rz">,
  1120. Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1121. def int_nvvm_f2bf16_rz_relu : ClangBuiltin<"__nvvm_f2bf16_rz_relu">,
  1122. Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1123. def int_nvvm_f2tf32_rna : ClangBuiltin<"__nvvm_f2tf32_rna">,
  1124. Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
  1125. //
  1126. // Bitcast
  1127. //
  1128. def int_nvvm_bitcast_f2i : ClangBuiltin<"__nvvm_bitcast_f2i">,
  1129. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
  1130. def int_nvvm_bitcast_i2f : ClangBuiltin<"__nvvm_bitcast_i2f">,
  1131. DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
  1132. def int_nvvm_bitcast_ll2d : ClangBuiltin<"__nvvm_bitcast_ll2d">,
  1133. DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
  1134. def int_nvvm_bitcast_d2ll : ClangBuiltin<"__nvvm_bitcast_d2ll">,
  1135. DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
  1136. // FNS
  1137. def int_nvvm_fns : ClangBuiltin<"__nvvm_fns">,
  1138. DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1139. [IntrNoMem]>;
  1140. // Atomics not available as llvm intrinsics.
  1141. def int_nvvm_atomic_load_inc_32 : Intrinsic<[llvm_i32_ty],
  1142. [LLVMAnyPointerType<llvm_i32_ty>, llvm_i32_ty],
  1143. [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
  1144. def int_nvvm_atomic_load_dec_32 : Intrinsic<[llvm_i32_ty],
  1145. [LLVMAnyPointerType<llvm_i32_ty>, llvm_i32_ty],
  1146. [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
  1147. class SCOPED_ATOMIC2_impl<LLVMType elty>
  1148. : Intrinsic<[elty],
  1149. [LLVMAnyPointerType<LLVMMatchType<0>>, LLVMMatchType<0>],
  1150. [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
  1151. class SCOPED_ATOMIC3_impl<LLVMType elty>
  1152. : Intrinsic<[elty],
  1153. [LLVMAnyPointerType<LLVMMatchType<0>>, LLVMMatchType<0>,
  1154. LLVMMatchType<0>],
  1155. [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
  1156. multiclass PTXAtomicWithScope2<LLVMType elty> {
  1157. def _cta : SCOPED_ATOMIC2_impl<elty>;
  1158. def _sys : SCOPED_ATOMIC2_impl<elty>;
  1159. }
  1160. multiclass PTXAtomicWithScope3<LLVMType elty> {
  1161. def _cta : SCOPED_ATOMIC3_impl<elty>;
  1162. def _sys : SCOPED_ATOMIC3_impl<elty>;
  1163. }
  1164. multiclass PTXAtomicWithScope2_fi {
  1165. defm _f: PTXAtomicWithScope2<llvm_anyfloat_ty>;
  1166. defm _i: PTXAtomicWithScope2<llvm_anyint_ty>;
  1167. }
  1168. defm int_nvvm_atomic_add_gen : PTXAtomicWithScope2_fi;
  1169. defm int_nvvm_atomic_inc_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1170. defm int_nvvm_atomic_dec_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1171. defm int_nvvm_atomic_exch_gen_i: PTXAtomicWithScope2<llvm_anyint_ty>;
  1172. defm int_nvvm_atomic_xor_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1173. defm int_nvvm_atomic_max_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1174. defm int_nvvm_atomic_min_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1175. defm int_nvvm_atomic_or_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1176. defm int_nvvm_atomic_and_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
  1177. defm int_nvvm_atomic_cas_gen_i : PTXAtomicWithScope3<llvm_anyint_ty>;
  1178. // Bar.Sync
  1179. // The builtin for "bar.sync 0" is called __syncthreads. Unlike most of the
  1180. // intrinsics in this file, this one is a user-facing API.
  1181. def int_nvvm_barrier0 : ClangBuiltin<"__syncthreads">,
  1182. Intrinsic<[], [], [IntrConvergent, IntrNoCallback]>;
  1183. // Synchronize all threads in the CTA at barrier 'n'.
  1184. def int_nvvm_barrier_n : ClangBuiltin<"__nvvm_bar_n">,
  1185. Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
  1186. // Synchronize 'm', a multiple of warp size, (arg 2) threads in
  1187. // the CTA at barrier 'n' (arg 1).
  1188. def int_nvvm_barrier : ClangBuiltin<"__nvvm_bar">,
  1189. Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
  1190. def int_nvvm_barrier0_popc : ClangBuiltin<"__nvvm_bar0_popc">,
  1191. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
  1192. def int_nvvm_barrier0_and : ClangBuiltin<"__nvvm_bar0_and">,
  1193. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
  1194. def int_nvvm_barrier0_or : ClangBuiltin<"__nvvm_bar0_or">,
  1195. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
  1196. def int_nvvm_bar_sync :
  1197. Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
  1198. ClangBuiltin<"__nvvm_bar_sync">;
  1199. def int_nvvm_bar_warp_sync :
  1200. Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
  1201. ClangBuiltin<"__nvvm_bar_warp_sync">;
  1202. // barrier.sync id[, cnt]
  1203. def int_nvvm_barrier_sync :
  1204. Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
  1205. ClangBuiltin<"__nvvm_barrier_sync">;
  1206. def int_nvvm_barrier_sync_cnt :
  1207. Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
  1208. ClangBuiltin<"__nvvm_barrier_sync_cnt">;
  1209. // Membar
  1210. def int_nvvm_membar_cta : ClangBuiltin<"__nvvm_membar_cta">,
  1211. Intrinsic<[], [], [IntrNoCallback]>;
  1212. def int_nvvm_membar_gl : ClangBuiltin<"__nvvm_membar_gl">,
  1213. Intrinsic<[], [], [IntrNoCallback]>;
  1214. def int_nvvm_membar_sys : ClangBuiltin<"__nvvm_membar_sys">,
  1215. Intrinsic<[], [], [IntrNoCallback]>;
  1216. // Async Copy
  1217. def int_nvvm_cp_async_mbarrier_arrive :
  1218. ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive">,
  1219. Intrinsic<[],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1220. def int_nvvm_cp_async_mbarrier_arrive_shared :
  1221. ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_shared">,
  1222. Intrinsic<[],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1223. def int_nvvm_cp_async_mbarrier_arrive_noinc :
  1224. ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_noinc">,
  1225. Intrinsic<[],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1226. def int_nvvm_cp_async_mbarrier_arrive_noinc_shared :
  1227. ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_noinc_shared">,
  1228. Intrinsic<[],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1229. def int_nvvm_cp_async_ca_shared_global_4 :
  1230. ClangBuiltin<"__nvvm_cp_async_ca_shared_global_4">,
  1231. Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
  1232. [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
  1233. WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
  1234. "llvm.nvvm.cp.async.ca.shared.global.4">;
  1235. def int_nvvm_cp_async_ca_shared_global_8 :
  1236. ClangBuiltin<"__nvvm_cp_async_ca_shared_global_8">,
  1237. Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
  1238. [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
  1239. WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
  1240. "llvm.nvvm.cp.async.ca.shared.global.8">;
  1241. def int_nvvm_cp_async_ca_shared_global_16 :
  1242. ClangBuiltin<"__nvvm_cp_async_ca_shared_global_16">,
  1243. Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
  1244. [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
  1245. WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
  1246. "llvm.nvvm.cp.async.ca.shared.global.16">;
  1247. def int_nvvm_cp_async_cg_shared_global_16 :
  1248. ClangBuiltin<"__nvvm_cp_async_cg_shared_global_16">,
  1249. Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
  1250. [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
  1251. WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
  1252. "llvm.nvvm.cp.async.cg.shared.global.16">;
  1253. def int_nvvm_cp_async_commit_group :
  1254. ClangBuiltin<"__nvvm_cp_async_commit_group">,
  1255. Intrinsic<[],[],[]>;
  1256. def int_nvvm_cp_async_wait_group :
  1257. ClangBuiltin<"__nvvm_cp_async_wait_group">,
  1258. Intrinsic<[],[llvm_i32_ty],[ImmArg<ArgIndex<0>>]>;
  1259. def int_nvvm_cp_async_wait_all :
  1260. ClangBuiltin<"__nvvm_cp_async_wait_all">,
  1261. Intrinsic<[],[],[]>;
  1262. // mbarrier
  1263. def int_nvvm_mbarrier_init : ClangBuiltin<"__nvvm_mbarrier_init">,
  1264. Intrinsic<[],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1265. def int_nvvm_mbarrier_init_shared :
  1266. ClangBuiltin<"__nvvm_mbarrier_init_shared">,
  1267. Intrinsic<[],[llvm_shared_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1268. def int_nvvm_mbarrier_inval : ClangBuiltin<"__nvvm_mbarrier_inval">,
  1269. Intrinsic<[],[llvm_i64ptr_ty],
  1270. [IntrConvergent, IntrWriteMem, IntrArgMemOnly, IntrNoCallback,
  1271. WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>]>;
  1272. def int_nvvm_mbarrier_inval_shared :
  1273. ClangBuiltin<"__nvvm_mbarrier_inval_shared">,
  1274. Intrinsic<[],[llvm_shared_i64ptr_ty],
  1275. [IntrConvergent, IntrWriteMem, IntrArgMemOnly, IntrNoCallback,
  1276. WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>]>;
  1277. def int_nvvm_mbarrier_arrive : ClangBuiltin<"__nvvm_mbarrier_arrive">,
  1278. Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1279. def int_nvvm_mbarrier_arrive_shared :
  1280. ClangBuiltin<"__nvvm_mbarrier_arrive_shared">,
  1281. Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1282. def int_nvvm_mbarrier_arrive_noComplete :
  1283. ClangBuiltin<"__nvvm_mbarrier_arrive_noComplete">,
  1284. Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1285. def int_nvvm_mbarrier_arrive_noComplete_shared :
  1286. ClangBuiltin<"__nvvm_mbarrier_arrive_noComplete_shared">,
  1287. Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty,
  1288. llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1289. def int_nvvm_mbarrier_arrive_drop :
  1290. ClangBuiltin<"__nvvm_mbarrier_arrive_drop">,
  1291. Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1292. def int_nvvm_mbarrier_arrive_drop_shared :
  1293. ClangBuiltin<"__nvvm_mbarrier_arrive_drop_shared">,
  1294. Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
  1295. def int_nvvm_mbarrier_arrive_drop_noComplete :
  1296. ClangBuiltin<"__nvvm_mbarrier_arrive_drop_noComplete">,
  1297. Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1298. def int_nvvm_mbarrier_arrive_drop_noComplete_shared :
  1299. ClangBuiltin<"__nvvm_mbarrier_arrive_drop_noComplete_shared">,
  1300. Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty,
  1301. llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
  1302. def int_nvvm_mbarrier_test_wait :
  1303. ClangBuiltin<"__nvvm_mbarrier_test_wait">,
  1304. Intrinsic<[llvm_i1_ty],[llvm_i64ptr_ty, llvm_i64_ty],[IntrConvergent, IntrNoCallback]>;
  1305. def int_nvvm_mbarrier_test_wait_shared :
  1306. ClangBuiltin<"__nvvm_mbarrier_test_wait_shared">,
  1307. Intrinsic<[llvm_i1_ty],[llvm_shared_i64ptr_ty, llvm_i64_ty],[IntrConvergent, IntrNoCallback]>;
  1308. def int_nvvm_mbarrier_pending_count :
  1309. ClangBuiltin<"__nvvm_mbarrier_pending_count">,
  1310. Intrinsic<[llvm_i32_ty],[llvm_i64_ty],[IntrNoMem, IntrConvergent, IntrNoCallback]>;
  1311. // Generated within nvvm. Use for ldu on sm_20 or later. Second arg is the
  1312. // pointer's alignment.
  1313. def int_nvvm_ldu_global_i : Intrinsic<[llvm_anyint_ty],
  1314. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1315. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1316. "llvm.nvvm.ldu.global.i">;
  1317. def int_nvvm_ldu_global_f : Intrinsic<[llvm_anyfloat_ty],
  1318. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1319. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1320. "llvm.nvvm.ldu.global.f">;
  1321. def int_nvvm_ldu_global_p : Intrinsic<[llvm_anyptr_ty],
  1322. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1323. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1324. "llvm.nvvm.ldu.global.p">;
  1325. // Generated within nvvm. Use for ldg on sm_35 or later. Second arg is the
  1326. // pointer's alignment.
  1327. def int_nvvm_ldg_global_i : Intrinsic<[llvm_anyint_ty],
  1328. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1329. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1330. "llvm.nvvm.ldg.global.i">;
  1331. def int_nvvm_ldg_global_f : Intrinsic<[llvm_anyfloat_ty],
  1332. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1333. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1334. "llvm.nvvm.ldg.global.f">;
  1335. def int_nvvm_ldg_global_p : Intrinsic<[llvm_anyptr_ty],
  1336. [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
  1337. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
  1338. "llvm.nvvm.ldg.global.p">;
  1339. // Use for generic pointers
  1340. // - These intrinsics are used to convert address spaces.
  1341. // - The input pointer and output pointer must have the same type, except for
  1342. // the address-space. (This restriction is not enforced here as there is
  1343. // currently no way to describe it).
  1344. // - This complements the llvm bitcast, which can be used to cast one type
  1345. // of pointer to another type of pointer, while the address space remains
  1346. // the same.
  1347. def int_nvvm_ptr_local_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1348. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1349. "llvm.nvvm.ptr.local.to.gen">;
  1350. def int_nvvm_ptr_shared_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1351. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1352. "llvm.nvvm.ptr.shared.to.gen">;
  1353. def int_nvvm_ptr_global_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1354. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1355. "llvm.nvvm.ptr.global.to.gen">;
  1356. def int_nvvm_ptr_constant_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1357. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1358. "llvm.nvvm.ptr.constant.to.gen">;
  1359. def int_nvvm_ptr_gen_to_global: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1360. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1361. "llvm.nvvm.ptr.gen.to.global">;
  1362. def int_nvvm_ptr_gen_to_shared: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1363. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1364. "llvm.nvvm.ptr.gen.to.shared">;
  1365. def int_nvvm_ptr_gen_to_local: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1366. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1367. "llvm.nvvm.ptr.gen.to.local">;
  1368. def int_nvvm_ptr_gen_to_constant: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
  1369. [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
  1370. "llvm.nvvm.ptr.gen.to.constant">;
  1371. // Used in nvvm internally to help address space opt and ptx code generation
  1372. // This is for params that are passed to kernel functions by pointer by-val.
  1373. def int_nvvm_ptr_gen_to_param: Intrinsic<[llvm_anyptr_ty],
  1374. [llvm_anyptr_ty],
  1375. [IntrNoMem, IntrSpeculatable, IntrNoCallback],
  1376. "llvm.nvvm.ptr.gen.to.param">;
  1377. // Move intrinsics, used in nvvm internally
  1378. def int_nvvm_move_i16 : Intrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem],
  1379. "llvm.nvvm.move.i16">;
  1380. def int_nvvm_move_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem],
  1381. "llvm.nvvm.move.i32">;
  1382. def int_nvvm_move_i64 : Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem],
  1383. "llvm.nvvm.move.i64">;
  1384. def int_nvvm_move_float : Intrinsic<[llvm_float_ty], [llvm_float_ty],
  1385. [IntrNoMem], "llvm.nvvm.move.float">;
  1386. def int_nvvm_move_double : Intrinsic<[llvm_double_ty], [llvm_double_ty],
  1387. [IntrNoMem], "llvm.nvvm.move.double">;
  1388. def int_nvvm_move_ptr : Intrinsic<[llvm_anyptr_ty], [llvm_anyptr_ty],
  1389. [IntrNoMem, NoCapture<ArgIndex<0>>], "llvm.nvvm.move.ptr">;
  1390. // For getting the handle from a texture or surface variable
  1391. def int_nvvm_texsurf_handle
  1392. : Intrinsic<[llvm_i64_ty], [llvm_metadata_ty, llvm_any_i64ptr_ty],
  1393. [IntrNoMem], "llvm.nvvm.texsurf.handle">;
  1394. def int_nvvm_texsurf_handle_internal
  1395. : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty],
  1396. [IntrNoMem], "llvm.nvvm.texsurf.handle.internal">;
  1397. /// Error / Warn
  1398. def int_nvvm_compiler_error :
  1399. Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.error">;
  1400. def int_nvvm_compiler_warn :
  1401. Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.warn">;
  1402. def int_nvvm_reflect :
  1403. Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">;
  1404. // isspacep.{const, global, local, shared}
  1405. def int_nvvm_isspacep_const
  1406. : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty],
  1407. [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
  1408. "llvm.nvvm.isspacep.const">,
  1409. ClangBuiltin<"__nvvm_isspacep_const">;
  1410. def int_nvvm_isspacep_global
  1411. : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty],
  1412. [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
  1413. "llvm.nvvm.isspacep.global">,
  1414. ClangBuiltin<"__nvvm_isspacep_global">;
  1415. def int_nvvm_isspacep_local
  1416. : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty],
  1417. [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
  1418. "llvm.nvvm.isspacep.local">,
  1419. ClangBuiltin<"__nvvm_isspacep_local">;
  1420. def int_nvvm_isspacep_shared
  1421. : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty],
  1422. [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
  1423. "llvm.nvvm.isspacep.shared">,
  1424. ClangBuiltin<"__nvvm_isspacep_shared">;
  1425. // Environment register read
  1426. def int_nvvm_read_ptx_sreg_envreg0
  1427. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1428. "llvm.nvvm.read.ptx.sreg.envreg0">,
  1429. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg0">;
  1430. def int_nvvm_read_ptx_sreg_envreg1
  1431. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1432. "llvm.nvvm.read.ptx.sreg.envreg1">,
  1433. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg1">;
  1434. def int_nvvm_read_ptx_sreg_envreg2
  1435. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1436. "llvm.nvvm.read.ptx.sreg.envreg2">,
  1437. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg2">;
  1438. def int_nvvm_read_ptx_sreg_envreg3
  1439. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1440. "llvm.nvvm.read.ptx.sreg.envreg3">,
  1441. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg3">;
  1442. def int_nvvm_read_ptx_sreg_envreg4
  1443. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1444. "llvm.nvvm.read.ptx.sreg.envreg4">,
  1445. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg4">;
  1446. def int_nvvm_read_ptx_sreg_envreg5
  1447. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1448. "llvm.nvvm.read.ptx.sreg.envreg5">,
  1449. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg5">;
  1450. def int_nvvm_read_ptx_sreg_envreg6
  1451. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1452. "llvm.nvvm.read.ptx.sreg.envreg6">,
  1453. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg6">;
  1454. def int_nvvm_read_ptx_sreg_envreg7
  1455. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1456. "llvm.nvvm.read.ptx.sreg.envreg7">,
  1457. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg7">;
  1458. def int_nvvm_read_ptx_sreg_envreg8
  1459. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1460. "llvm.nvvm.read.ptx.sreg.envreg8">,
  1461. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg8">;
  1462. def int_nvvm_read_ptx_sreg_envreg9
  1463. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1464. "llvm.nvvm.read.ptx.sreg.envreg9">,
  1465. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg9">;
  1466. def int_nvvm_read_ptx_sreg_envreg10
  1467. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1468. "llvm.nvvm.read.ptx.sreg.envreg10">,
  1469. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg10">;
  1470. def int_nvvm_read_ptx_sreg_envreg11
  1471. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1472. "llvm.nvvm.read.ptx.sreg.envreg11">,
  1473. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg11">;
  1474. def int_nvvm_read_ptx_sreg_envreg12
  1475. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1476. "llvm.nvvm.read.ptx.sreg.envreg12">,
  1477. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg12">;
  1478. def int_nvvm_read_ptx_sreg_envreg13
  1479. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1480. "llvm.nvvm.read.ptx.sreg.envreg13">,
  1481. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg13">;
  1482. def int_nvvm_read_ptx_sreg_envreg14
  1483. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1484. "llvm.nvvm.read.ptx.sreg.envreg14">,
  1485. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg14">;
  1486. def int_nvvm_read_ptx_sreg_envreg15
  1487. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1488. "llvm.nvvm.read.ptx.sreg.envreg15">,
  1489. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg15">;
  1490. def int_nvvm_read_ptx_sreg_envreg16
  1491. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1492. "llvm.nvvm.read.ptx.sreg.envreg16">,
  1493. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg16">;
  1494. def int_nvvm_read_ptx_sreg_envreg17
  1495. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1496. "llvm.nvvm.read.ptx.sreg.envreg17">,
  1497. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg17">;
  1498. def int_nvvm_read_ptx_sreg_envreg18
  1499. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1500. "llvm.nvvm.read.ptx.sreg.envreg18">,
  1501. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg18">;
  1502. def int_nvvm_read_ptx_sreg_envreg19
  1503. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1504. "llvm.nvvm.read.ptx.sreg.envreg19">,
  1505. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg19">;
  1506. def int_nvvm_read_ptx_sreg_envreg20
  1507. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1508. "llvm.nvvm.read.ptx.sreg.envreg20">,
  1509. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg20">;
  1510. def int_nvvm_read_ptx_sreg_envreg21
  1511. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1512. "llvm.nvvm.read.ptx.sreg.envreg21">,
  1513. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg21">;
  1514. def int_nvvm_read_ptx_sreg_envreg22
  1515. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1516. "llvm.nvvm.read.ptx.sreg.envreg22">,
  1517. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg22">;
  1518. def int_nvvm_read_ptx_sreg_envreg23
  1519. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1520. "llvm.nvvm.read.ptx.sreg.envreg23">,
  1521. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg23">;
  1522. def int_nvvm_read_ptx_sreg_envreg24
  1523. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1524. "llvm.nvvm.read.ptx.sreg.envreg24">,
  1525. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg24">;
  1526. def int_nvvm_read_ptx_sreg_envreg25
  1527. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1528. "llvm.nvvm.read.ptx.sreg.envreg25">,
  1529. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg25">;
  1530. def int_nvvm_read_ptx_sreg_envreg26
  1531. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1532. "llvm.nvvm.read.ptx.sreg.envreg26">,
  1533. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg26">;
  1534. def int_nvvm_read_ptx_sreg_envreg27
  1535. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1536. "llvm.nvvm.read.ptx.sreg.envreg27">,
  1537. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg27">;
  1538. def int_nvvm_read_ptx_sreg_envreg28
  1539. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1540. "llvm.nvvm.read.ptx.sreg.envreg28">,
  1541. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg28">;
  1542. def int_nvvm_read_ptx_sreg_envreg29
  1543. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1544. "llvm.nvvm.read.ptx.sreg.envreg29">,
  1545. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg29">;
  1546. def int_nvvm_read_ptx_sreg_envreg30
  1547. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1548. "llvm.nvvm.read.ptx.sreg.envreg30">,
  1549. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg30">;
  1550. def int_nvvm_read_ptx_sreg_envreg31
  1551. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
  1552. "llvm.nvvm.read.ptx.sreg.envreg31">,
  1553. ClangBuiltin<"__nvvm_read_ptx_sreg_envreg31">;
  1554. // Texture Fetch
  1555. // texmode_independent
  1556. def int_nvvm_tex_1d_v4f32_s32
  1557. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1558. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
  1559. "llvm.nvvm.tex.1d.v4f32.s32">;
  1560. def int_nvvm_tex_1d_v4f32_f32
  1561. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1562. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
  1563. "llvm.nvvm.tex.1d.v4f32.f32">;
  1564. def int_nvvm_tex_1d_level_v4f32_f32
  1565. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1566. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1567. "llvm.nvvm.tex.1d.level.v4f32.f32">;
  1568. def int_nvvm_tex_1d_grad_v4f32_f32
  1569. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1570. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1571. llvm_float_ty], [],
  1572. "llvm.nvvm.tex.1d.grad.v4f32.f32">;
  1573. def int_nvvm_tex_1d_v4s32_s32
  1574. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1575. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
  1576. "llvm.nvvm.tex.1d.v4s32.s32">;
  1577. def int_nvvm_tex_1d_v4s32_f32
  1578. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1579. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
  1580. "llvm.nvvm.tex.1d.v4s32.f32">;
  1581. def int_nvvm_tex_1d_level_v4s32_f32
  1582. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1583. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1584. "llvm.nvvm.tex.1d.level.v4s32.f32">;
  1585. def int_nvvm_tex_1d_grad_v4s32_f32
  1586. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1587. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1588. llvm_float_ty], [],
  1589. "llvm.nvvm.tex.1d.grad.v4s32.f32">;
  1590. def int_nvvm_tex_1d_v4u32_s32
  1591. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1592. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
  1593. "llvm.nvvm.tex.1d.v4u32.s32">;
  1594. def int_nvvm_tex_1d_v4u32_f32
  1595. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1596. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
  1597. "llvm.nvvm.tex.1d.v4u32.f32">;
  1598. def int_nvvm_tex_1d_level_v4u32_f32
  1599. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1600. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1601. "llvm.nvvm.tex.1d.level.v4u32.f32">;
  1602. def int_nvvm_tex_1d_grad_v4u32_f32
  1603. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1604. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1605. llvm_float_ty], [],
  1606. "llvm.nvvm.tex.1d.grad.v4u32.f32">;
  1607. def int_nvvm_tex_1d_array_v4f32_s32
  1608. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1609. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1610. "llvm.nvvm.tex.1d.array.v4f32.s32">;
  1611. def int_nvvm_tex_1d_array_v4f32_f32
  1612. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1613. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  1614. "llvm.nvvm.tex.1d.array.v4f32.f32">;
  1615. def int_nvvm_tex_1d_array_level_v4f32_f32
  1616. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1617. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1618. llvm_float_ty], [],
  1619. "llvm.nvvm.tex.1d.array.level.v4f32.f32">;
  1620. def int_nvvm_tex_1d_array_grad_v4f32_f32
  1621. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1622. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1623. llvm_float_ty, llvm_float_ty], [],
  1624. "llvm.nvvm.tex.1d.array.grad.v4f32.f32">;
  1625. def int_nvvm_tex_1d_array_v4s32_s32
  1626. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1627. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1628. "llvm.nvvm.tex.1d.array.v4s32.s32">;
  1629. def int_nvvm_tex_1d_array_v4s32_f32
  1630. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1631. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  1632. "llvm.nvvm.tex.1d.array.v4s32.f32">;
  1633. def int_nvvm_tex_1d_array_level_v4s32_f32
  1634. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1635. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1636. llvm_float_ty], [],
  1637. "llvm.nvvm.tex.1d.array.level.v4s32.f32">;
  1638. def int_nvvm_tex_1d_array_grad_v4s32_f32
  1639. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1640. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1641. llvm_float_ty, llvm_float_ty], [],
  1642. "llvm.nvvm.tex.1d.array.grad.v4s32.f32">;
  1643. def int_nvvm_tex_1d_array_v4u32_s32
  1644. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1645. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1646. "llvm.nvvm.tex.1d.array.v4u32.s32">;
  1647. def int_nvvm_tex_1d_array_v4u32_f32
  1648. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1649. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  1650. "llvm.nvvm.tex.1d.array.v4u32.f32">;
  1651. def int_nvvm_tex_1d_array_level_v4u32_f32
  1652. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1653. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1654. llvm_float_ty], [],
  1655. "llvm.nvvm.tex.1d.array.level.v4u32.f32">;
  1656. def int_nvvm_tex_1d_array_grad_v4u32_f32
  1657. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1658. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1659. llvm_float_ty, llvm_float_ty], [],
  1660. "llvm.nvvm.tex.1d.array.grad.v4u32.f32">;
  1661. def int_nvvm_tex_2d_v4f32_s32
  1662. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1663. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1664. "llvm.nvvm.tex.2d.v4f32.s32">;
  1665. def int_nvvm_tex_2d_v4f32_f32
  1666. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1667. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1668. "llvm.nvvm.tex.2d.v4f32.f32">;
  1669. def int_nvvm_tex_2d_level_v4f32_f32
  1670. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1671. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1672. llvm_float_ty], [],
  1673. "llvm.nvvm.tex.2d.level.v4f32.f32">;
  1674. def int_nvvm_tex_2d_grad_v4f32_f32
  1675. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1676. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1677. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1678. "llvm.nvvm.tex.2d.grad.v4f32.f32">;
  1679. def int_nvvm_tex_2d_v4s32_s32
  1680. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1681. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1682. "llvm.nvvm.tex.2d.v4s32.s32">;
  1683. def int_nvvm_tex_2d_v4s32_f32
  1684. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1685. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1686. "llvm.nvvm.tex.2d.v4s32.f32">;
  1687. def int_nvvm_tex_2d_level_v4s32_f32
  1688. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1689. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1690. llvm_float_ty], [],
  1691. "llvm.nvvm.tex.2d.level.v4s32.f32">;
  1692. def int_nvvm_tex_2d_grad_v4s32_f32
  1693. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1694. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1695. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1696. "llvm.nvvm.tex.2d.grad.v4s32.f32">;
  1697. def int_nvvm_tex_2d_v4u32_s32
  1698. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1699. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  1700. "llvm.nvvm.tex.2d.v4u32.s32">;
  1701. def int_nvvm_tex_2d_v4u32_f32
  1702. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1703. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1704. "llvm.nvvm.tex.2d.v4u32.f32">;
  1705. def int_nvvm_tex_2d_level_v4u32_f32
  1706. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1707. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1708. llvm_float_ty], [],
  1709. "llvm.nvvm.tex.2d.level.v4u32.f32">;
  1710. def int_nvvm_tex_2d_grad_v4u32_f32
  1711. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1712. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1713. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1714. "llvm.nvvm.tex.2d.grad.v4u32.f32">;
  1715. def int_nvvm_tex_2d_array_v4f32_s32
  1716. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1717. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  1718. llvm_i32_ty], [],
  1719. "llvm.nvvm.tex.2d.array.v4f32.s32">;
  1720. def int_nvvm_tex_2d_array_v4f32_f32
  1721. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1722. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1723. llvm_float_ty], [],
  1724. "llvm.nvvm.tex.2d.array.v4f32.f32">;
  1725. def int_nvvm_tex_2d_array_level_v4f32_f32
  1726. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1727. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1728. llvm_float_ty, llvm_float_ty], [],
  1729. "llvm.nvvm.tex.2d.array.level.v4f32.f32">;
  1730. def int_nvvm_tex_2d_array_grad_v4f32_f32
  1731. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1732. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1733. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1734. llvm_float_ty], [],
  1735. "llvm.nvvm.tex.2d.array.grad.v4f32.f32">;
  1736. def int_nvvm_tex_2d_array_v4s32_s32
  1737. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1738. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  1739. llvm_i32_ty], [],
  1740. "llvm.nvvm.tex.2d.array.v4s32.s32">;
  1741. def int_nvvm_tex_2d_array_v4s32_f32
  1742. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1743. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1744. llvm_float_ty], [],
  1745. "llvm.nvvm.tex.2d.array.v4s32.f32">;
  1746. def int_nvvm_tex_2d_array_level_v4s32_f32
  1747. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1748. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1749. llvm_float_ty, llvm_float_ty], [],
  1750. "llvm.nvvm.tex.2d.array.level.v4s32.f32">;
  1751. def int_nvvm_tex_2d_array_grad_v4s32_f32
  1752. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1753. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1754. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1755. llvm_float_ty], [],
  1756. "llvm.nvvm.tex.2d.array.grad.v4s32.f32">;
  1757. def int_nvvm_tex_2d_array_v4u32_s32
  1758. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1759. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  1760. llvm_i32_ty], [],
  1761. "llvm.nvvm.tex.2d.array.v4u32.s32">;
  1762. def int_nvvm_tex_2d_array_v4u32_f32
  1763. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1764. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1765. llvm_float_ty], [],
  1766. "llvm.nvvm.tex.2d.array.v4u32.f32">;
  1767. def int_nvvm_tex_2d_array_level_v4u32_f32
  1768. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1769. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1770. llvm_float_ty, llvm_float_ty], [],
  1771. "llvm.nvvm.tex.2d.array.level.v4u32.f32">;
  1772. def int_nvvm_tex_2d_array_grad_v4u32_f32
  1773. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1774. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  1775. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1776. llvm_float_ty], [],
  1777. "llvm.nvvm.tex.2d.array.grad.v4u32.f32">;
  1778. def int_nvvm_tex_3d_v4f32_s32
  1779. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1780. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1781. [], "llvm.nvvm.tex.3d.v4f32.s32">;
  1782. def int_nvvm_tex_3d_v4f32_f32
  1783. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1784. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1785. llvm_float_ty], [],
  1786. "llvm.nvvm.tex.3d.v4f32.f32">;
  1787. def int_nvvm_tex_3d_level_v4f32_f32
  1788. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1789. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1790. llvm_float_ty, llvm_float_ty], [],
  1791. "llvm.nvvm.tex.3d.level.v4f32.f32">;
  1792. def int_nvvm_tex_3d_grad_v4f32_f32
  1793. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1794. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1795. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1796. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1797. "llvm.nvvm.tex.3d.grad.v4f32.f32">;
  1798. def int_nvvm_tex_3d_v4s32_s32
  1799. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1800. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1801. [], "llvm.nvvm.tex.3d.v4s32.s32">;
  1802. def int_nvvm_tex_3d_v4s32_f32
  1803. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1804. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1805. llvm_float_ty], [],
  1806. "llvm.nvvm.tex.3d.v4s32.f32">;
  1807. def int_nvvm_tex_3d_level_v4s32_f32
  1808. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1809. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1810. llvm_float_ty, llvm_float_ty], [],
  1811. "llvm.nvvm.tex.3d.level.v4s32.f32">;
  1812. def int_nvvm_tex_3d_grad_v4s32_f32
  1813. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1814. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1815. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1816. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1817. "llvm.nvvm.tex.3d.grad.v4s32.f32">;
  1818. def int_nvvm_tex_3d_v4u32_s32
  1819. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1820. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1821. [], "llvm.nvvm.tex.3d.v4u32.s32">;
  1822. def int_nvvm_tex_3d_v4u32_f32
  1823. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1824. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1825. llvm_float_ty], [],
  1826. "llvm.nvvm.tex.3d.v4u32.f32">;
  1827. def int_nvvm_tex_3d_level_v4u32_f32
  1828. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1829. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1830. llvm_float_ty, llvm_float_ty], [],
  1831. "llvm.nvvm.tex.3d.level.v4u32.f32">;
  1832. def int_nvvm_tex_3d_grad_v4u32_f32
  1833. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1834. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1835. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  1836. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1837. "llvm.nvvm.tex.3d.grad.v4u32.f32">;
  1838. def int_nvvm_tex_cube_v4f32_f32
  1839. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1840. [llvm_i64_ty, llvm_i64_ty,
  1841. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1842. "llvm.nvvm.tex.cube.v4f32.f32">;
  1843. def int_nvvm_tex_cube_level_v4f32_f32
  1844. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1845. [llvm_i64_ty, llvm_i64_ty,
  1846. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1847. "llvm.nvvm.tex.cube.level.v4f32.f32">;
  1848. def int_nvvm_tex_cube_v4s32_f32
  1849. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1850. [llvm_i64_ty, llvm_i64_ty,
  1851. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1852. "llvm.nvvm.tex.cube.v4s32.f32">;
  1853. def int_nvvm_tex_cube_level_v4s32_f32
  1854. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1855. [llvm_i64_ty, llvm_i64_ty,
  1856. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1857. "llvm.nvvm.tex.cube.level.v4s32.f32">;
  1858. def int_nvvm_tex_cube_v4u32_f32
  1859. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1860. [llvm_i64_ty, llvm_i64_ty,
  1861. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1862. "llvm.nvvm.tex.cube.v4u32.f32">;
  1863. def int_nvvm_tex_cube_level_v4u32_f32
  1864. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1865. [llvm_i64_ty, llvm_i64_ty,
  1866. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1867. "llvm.nvvm.tex.cube.level.v4u32.f32">;
  1868. def int_nvvm_tex_cube_array_v4f32_f32
  1869. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1870. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1871. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1872. "llvm.nvvm.tex.cube.array.v4f32.f32">;
  1873. def int_nvvm_tex_cube_array_level_v4f32_f32
  1874. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1875. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1876. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1877. "llvm.nvvm.tex.cube.array.level.v4f32.f32">;
  1878. def int_nvvm_tex_cube_array_v4s32_f32
  1879. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1880. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1881. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1882. "llvm.nvvm.tex.cube.array.v4s32.f32">;
  1883. def int_nvvm_tex_cube_array_level_v4s32_f32
  1884. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1885. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1886. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1887. "llvm.nvvm.tex.cube.array.level.v4s32.f32">;
  1888. def int_nvvm_tex_cube_array_v4u32_f32
  1889. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1890. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1891. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1892. "llvm.nvvm.tex.cube.array.v4u32.f32">;
  1893. def int_nvvm_tex_cube_array_level_v4u32_f32
  1894. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1895. [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
  1896. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  1897. "llvm.nvvm.tex.cube.array.level.v4u32.f32">;
  1898. def int_nvvm_tld4_r_2d_v4f32_f32
  1899. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1900. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1901. "llvm.nvvm.tld4.r.2d.v4f32.f32">;
  1902. def int_nvvm_tld4_g_2d_v4f32_f32
  1903. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1904. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1905. "llvm.nvvm.tld4.g.2d.v4f32.f32">;
  1906. def int_nvvm_tld4_b_2d_v4f32_f32
  1907. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1908. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1909. "llvm.nvvm.tld4.b.2d.v4f32.f32">;
  1910. def int_nvvm_tld4_a_2d_v4f32_f32
  1911. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1912. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1913. "llvm.nvvm.tld4.a.2d.v4f32.f32">;
  1914. def int_nvvm_tld4_r_2d_v4s32_f32
  1915. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1916. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1917. "llvm.nvvm.tld4.r.2d.v4s32.f32">;
  1918. def int_nvvm_tld4_g_2d_v4s32_f32
  1919. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1920. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1921. "llvm.nvvm.tld4.g.2d.v4s32.f32">;
  1922. def int_nvvm_tld4_b_2d_v4s32_f32
  1923. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1924. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1925. "llvm.nvvm.tld4.b.2d.v4s32.f32">;
  1926. def int_nvvm_tld4_a_2d_v4s32_f32
  1927. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1928. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1929. "llvm.nvvm.tld4.a.2d.v4s32.f32">;
  1930. def int_nvvm_tld4_r_2d_v4u32_f32
  1931. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1932. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1933. "llvm.nvvm.tld4.r.2d.v4u32.f32">;
  1934. def int_nvvm_tld4_g_2d_v4u32_f32
  1935. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1936. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1937. "llvm.nvvm.tld4.g.2d.v4u32.f32">;
  1938. def int_nvvm_tld4_b_2d_v4u32_f32
  1939. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1940. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1941. "llvm.nvvm.tld4.b.2d.v4u32.f32">;
  1942. def int_nvvm_tld4_a_2d_v4u32_f32
  1943. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1944. [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1945. "llvm.nvvm.tld4.a.2d.v4u32.f32">;
  1946. // texmode_unified
  1947. def int_nvvm_tex_unified_1d_v4f32_s32
  1948. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1949. [llvm_i64_ty, llvm_i32_ty], [],
  1950. "llvm.nvvm.tex.unified.1d.v4f32.s32">;
  1951. def int_nvvm_tex_unified_1d_v4f32_f32
  1952. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1953. [llvm_i64_ty, llvm_float_ty], [],
  1954. "llvm.nvvm.tex.unified.1d.v4f32.f32">;
  1955. def int_nvvm_tex_unified_1d_level_v4f32_f32
  1956. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1957. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1958. "llvm.nvvm.tex.unified.1d.level.v4f32.f32">;
  1959. def int_nvvm_tex_unified_1d_grad_v4f32_f32
  1960. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  1961. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1962. llvm_float_ty], [],
  1963. "llvm.nvvm.tex.unified.1d.grad.v4f32.f32">;
  1964. def int_nvvm_tex_unified_1d_v4s32_s32
  1965. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1966. [llvm_i64_ty, llvm_i32_ty], [],
  1967. "llvm.nvvm.tex.unified.1d.v4s32.s32">;
  1968. def int_nvvm_tex_unified_1d_v4s32_f32
  1969. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1970. [llvm_i64_ty, llvm_float_ty], [],
  1971. "llvm.nvvm.tex.unified.1d.v4s32.f32">;
  1972. def int_nvvm_tex_unified_1d_level_v4s32_f32
  1973. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1974. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1975. "llvm.nvvm.tex.unified.1d.level.v4s32.f32">;
  1976. def int_nvvm_tex_unified_1d_grad_v4s32_f32
  1977. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1978. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1979. llvm_float_ty], [],
  1980. "llvm.nvvm.tex.unified.1d.grad.v4s32.f32">;
  1981. def int_nvvm_tex_unified_1d_v4u32_s32
  1982. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1983. [llvm_i64_ty, llvm_i32_ty], [],
  1984. "llvm.nvvm.tex.unified.1d.v4u32.s32">;
  1985. def int_nvvm_tex_unified_1d_v4u32_f32
  1986. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1987. [llvm_i64_ty, llvm_float_ty], [],
  1988. "llvm.nvvm.tex.unified.1d.v4u32.f32">;
  1989. def int_nvvm_tex_unified_1d_level_v4u32_f32
  1990. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1991. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  1992. "llvm.nvvm.tex.unified.1d.level.v4u32.f32">;
  1993. def int_nvvm_tex_unified_1d_grad_v4u32_f32
  1994. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  1995. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  1996. llvm_float_ty], [],
  1997. "llvm.nvvm.tex.unified.1d.grad.v4u32.f32">;
  1998. def int_nvvm_tex_unified_1d_array_v4f32_s32
  1999. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2000. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2001. "llvm.nvvm.tex.unified.1d.array.v4f32.s32">;
  2002. def int_nvvm_tex_unified_1d_array_v4f32_f32
  2003. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2004. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  2005. "llvm.nvvm.tex.unified.1d.array.v4f32.f32">;
  2006. def int_nvvm_tex_unified_1d_array_level_v4f32_f32
  2007. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2008. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2009. llvm_float_ty], [],
  2010. "llvm.nvvm.tex.unified.1d.array.level.v4f32.f32">;
  2011. def int_nvvm_tex_unified_1d_array_grad_v4f32_f32
  2012. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2013. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2014. llvm_float_ty, llvm_float_ty], [],
  2015. "llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32">;
  2016. def int_nvvm_tex_unified_1d_array_v4s32_s32
  2017. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2018. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2019. "llvm.nvvm.tex.unified.1d.array.v4s32.s32">;
  2020. def int_nvvm_tex_unified_1d_array_v4s32_f32
  2021. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2022. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  2023. "llvm.nvvm.tex.unified.1d.array.v4s32.f32">;
  2024. def int_nvvm_tex_unified_1d_array_level_v4s32_f32
  2025. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2026. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2027. llvm_float_ty], [],
  2028. "llvm.nvvm.tex.unified.1d.array.level.v4s32.f32">;
  2029. def int_nvvm_tex_unified_1d_array_grad_v4s32_f32
  2030. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2031. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2032. llvm_float_ty, llvm_float_ty], [],
  2033. "llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32">;
  2034. def int_nvvm_tex_unified_1d_array_v4u32_s32
  2035. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2036. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2037. "llvm.nvvm.tex.unified.1d.array.v4u32.s32">;
  2038. def int_nvvm_tex_unified_1d_array_v4u32_f32
  2039. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2040. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
  2041. "llvm.nvvm.tex.unified.1d.array.v4u32.f32">;
  2042. def int_nvvm_tex_unified_1d_array_level_v4u32_f32
  2043. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2044. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2045. llvm_float_ty], [],
  2046. "llvm.nvvm.tex.unified.1d.array.level.v4u32.f32">;
  2047. def int_nvvm_tex_unified_1d_array_grad_v4u32_f32
  2048. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2049. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2050. llvm_float_ty, llvm_float_ty], [],
  2051. "llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32">;
  2052. def int_nvvm_tex_unified_2d_v4f32_s32
  2053. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2054. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2055. "llvm.nvvm.tex.unified.2d.v4f32.s32">;
  2056. def int_nvvm_tex_unified_2d_v4f32_f32
  2057. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2058. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2059. "llvm.nvvm.tex.unified.2d.v4f32.f32">;
  2060. def int_nvvm_tex_unified_2d_level_v4f32_f32
  2061. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2062. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2063. llvm_float_ty], [],
  2064. "llvm.nvvm.tex.unified.2d.level.v4f32.f32">;
  2065. def int_nvvm_tex_unified_2d_grad_v4f32_f32
  2066. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2067. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2068. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2069. "llvm.nvvm.tex.unified.2d.grad.v4f32.f32">;
  2070. def int_nvvm_tex_unified_2d_v4s32_s32
  2071. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2072. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2073. "llvm.nvvm.tex.unified.2d.v4s32.s32">;
  2074. def int_nvvm_tex_unified_2d_v4s32_f32
  2075. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2076. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2077. "llvm.nvvm.tex.unified.2d.v4s32.f32">;
  2078. def int_nvvm_tex_unified_2d_level_v4s32_f32
  2079. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2080. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2081. llvm_float_ty], [],
  2082. "llvm.nvvm.tex.unified.2d.level.v4s32.f32">;
  2083. def int_nvvm_tex_unified_2d_grad_v4s32_f32
  2084. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2085. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2086. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2087. "llvm.nvvm.tex.unified.2d.grad.v4s32.f32">;
  2088. def int_nvvm_tex_unified_2d_v4u32_s32
  2089. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2090. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2091. "llvm.nvvm.tex.unified.2d.v4u32.s32">;
  2092. def int_nvvm_tex_unified_2d_v4u32_f32
  2093. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2094. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2095. "llvm.nvvm.tex.unified.2d.v4u32.f32">;
  2096. def int_nvvm_tex_unified_2d_level_v4u32_f32
  2097. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2098. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2099. llvm_float_ty], [],
  2100. "llvm.nvvm.tex.unified.2d.level.v4u32.f32">;
  2101. def int_nvvm_tex_unified_2d_grad_v4u32_f32
  2102. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2103. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2104. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2105. "llvm.nvvm.tex.unified.2d.grad.v4u32.f32">;
  2106. def int_nvvm_tex_unified_2d_array_v4f32_s32
  2107. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2108. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  2109. llvm_i32_ty], [],
  2110. "llvm.nvvm.tex.unified.2d.array.v4f32.s32">;
  2111. def int_nvvm_tex_unified_2d_array_v4f32_f32
  2112. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2113. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2114. llvm_float_ty], [],
  2115. "llvm.nvvm.tex.unified.2d.array.v4f32.f32">;
  2116. def int_nvvm_tex_unified_2d_array_level_v4f32_f32
  2117. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2118. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2119. llvm_float_ty, llvm_float_ty], [],
  2120. "llvm.nvvm.tex.unified.2d.array.level.v4f32.f32">;
  2121. def int_nvvm_tex_unified_2d_array_grad_v4f32_f32
  2122. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2123. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2124. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2125. llvm_float_ty], [],
  2126. "llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32">;
  2127. def int_nvvm_tex_unified_2d_array_v4s32_s32
  2128. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2129. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  2130. llvm_i32_ty], [],
  2131. "llvm.nvvm.tex.unified.2d.array.v4s32.s32">;
  2132. def int_nvvm_tex_unified_2d_array_v4s32_f32
  2133. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2134. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2135. llvm_float_ty], [],
  2136. "llvm.nvvm.tex.unified.2d.array.v4s32.f32">;
  2137. def int_nvvm_tex_unified_2d_array_level_v4s32_f32
  2138. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2139. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2140. llvm_float_ty, llvm_float_ty], [],
  2141. "llvm.nvvm.tex.unified.2d.array.level.v4s32.f32">;
  2142. def int_nvvm_tex_unified_2d_array_grad_v4s32_f32
  2143. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2144. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2145. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2146. llvm_float_ty], [],
  2147. "llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32">;
  2148. def int_nvvm_tex_unified_2d_array_v4u32_s32
  2149. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2150. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  2151. llvm_i32_ty], [],
  2152. "llvm.nvvm.tex.unified.2d.array.v4u32.s32">;
  2153. def int_nvvm_tex_unified_2d_array_v4u32_f32
  2154. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2155. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2156. llvm_float_ty], [],
  2157. "llvm.nvvm.tex.unified.2d.array.v4u32.f32">;
  2158. def int_nvvm_tex_unified_2d_array_level_v4u32_f32
  2159. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2160. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2161. llvm_float_ty, llvm_float_ty], [],
  2162. "llvm.nvvm.tex.unified.2d.array.level.v4u32.f32">;
  2163. def int_nvvm_tex_unified_2d_array_grad_v4u32_f32
  2164. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2165. [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
  2166. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2167. llvm_float_ty], [],
  2168. "llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32">;
  2169. def int_nvvm_tex_unified_3d_v4f32_s32
  2170. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2171. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2172. [], "llvm.nvvm.tex.unified.3d.v4f32.s32">;
  2173. def int_nvvm_tex_unified_3d_v4f32_f32
  2174. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2175. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2176. llvm_float_ty], [],
  2177. "llvm.nvvm.tex.unified.3d.v4f32.f32">;
  2178. def int_nvvm_tex_unified_3d_level_v4f32_f32
  2179. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2180. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2181. llvm_float_ty, llvm_float_ty], [],
  2182. "llvm.nvvm.tex.unified.3d.level.v4f32.f32">;
  2183. def int_nvvm_tex_unified_3d_grad_v4f32_f32
  2184. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2185. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2186. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2187. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2188. "llvm.nvvm.tex.unified.3d.grad.v4f32.f32">;
  2189. def int_nvvm_tex_unified_3d_v4s32_s32
  2190. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2191. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2192. [], "llvm.nvvm.tex.unified.3d.v4s32.s32">;
  2193. def int_nvvm_tex_unified_3d_v4s32_f32
  2194. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2195. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2196. llvm_float_ty], [],
  2197. "llvm.nvvm.tex.unified.3d.v4s32.f32">;
  2198. def int_nvvm_tex_unified_3d_level_v4s32_f32
  2199. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2200. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2201. llvm_float_ty, llvm_float_ty], [],
  2202. "llvm.nvvm.tex.unified.3d.level.v4s32.f32">;
  2203. def int_nvvm_tex_unified_3d_grad_v4s32_f32
  2204. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2205. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2206. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2207. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2208. "llvm.nvvm.tex.unified.3d.grad.v4s32.f32">;
  2209. def int_nvvm_tex_unified_3d_v4u32_s32
  2210. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2211. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2212. [], "llvm.nvvm.tex.unified.3d.v4u32.s32">;
  2213. def int_nvvm_tex_unified_3d_v4u32_f32
  2214. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2215. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2216. llvm_float_ty], [],
  2217. "llvm.nvvm.tex.unified.3d.v4u32.f32">;
  2218. def int_nvvm_tex_unified_3d_level_v4u32_f32
  2219. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2220. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2221. llvm_float_ty, llvm_float_ty], [],
  2222. "llvm.nvvm.tex.unified.3d.level.v4u32.f32">;
  2223. def int_nvvm_tex_unified_3d_grad_v4u32_f32
  2224. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2225. [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
  2226. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
  2227. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2228. "llvm.nvvm.tex.unified.3d.grad.v4u32.f32">;
  2229. def int_nvvm_tex_unified_cube_v4f32_f32
  2230. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2231. [llvm_i64_ty,
  2232. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2233. "llvm.nvvm.tex.unified.cube.v4f32.f32">;
  2234. def int_nvvm_tex_unified_cube_level_v4f32_f32
  2235. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2236. [llvm_i64_ty,
  2237. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2238. "llvm.nvvm.tex.unified.cube.level.v4f32.f32">;
  2239. def int_nvvm_tex_unified_cube_v4s32_f32
  2240. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2241. [llvm_i64_ty,
  2242. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2243. "llvm.nvvm.tex.unified.cube.v4s32.f32">;
  2244. def int_nvvm_tex_unified_cube_level_v4s32_f32
  2245. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2246. [llvm_i64_ty,
  2247. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2248. "llvm.nvvm.tex.unified.cube.level.v4s32.f32">;
  2249. def int_nvvm_tex_unified_cube_v4u32_f32
  2250. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2251. [llvm_i64_ty,
  2252. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2253. "llvm.nvvm.tex.unified.cube.v4u32.f32">;
  2254. def int_nvvm_tex_unified_cube_level_v4u32_f32
  2255. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2256. [llvm_i64_ty,
  2257. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2258. "llvm.nvvm.tex.unified.cube.level.v4u32.f32">;
  2259. def int_nvvm_tex_unified_cube_array_v4f32_f32
  2260. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2261. [llvm_i64_ty, llvm_i32_ty,
  2262. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2263. "llvm.nvvm.tex.unified.cube.array.v4f32.f32">;
  2264. def int_nvvm_tex_unified_cube_array_level_v4f32_f32
  2265. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2266. [llvm_i64_ty, llvm_i32_ty,
  2267. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2268. "llvm.nvvm.tex.unified.cube.array.level.v4f32.f32">;
  2269. def int_nvvm_tex_unified_cube_array_v4s32_f32
  2270. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2271. [llvm_i64_ty, llvm_i32_ty,
  2272. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2273. "llvm.nvvm.tex.unified.cube.array.v4s32.f32">;
  2274. def int_nvvm_tex_unified_cube_array_level_v4s32_f32
  2275. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2276. [llvm_i64_ty, llvm_i32_ty,
  2277. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2278. "llvm.nvvm.tex.unified.cube.array.level.v4s32.f32">;
  2279. def int_nvvm_tex_unified_cube_array_v4u32_f32
  2280. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2281. [llvm_i64_ty, llvm_i32_ty,
  2282. llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2283. "llvm.nvvm.tex.unified.cube.array.v4u32.f32">;
  2284. def int_nvvm_tex_unified_cube_array_level_v4u32_f32
  2285. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2286. [llvm_i64_ty, llvm_i32_ty,
  2287. llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
  2288. "llvm.nvvm.tex.unified.cube.array.level.v4u32.f32">;
  2289. def int_nvvm_tld4_unified_r_2d_v4f32_f32
  2290. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2291. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2292. "llvm.nvvm.tld4.unified.r.2d.v4f32.f32">;
  2293. def int_nvvm_tld4_unified_g_2d_v4f32_f32
  2294. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2295. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2296. "llvm.nvvm.tld4.unified.g.2d.v4f32.f32">;
  2297. def int_nvvm_tld4_unified_b_2d_v4f32_f32
  2298. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2299. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2300. "llvm.nvvm.tld4.unified.b.2d.v4f32.f32">;
  2301. def int_nvvm_tld4_unified_a_2d_v4f32_f32
  2302. : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
  2303. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2304. "llvm.nvvm.tld4.unified.a.2d.v4f32.f32">;
  2305. def int_nvvm_tld4_unified_r_2d_v4s32_f32
  2306. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2307. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2308. "llvm.nvvm.tld4.unified.r.2d.v4s32.f32">;
  2309. def int_nvvm_tld4_unified_g_2d_v4s32_f32
  2310. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2311. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2312. "llvm.nvvm.tld4.unified.g.2d.v4s32.f32">;
  2313. def int_nvvm_tld4_unified_b_2d_v4s32_f32
  2314. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2315. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2316. "llvm.nvvm.tld4.unified.b.2d.v4s32.f32">;
  2317. def int_nvvm_tld4_unified_a_2d_v4s32_f32
  2318. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2319. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2320. "llvm.nvvm.tld4.unified.a.2d.v4s32.f32">;
  2321. def int_nvvm_tld4_unified_r_2d_v4u32_f32
  2322. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2323. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2324. "llvm.nvvm.tld4.unified.r.2d.v4u32.f32">;
  2325. def int_nvvm_tld4_unified_g_2d_v4u32_f32
  2326. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2327. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2328. "llvm.nvvm.tld4.unified.g.2d.v4u32.f32">;
  2329. def int_nvvm_tld4_unified_b_2d_v4u32_f32
  2330. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2331. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2332. "llvm.nvvm.tld4.unified.b.2d.v4u32.f32">;
  2333. def int_nvvm_tld4_unified_a_2d_v4u32_f32
  2334. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2335. [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
  2336. "llvm.nvvm.tld4.unified.a.2d.v4u32.f32">;
  2337. //=== Surface Load
  2338. // .clamp variants
  2339. def int_nvvm_suld_1d_i8_clamp
  2340. : Intrinsic<[llvm_i16_ty],
  2341. [llvm_i64_ty, llvm_i32_ty], [],
  2342. "llvm.nvvm.suld.1d.i8.clamp">;
  2343. def int_nvvm_suld_1d_i16_clamp
  2344. : Intrinsic<[llvm_i16_ty],
  2345. [llvm_i64_ty, llvm_i32_ty], [],
  2346. "llvm.nvvm.suld.1d.i16.clamp">;
  2347. def int_nvvm_suld_1d_i32_clamp
  2348. : Intrinsic<[llvm_i32_ty],
  2349. [llvm_i64_ty, llvm_i32_ty], [],
  2350. "llvm.nvvm.suld.1d.i32.clamp">;
  2351. def int_nvvm_suld_1d_i64_clamp
  2352. : Intrinsic<[llvm_i64_ty],
  2353. [llvm_i64_ty, llvm_i32_ty], [],
  2354. "llvm.nvvm.suld.1d.i64.clamp">;
  2355. def int_nvvm_suld_1d_v2i8_clamp
  2356. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2357. [llvm_i64_ty, llvm_i32_ty], [],
  2358. "llvm.nvvm.suld.1d.v2i8.clamp">;
  2359. def int_nvvm_suld_1d_v2i16_clamp
  2360. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2361. [llvm_i64_ty, llvm_i32_ty], [],
  2362. "llvm.nvvm.suld.1d.v2i16.clamp">;
  2363. def int_nvvm_suld_1d_v2i32_clamp
  2364. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2365. [llvm_i64_ty, llvm_i32_ty], [],
  2366. "llvm.nvvm.suld.1d.v2i32.clamp">;
  2367. def int_nvvm_suld_1d_v2i64_clamp
  2368. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2369. [llvm_i64_ty, llvm_i32_ty], [],
  2370. "llvm.nvvm.suld.1d.v2i64.clamp">;
  2371. def int_nvvm_suld_1d_v4i8_clamp
  2372. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2373. [llvm_i64_ty, llvm_i32_ty], [],
  2374. "llvm.nvvm.suld.1d.v4i8.clamp">;
  2375. def int_nvvm_suld_1d_v4i16_clamp
  2376. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2377. [llvm_i64_ty, llvm_i32_ty], [],
  2378. "llvm.nvvm.suld.1d.v4i16.clamp">;
  2379. def int_nvvm_suld_1d_v4i32_clamp
  2380. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2381. [llvm_i64_ty, llvm_i32_ty], [],
  2382. "llvm.nvvm.suld.1d.v4i32.clamp">;
  2383. def int_nvvm_suld_1d_array_i8_clamp
  2384. : Intrinsic<[llvm_i16_ty],
  2385. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2386. "llvm.nvvm.suld.1d.array.i8.clamp">;
  2387. def int_nvvm_suld_1d_array_i16_clamp
  2388. : Intrinsic<[llvm_i16_ty],
  2389. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2390. "llvm.nvvm.suld.1d.array.i16.clamp">;
  2391. def int_nvvm_suld_1d_array_i32_clamp
  2392. : Intrinsic<[llvm_i32_ty],
  2393. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2394. "llvm.nvvm.suld.1d.array.i32.clamp">;
  2395. def int_nvvm_suld_1d_array_i64_clamp
  2396. : Intrinsic<[llvm_i64_ty],
  2397. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2398. "llvm.nvvm.suld.1d.array.i64.clamp">;
  2399. def int_nvvm_suld_1d_array_v2i8_clamp
  2400. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2401. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2402. "llvm.nvvm.suld.1d.array.v2i8.clamp">;
  2403. def int_nvvm_suld_1d_array_v2i16_clamp
  2404. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2405. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2406. "llvm.nvvm.suld.1d.array.v2i16.clamp">;
  2407. def int_nvvm_suld_1d_array_v2i32_clamp
  2408. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2409. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2410. "llvm.nvvm.suld.1d.array.v2i32.clamp">;
  2411. def int_nvvm_suld_1d_array_v2i64_clamp
  2412. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2413. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2414. "llvm.nvvm.suld.1d.array.v2i64.clamp">;
  2415. def int_nvvm_suld_1d_array_v4i8_clamp
  2416. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2417. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2418. "llvm.nvvm.suld.1d.array.v4i8.clamp">;
  2419. def int_nvvm_suld_1d_array_v4i16_clamp
  2420. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2421. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2422. "llvm.nvvm.suld.1d.array.v4i16.clamp">;
  2423. def int_nvvm_suld_1d_array_v4i32_clamp
  2424. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2425. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2426. "llvm.nvvm.suld.1d.array.v4i32.clamp">;
  2427. def int_nvvm_suld_2d_i8_clamp
  2428. : Intrinsic<[llvm_i16_ty],
  2429. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2430. "llvm.nvvm.suld.2d.i8.clamp">;
  2431. def int_nvvm_suld_2d_i16_clamp
  2432. : Intrinsic<[llvm_i16_ty],
  2433. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2434. "llvm.nvvm.suld.2d.i16.clamp">;
  2435. def int_nvvm_suld_2d_i32_clamp
  2436. : Intrinsic<[llvm_i32_ty],
  2437. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2438. "llvm.nvvm.suld.2d.i32.clamp">;
  2439. def int_nvvm_suld_2d_i64_clamp
  2440. : Intrinsic<[llvm_i64_ty],
  2441. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2442. "llvm.nvvm.suld.2d.i64.clamp">;
  2443. def int_nvvm_suld_2d_v2i8_clamp
  2444. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2445. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2446. "llvm.nvvm.suld.2d.v2i8.clamp">;
  2447. def int_nvvm_suld_2d_v2i16_clamp
  2448. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2449. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2450. "llvm.nvvm.suld.2d.v2i16.clamp">;
  2451. def int_nvvm_suld_2d_v2i32_clamp
  2452. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2453. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2454. "llvm.nvvm.suld.2d.v2i32.clamp">;
  2455. def int_nvvm_suld_2d_v2i64_clamp
  2456. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2457. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2458. "llvm.nvvm.suld.2d.v2i64.clamp">;
  2459. def int_nvvm_suld_2d_v4i8_clamp
  2460. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2461. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2462. "llvm.nvvm.suld.2d.v4i8.clamp">;
  2463. def int_nvvm_suld_2d_v4i16_clamp
  2464. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2465. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2466. "llvm.nvvm.suld.2d.v4i16.clamp">;
  2467. def int_nvvm_suld_2d_v4i32_clamp
  2468. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2469. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2470. "llvm.nvvm.suld.2d.v4i32.clamp">;
  2471. def int_nvvm_suld_2d_array_i8_clamp
  2472. : Intrinsic<[llvm_i16_ty],
  2473. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2474. "llvm.nvvm.suld.2d.array.i8.clamp">;
  2475. def int_nvvm_suld_2d_array_i16_clamp
  2476. : Intrinsic<[llvm_i16_ty],
  2477. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2478. "llvm.nvvm.suld.2d.array.i16.clamp">;
  2479. def int_nvvm_suld_2d_array_i32_clamp
  2480. : Intrinsic<[llvm_i32_ty],
  2481. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2482. "llvm.nvvm.suld.2d.array.i32.clamp">;
  2483. def int_nvvm_suld_2d_array_i64_clamp
  2484. : Intrinsic<[llvm_i64_ty],
  2485. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2486. "llvm.nvvm.suld.2d.array.i64.clamp">;
  2487. def int_nvvm_suld_2d_array_v2i8_clamp
  2488. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2489. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2490. "llvm.nvvm.suld.2d.array.v2i8.clamp">;
  2491. def int_nvvm_suld_2d_array_v2i16_clamp
  2492. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2493. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2494. "llvm.nvvm.suld.2d.array.v2i16.clamp">;
  2495. def int_nvvm_suld_2d_array_v2i32_clamp
  2496. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2497. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2498. "llvm.nvvm.suld.2d.array.v2i32.clamp">;
  2499. def int_nvvm_suld_2d_array_v2i64_clamp
  2500. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2501. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2502. "llvm.nvvm.suld.2d.array.v2i64.clamp">;
  2503. def int_nvvm_suld_2d_array_v4i8_clamp
  2504. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2505. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2506. "llvm.nvvm.suld.2d.array.v4i8.clamp">;
  2507. def int_nvvm_suld_2d_array_v4i16_clamp
  2508. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2509. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2510. "llvm.nvvm.suld.2d.array.v4i16.clamp">;
  2511. def int_nvvm_suld_2d_array_v4i32_clamp
  2512. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2513. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2514. "llvm.nvvm.suld.2d.array.v4i32.clamp">;
  2515. def int_nvvm_suld_3d_i8_clamp
  2516. : Intrinsic<[llvm_i16_ty],
  2517. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2518. "llvm.nvvm.suld.3d.i8.clamp">;
  2519. def int_nvvm_suld_3d_i16_clamp
  2520. : Intrinsic<[llvm_i16_ty],
  2521. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2522. "llvm.nvvm.suld.3d.i16.clamp">;
  2523. def int_nvvm_suld_3d_i32_clamp
  2524. : Intrinsic<[llvm_i32_ty],
  2525. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2526. "llvm.nvvm.suld.3d.i32.clamp">;
  2527. def int_nvvm_suld_3d_i64_clamp
  2528. : Intrinsic<[llvm_i64_ty],
  2529. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2530. "llvm.nvvm.suld.3d.i64.clamp">;
  2531. def int_nvvm_suld_3d_v2i8_clamp
  2532. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2533. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2534. "llvm.nvvm.suld.3d.v2i8.clamp">;
  2535. def int_nvvm_suld_3d_v2i16_clamp
  2536. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2537. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2538. "llvm.nvvm.suld.3d.v2i16.clamp">;
  2539. def int_nvvm_suld_3d_v2i32_clamp
  2540. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2541. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2542. "llvm.nvvm.suld.3d.v2i32.clamp">;
  2543. def int_nvvm_suld_3d_v2i64_clamp
  2544. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2545. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2546. "llvm.nvvm.suld.3d.v2i64.clamp">;
  2547. def int_nvvm_suld_3d_v4i8_clamp
  2548. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2549. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2550. "llvm.nvvm.suld.3d.v4i8.clamp">;
  2551. def int_nvvm_suld_3d_v4i16_clamp
  2552. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2553. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2554. "llvm.nvvm.suld.3d.v4i16.clamp">;
  2555. def int_nvvm_suld_3d_v4i32_clamp
  2556. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2557. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2558. "llvm.nvvm.suld.3d.v4i32.clamp">;
  2559. // .trap variants
  2560. def int_nvvm_suld_1d_i8_trap
  2561. : Intrinsic<[llvm_i16_ty],
  2562. [llvm_i64_ty, llvm_i32_ty], [],
  2563. "llvm.nvvm.suld.1d.i8.trap">;
  2564. def int_nvvm_suld_1d_i16_trap
  2565. : Intrinsic<[llvm_i16_ty],
  2566. [llvm_i64_ty, llvm_i32_ty], [],
  2567. "llvm.nvvm.suld.1d.i16.trap">;
  2568. def int_nvvm_suld_1d_i32_trap
  2569. : Intrinsic<[llvm_i32_ty],
  2570. [llvm_i64_ty, llvm_i32_ty], [],
  2571. "llvm.nvvm.suld.1d.i32.trap">;
  2572. def int_nvvm_suld_1d_i64_trap
  2573. : Intrinsic<[llvm_i64_ty],
  2574. [llvm_i64_ty, llvm_i32_ty], [],
  2575. "llvm.nvvm.suld.1d.i64.trap">;
  2576. def int_nvvm_suld_1d_v2i8_trap
  2577. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2578. [llvm_i64_ty, llvm_i32_ty], [],
  2579. "llvm.nvvm.suld.1d.v2i8.trap">;
  2580. def int_nvvm_suld_1d_v2i16_trap
  2581. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2582. [llvm_i64_ty, llvm_i32_ty], [],
  2583. "llvm.nvvm.suld.1d.v2i16.trap">;
  2584. def int_nvvm_suld_1d_v2i32_trap
  2585. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2586. [llvm_i64_ty, llvm_i32_ty], [],
  2587. "llvm.nvvm.suld.1d.v2i32.trap">;
  2588. def int_nvvm_suld_1d_v2i64_trap
  2589. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2590. [llvm_i64_ty, llvm_i32_ty], [],
  2591. "llvm.nvvm.suld.1d.v2i64.trap">;
  2592. def int_nvvm_suld_1d_v4i8_trap
  2593. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2594. [llvm_i64_ty, llvm_i32_ty], [],
  2595. "llvm.nvvm.suld.1d.v4i8.trap">;
  2596. def int_nvvm_suld_1d_v4i16_trap
  2597. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2598. [llvm_i64_ty, llvm_i32_ty], [],
  2599. "llvm.nvvm.suld.1d.v4i16.trap">;
  2600. def int_nvvm_suld_1d_v4i32_trap
  2601. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2602. [llvm_i64_ty, llvm_i32_ty], [],
  2603. "llvm.nvvm.suld.1d.v4i32.trap">;
  2604. def int_nvvm_suld_1d_array_i8_trap
  2605. : Intrinsic<[llvm_i16_ty],
  2606. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2607. "llvm.nvvm.suld.1d.array.i8.trap">;
  2608. def int_nvvm_suld_1d_array_i16_trap
  2609. : Intrinsic<[llvm_i16_ty],
  2610. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2611. "llvm.nvvm.suld.1d.array.i16.trap">;
  2612. def int_nvvm_suld_1d_array_i32_trap
  2613. : Intrinsic<[llvm_i32_ty],
  2614. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2615. "llvm.nvvm.suld.1d.array.i32.trap">;
  2616. def int_nvvm_suld_1d_array_i64_trap
  2617. : Intrinsic<[llvm_i64_ty],
  2618. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2619. "llvm.nvvm.suld.1d.array.i64.trap">;
  2620. def int_nvvm_suld_1d_array_v2i8_trap
  2621. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2622. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2623. "llvm.nvvm.suld.1d.array.v2i8.trap">;
  2624. def int_nvvm_suld_1d_array_v2i16_trap
  2625. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2626. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2627. "llvm.nvvm.suld.1d.array.v2i16.trap">;
  2628. def int_nvvm_suld_1d_array_v2i32_trap
  2629. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2630. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2631. "llvm.nvvm.suld.1d.array.v2i32.trap">;
  2632. def int_nvvm_suld_1d_array_v2i64_trap
  2633. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2634. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2635. "llvm.nvvm.suld.1d.array.v2i64.trap">;
  2636. def int_nvvm_suld_1d_array_v4i8_trap
  2637. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2638. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2639. "llvm.nvvm.suld.1d.array.v4i8.trap">;
  2640. def int_nvvm_suld_1d_array_v4i16_trap
  2641. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2642. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2643. "llvm.nvvm.suld.1d.array.v4i16.trap">;
  2644. def int_nvvm_suld_1d_array_v4i32_trap
  2645. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2646. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2647. "llvm.nvvm.suld.1d.array.v4i32.trap">;
  2648. def int_nvvm_suld_2d_i8_trap
  2649. : Intrinsic<[llvm_i16_ty],
  2650. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2651. "llvm.nvvm.suld.2d.i8.trap">;
  2652. def int_nvvm_suld_2d_i16_trap
  2653. : Intrinsic<[llvm_i16_ty],
  2654. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2655. "llvm.nvvm.suld.2d.i16.trap">;
  2656. def int_nvvm_suld_2d_i32_trap
  2657. : Intrinsic<[llvm_i32_ty],
  2658. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2659. "llvm.nvvm.suld.2d.i32.trap">;
  2660. def int_nvvm_suld_2d_i64_trap
  2661. : Intrinsic<[llvm_i64_ty],
  2662. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2663. "llvm.nvvm.suld.2d.i64.trap">;
  2664. def int_nvvm_suld_2d_v2i8_trap
  2665. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2666. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2667. "llvm.nvvm.suld.2d.v2i8.trap">;
  2668. def int_nvvm_suld_2d_v2i16_trap
  2669. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2670. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2671. "llvm.nvvm.suld.2d.v2i16.trap">;
  2672. def int_nvvm_suld_2d_v2i32_trap
  2673. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2674. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2675. "llvm.nvvm.suld.2d.v2i32.trap">;
  2676. def int_nvvm_suld_2d_v2i64_trap
  2677. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2678. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2679. "llvm.nvvm.suld.2d.v2i64.trap">;
  2680. def int_nvvm_suld_2d_v4i8_trap
  2681. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2682. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2683. "llvm.nvvm.suld.2d.v4i8.trap">;
  2684. def int_nvvm_suld_2d_v4i16_trap
  2685. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2686. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2687. "llvm.nvvm.suld.2d.v4i16.trap">;
  2688. def int_nvvm_suld_2d_v4i32_trap
  2689. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2690. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2691. "llvm.nvvm.suld.2d.v4i32.trap">;
  2692. def int_nvvm_suld_2d_array_i8_trap
  2693. : Intrinsic<[llvm_i16_ty],
  2694. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2695. "llvm.nvvm.suld.2d.array.i8.trap">;
  2696. def int_nvvm_suld_2d_array_i16_trap
  2697. : Intrinsic<[llvm_i16_ty],
  2698. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2699. "llvm.nvvm.suld.2d.array.i16.trap">;
  2700. def int_nvvm_suld_2d_array_i32_trap
  2701. : Intrinsic<[llvm_i32_ty],
  2702. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2703. "llvm.nvvm.suld.2d.array.i32.trap">;
  2704. def int_nvvm_suld_2d_array_i64_trap
  2705. : Intrinsic<[llvm_i64_ty],
  2706. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2707. "llvm.nvvm.suld.2d.array.i64.trap">;
  2708. def int_nvvm_suld_2d_array_v2i8_trap
  2709. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2710. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2711. "llvm.nvvm.suld.2d.array.v2i8.trap">;
  2712. def int_nvvm_suld_2d_array_v2i16_trap
  2713. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2714. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2715. "llvm.nvvm.suld.2d.array.v2i16.trap">;
  2716. def int_nvvm_suld_2d_array_v2i32_trap
  2717. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2718. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2719. "llvm.nvvm.suld.2d.array.v2i32.trap">;
  2720. def int_nvvm_suld_2d_array_v2i64_trap
  2721. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2722. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2723. "llvm.nvvm.suld.2d.array.v2i64.trap">;
  2724. def int_nvvm_suld_2d_array_v4i8_trap
  2725. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2726. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2727. "llvm.nvvm.suld.2d.array.v4i8.trap">;
  2728. def int_nvvm_suld_2d_array_v4i16_trap
  2729. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2730. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2731. "llvm.nvvm.suld.2d.array.v4i16.trap">;
  2732. def int_nvvm_suld_2d_array_v4i32_trap
  2733. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2734. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2735. "llvm.nvvm.suld.2d.array.v4i32.trap">;
  2736. def int_nvvm_suld_3d_i8_trap
  2737. : Intrinsic<[llvm_i16_ty],
  2738. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2739. "llvm.nvvm.suld.3d.i8.trap">;
  2740. def int_nvvm_suld_3d_i16_trap
  2741. : Intrinsic<[llvm_i16_ty],
  2742. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2743. "llvm.nvvm.suld.3d.i16.trap">;
  2744. def int_nvvm_suld_3d_i32_trap
  2745. : Intrinsic<[llvm_i32_ty],
  2746. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2747. "llvm.nvvm.suld.3d.i32.trap">;
  2748. def int_nvvm_suld_3d_i64_trap
  2749. : Intrinsic<[llvm_i64_ty],
  2750. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2751. "llvm.nvvm.suld.3d.i64.trap">;
  2752. def int_nvvm_suld_3d_v2i8_trap
  2753. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2754. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2755. "llvm.nvvm.suld.3d.v2i8.trap">;
  2756. def int_nvvm_suld_3d_v2i16_trap
  2757. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2758. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2759. "llvm.nvvm.suld.3d.v2i16.trap">;
  2760. def int_nvvm_suld_3d_v2i32_trap
  2761. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2762. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2763. "llvm.nvvm.suld.3d.v2i32.trap">;
  2764. def int_nvvm_suld_3d_v2i64_trap
  2765. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2766. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2767. "llvm.nvvm.suld.3d.v2i64.trap">;
  2768. def int_nvvm_suld_3d_v4i8_trap
  2769. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2770. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2771. "llvm.nvvm.suld.3d.v4i8.trap">;
  2772. def int_nvvm_suld_3d_v4i16_trap
  2773. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2774. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2775. "llvm.nvvm.suld.3d.v4i16.trap">;
  2776. def int_nvvm_suld_3d_v4i32_trap
  2777. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2778. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2779. "llvm.nvvm.suld.3d.v4i32.trap">;
  2780. // .zero variants
  2781. def int_nvvm_suld_1d_i8_zero
  2782. : Intrinsic<[llvm_i16_ty],
  2783. [llvm_i64_ty, llvm_i32_ty], [],
  2784. "llvm.nvvm.suld.1d.i8.zero">;
  2785. def int_nvvm_suld_1d_i16_zero
  2786. : Intrinsic<[llvm_i16_ty],
  2787. [llvm_i64_ty, llvm_i32_ty], [],
  2788. "llvm.nvvm.suld.1d.i16.zero">;
  2789. def int_nvvm_suld_1d_i32_zero
  2790. : Intrinsic<[llvm_i32_ty],
  2791. [llvm_i64_ty, llvm_i32_ty], [],
  2792. "llvm.nvvm.suld.1d.i32.zero">;
  2793. def int_nvvm_suld_1d_i64_zero
  2794. : Intrinsic<[llvm_i64_ty],
  2795. [llvm_i64_ty, llvm_i32_ty], [],
  2796. "llvm.nvvm.suld.1d.i64.zero">;
  2797. def int_nvvm_suld_1d_v2i8_zero
  2798. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2799. [llvm_i64_ty, llvm_i32_ty], [],
  2800. "llvm.nvvm.suld.1d.v2i8.zero">;
  2801. def int_nvvm_suld_1d_v2i16_zero
  2802. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2803. [llvm_i64_ty, llvm_i32_ty], [],
  2804. "llvm.nvvm.suld.1d.v2i16.zero">;
  2805. def int_nvvm_suld_1d_v2i32_zero
  2806. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2807. [llvm_i64_ty, llvm_i32_ty], [],
  2808. "llvm.nvvm.suld.1d.v2i32.zero">;
  2809. def int_nvvm_suld_1d_v2i64_zero
  2810. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2811. [llvm_i64_ty, llvm_i32_ty], [],
  2812. "llvm.nvvm.suld.1d.v2i64.zero">;
  2813. def int_nvvm_suld_1d_v4i8_zero
  2814. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2815. [llvm_i64_ty, llvm_i32_ty], [],
  2816. "llvm.nvvm.suld.1d.v4i8.zero">;
  2817. def int_nvvm_suld_1d_v4i16_zero
  2818. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2819. [llvm_i64_ty, llvm_i32_ty], [],
  2820. "llvm.nvvm.suld.1d.v4i16.zero">;
  2821. def int_nvvm_suld_1d_v4i32_zero
  2822. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2823. [llvm_i64_ty, llvm_i32_ty], [],
  2824. "llvm.nvvm.suld.1d.v4i32.zero">;
  2825. def int_nvvm_suld_1d_array_i8_zero
  2826. : Intrinsic<[llvm_i16_ty],
  2827. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2828. "llvm.nvvm.suld.1d.array.i8.zero">;
  2829. def int_nvvm_suld_1d_array_i16_zero
  2830. : Intrinsic<[llvm_i16_ty],
  2831. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2832. "llvm.nvvm.suld.1d.array.i16.zero">;
  2833. def int_nvvm_suld_1d_array_i32_zero
  2834. : Intrinsic<[llvm_i32_ty],
  2835. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2836. "llvm.nvvm.suld.1d.array.i32.zero">;
  2837. def int_nvvm_suld_1d_array_i64_zero
  2838. : Intrinsic<[llvm_i64_ty],
  2839. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2840. "llvm.nvvm.suld.1d.array.i64.zero">;
  2841. def int_nvvm_suld_1d_array_v2i8_zero
  2842. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2843. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2844. "llvm.nvvm.suld.1d.array.v2i8.zero">;
  2845. def int_nvvm_suld_1d_array_v2i16_zero
  2846. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2847. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2848. "llvm.nvvm.suld.1d.array.v2i16.zero">;
  2849. def int_nvvm_suld_1d_array_v2i32_zero
  2850. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2851. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2852. "llvm.nvvm.suld.1d.array.v2i32.zero">;
  2853. def int_nvvm_suld_1d_array_v2i64_zero
  2854. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2855. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2856. "llvm.nvvm.suld.1d.array.v2i64.zero">;
  2857. def int_nvvm_suld_1d_array_v4i8_zero
  2858. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2859. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2860. "llvm.nvvm.suld.1d.array.v4i8.zero">;
  2861. def int_nvvm_suld_1d_array_v4i16_zero
  2862. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2863. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2864. "llvm.nvvm.suld.1d.array.v4i16.zero">;
  2865. def int_nvvm_suld_1d_array_v4i32_zero
  2866. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2867. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2868. "llvm.nvvm.suld.1d.array.v4i32.zero">;
  2869. def int_nvvm_suld_2d_i8_zero
  2870. : Intrinsic<[llvm_i16_ty],
  2871. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2872. "llvm.nvvm.suld.2d.i8.zero">;
  2873. def int_nvvm_suld_2d_i16_zero
  2874. : Intrinsic<[llvm_i16_ty],
  2875. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2876. "llvm.nvvm.suld.2d.i16.zero">;
  2877. def int_nvvm_suld_2d_i32_zero
  2878. : Intrinsic<[llvm_i32_ty],
  2879. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2880. "llvm.nvvm.suld.2d.i32.zero">;
  2881. def int_nvvm_suld_2d_i64_zero
  2882. : Intrinsic<[llvm_i64_ty],
  2883. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2884. "llvm.nvvm.suld.2d.i64.zero">;
  2885. def int_nvvm_suld_2d_v2i8_zero
  2886. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2887. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2888. "llvm.nvvm.suld.2d.v2i8.zero">;
  2889. def int_nvvm_suld_2d_v2i16_zero
  2890. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2891. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2892. "llvm.nvvm.suld.2d.v2i16.zero">;
  2893. def int_nvvm_suld_2d_v2i32_zero
  2894. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2895. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2896. "llvm.nvvm.suld.2d.v2i32.zero">;
  2897. def int_nvvm_suld_2d_v2i64_zero
  2898. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2899. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2900. "llvm.nvvm.suld.2d.v2i64.zero">;
  2901. def int_nvvm_suld_2d_v4i8_zero
  2902. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2903. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2904. "llvm.nvvm.suld.2d.v4i8.zero">;
  2905. def int_nvvm_suld_2d_v4i16_zero
  2906. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2907. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2908. "llvm.nvvm.suld.2d.v4i16.zero">;
  2909. def int_nvvm_suld_2d_v4i32_zero
  2910. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2911. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  2912. "llvm.nvvm.suld.2d.v4i32.zero">;
  2913. def int_nvvm_suld_2d_array_i8_zero
  2914. : Intrinsic<[llvm_i16_ty],
  2915. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2916. "llvm.nvvm.suld.2d.array.i8.zero">;
  2917. def int_nvvm_suld_2d_array_i16_zero
  2918. : Intrinsic<[llvm_i16_ty],
  2919. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2920. "llvm.nvvm.suld.2d.array.i16.zero">;
  2921. def int_nvvm_suld_2d_array_i32_zero
  2922. : Intrinsic<[llvm_i32_ty],
  2923. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2924. "llvm.nvvm.suld.2d.array.i32.zero">;
  2925. def int_nvvm_suld_2d_array_i64_zero
  2926. : Intrinsic<[llvm_i64_ty],
  2927. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2928. "llvm.nvvm.suld.2d.array.i64.zero">;
  2929. def int_nvvm_suld_2d_array_v2i8_zero
  2930. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2931. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2932. "llvm.nvvm.suld.2d.array.v2i8.zero">;
  2933. def int_nvvm_suld_2d_array_v2i16_zero
  2934. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2935. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2936. "llvm.nvvm.suld.2d.array.v2i16.zero">;
  2937. def int_nvvm_suld_2d_array_v2i32_zero
  2938. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2939. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2940. "llvm.nvvm.suld.2d.array.v2i32.zero">;
  2941. def int_nvvm_suld_2d_array_v2i64_zero
  2942. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2943. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2944. "llvm.nvvm.suld.2d.array.v2i64.zero">;
  2945. def int_nvvm_suld_2d_array_v4i8_zero
  2946. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2947. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2948. "llvm.nvvm.suld.2d.array.v4i8.zero">;
  2949. def int_nvvm_suld_2d_array_v4i16_zero
  2950. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2951. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2952. "llvm.nvvm.suld.2d.array.v4i16.zero">;
  2953. def int_nvvm_suld_2d_array_v4i32_zero
  2954. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2955. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2956. "llvm.nvvm.suld.2d.array.v4i32.zero">;
  2957. def int_nvvm_suld_3d_i8_zero
  2958. : Intrinsic<[llvm_i16_ty],
  2959. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2960. "llvm.nvvm.suld.3d.i8.zero">;
  2961. def int_nvvm_suld_3d_i16_zero
  2962. : Intrinsic<[llvm_i16_ty],
  2963. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2964. "llvm.nvvm.suld.3d.i16.zero">;
  2965. def int_nvvm_suld_3d_i32_zero
  2966. : Intrinsic<[llvm_i32_ty],
  2967. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2968. "llvm.nvvm.suld.3d.i32.zero">;
  2969. def int_nvvm_suld_3d_i64_zero
  2970. : Intrinsic<[llvm_i64_ty],
  2971. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2972. "llvm.nvvm.suld.3d.i64.zero">;
  2973. def int_nvvm_suld_3d_v2i8_zero
  2974. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2975. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2976. "llvm.nvvm.suld.3d.v2i8.zero">;
  2977. def int_nvvm_suld_3d_v2i16_zero
  2978. : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
  2979. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2980. "llvm.nvvm.suld.3d.v2i16.zero">;
  2981. def int_nvvm_suld_3d_v2i32_zero
  2982. : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
  2983. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2984. "llvm.nvvm.suld.3d.v2i32.zero">;
  2985. def int_nvvm_suld_3d_v2i64_zero
  2986. : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
  2987. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2988. "llvm.nvvm.suld.3d.v2i64.zero">;
  2989. def int_nvvm_suld_3d_v4i8_zero
  2990. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2991. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2992. "llvm.nvvm.suld.3d.v4i8.zero">;
  2993. def int_nvvm_suld_3d_v4i16_zero
  2994. : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
  2995. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  2996. "llvm.nvvm.suld.3d.v4i16.zero">;
  2997. def int_nvvm_suld_3d_v4i32_zero
  2998. : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
  2999. [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3000. "llvm.nvvm.suld.3d.v4i32.zero">;
  3001. //===- Texture Query ------------------------------------------------------===//
  3002. def int_nvvm_txq_channel_order
  3003. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3004. "llvm.nvvm.txq.channel.order">,
  3005. ClangBuiltin<"__nvvm_txq_channel_order">;
  3006. def int_nvvm_txq_channel_data_type
  3007. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3008. "llvm.nvvm.txq.channel.data.type">,
  3009. ClangBuiltin<"__nvvm_txq_channel_data_type">;
  3010. def int_nvvm_txq_width
  3011. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3012. "llvm.nvvm.txq.width">,
  3013. ClangBuiltin<"__nvvm_txq_width">;
  3014. def int_nvvm_txq_height
  3015. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3016. "llvm.nvvm.txq.height">,
  3017. ClangBuiltin<"__nvvm_txq_height">;
  3018. def int_nvvm_txq_depth
  3019. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3020. "llvm.nvvm.txq.depth">,
  3021. ClangBuiltin<"__nvvm_txq_depth">;
  3022. def int_nvvm_txq_array_size
  3023. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3024. "llvm.nvvm.txq.array.size">,
  3025. ClangBuiltin<"__nvvm_txq_array_size">;
  3026. def int_nvvm_txq_num_samples
  3027. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3028. "llvm.nvvm.txq.num.samples">,
  3029. ClangBuiltin<"__nvvm_txq_num_samples">;
  3030. def int_nvvm_txq_num_mipmap_levels
  3031. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3032. "llvm.nvvm.txq.num.mipmap.levels">,
  3033. ClangBuiltin<"__nvvm_txq_num_mipmap_levels">;
  3034. //===- Surface Query ------------------------------------------------------===//
  3035. def int_nvvm_suq_channel_order
  3036. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3037. "llvm.nvvm.suq.channel.order">,
  3038. ClangBuiltin<"__nvvm_suq_channel_order">;
  3039. def int_nvvm_suq_channel_data_type
  3040. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3041. "llvm.nvvm.suq.channel.data.type">,
  3042. ClangBuiltin<"__nvvm_suq_channel_data_type">;
  3043. def int_nvvm_suq_width
  3044. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3045. "llvm.nvvm.suq.width">,
  3046. ClangBuiltin<"__nvvm_suq_width">;
  3047. def int_nvvm_suq_height
  3048. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3049. "llvm.nvvm.suq.height">,
  3050. ClangBuiltin<"__nvvm_suq_height">;
  3051. def int_nvvm_suq_depth
  3052. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3053. "llvm.nvvm.suq.depth">,
  3054. ClangBuiltin<"__nvvm_suq_depth">;
  3055. def int_nvvm_suq_array_size
  3056. : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
  3057. "llvm.nvvm.suq.array.size">,
  3058. ClangBuiltin<"__nvvm_suq_array_size">;
  3059. //===- Handle Query -------------------------------------------------------===//
  3060. def int_nvvm_istypep_sampler
  3061. : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
  3062. "llvm.nvvm.istypep.sampler">,
  3063. ClangBuiltin<"__nvvm_istypep_sampler">;
  3064. def int_nvvm_istypep_surface
  3065. : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
  3066. "llvm.nvvm.istypep.surface">,
  3067. ClangBuiltin<"__nvvm_istypep_surface">;
  3068. def int_nvvm_istypep_texture
  3069. : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
  3070. "llvm.nvvm.istypep.texture">,
  3071. ClangBuiltin<"__nvvm_istypep_texture">;
  3072. //===- Surface Stores -----------------------------------------------------===//
  3073. // Unformatted
  3074. // .clamp variant
  3075. def int_nvvm_sust_b_1d_i8_clamp
  3076. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3077. "llvm.nvvm.sust.b.1d.i8.clamp">,
  3078. ClangBuiltin<"__nvvm_sust_b_1d_i8_clamp">;
  3079. def int_nvvm_sust_b_1d_i16_clamp
  3080. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3081. "llvm.nvvm.sust.b.1d.i16.clamp">,
  3082. ClangBuiltin<"__nvvm_sust_b_1d_i16_clamp">;
  3083. def int_nvvm_sust_b_1d_i32_clamp
  3084. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  3085. "llvm.nvvm.sust.b.1d.i32.clamp">,
  3086. ClangBuiltin<"__nvvm_sust_b_1d_i32_clamp">;
  3087. def int_nvvm_sust_b_1d_i64_clamp
  3088. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
  3089. "llvm.nvvm.sust.b.1d.i64.clamp">,
  3090. ClangBuiltin<"__nvvm_sust_b_1d_i64_clamp">;
  3091. def int_nvvm_sust_b_1d_v2i8_clamp
  3092. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3093. "llvm.nvvm.sust.b.1d.v2i8.clamp">,
  3094. ClangBuiltin<"__nvvm_sust_b_1d_v2i8_clamp">;
  3095. def int_nvvm_sust_b_1d_v2i16_clamp
  3096. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3097. "llvm.nvvm.sust.b.1d.v2i16.clamp">,
  3098. ClangBuiltin<"__nvvm_sust_b_1d_v2i16_clamp">;
  3099. def int_nvvm_sust_b_1d_v2i32_clamp
  3100. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3101. "llvm.nvvm.sust.b.1d.v2i32.clamp">,
  3102. ClangBuiltin<"__nvvm_sust_b_1d_v2i32_clamp">;
  3103. def int_nvvm_sust_b_1d_v2i64_clamp
  3104. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
  3105. "llvm.nvvm.sust.b.1d.v2i64.clamp">,
  3106. ClangBuiltin<"__nvvm_sust_b_1d_v2i64_clamp">;
  3107. def int_nvvm_sust_b_1d_v4i8_clamp
  3108. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3109. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3110. "llvm.nvvm.sust.b.1d.v4i8.clamp">,
  3111. ClangBuiltin<"__nvvm_sust_b_1d_v4i8_clamp">;
  3112. def int_nvvm_sust_b_1d_v4i16_clamp
  3113. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3114. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3115. "llvm.nvvm.sust.b.1d.v4i16.clamp">,
  3116. ClangBuiltin<"__nvvm_sust_b_1d_v4i16_clamp">;
  3117. def int_nvvm_sust_b_1d_v4i32_clamp
  3118. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3119. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3120. "llvm.nvvm.sust.b.1d.v4i32.clamp">,
  3121. ClangBuiltin<"__nvvm_sust_b_1d_v4i32_clamp">;
  3122. def int_nvvm_sust_b_1d_array_i8_clamp
  3123. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3124. "llvm.nvvm.sust.b.1d.array.i8.clamp">,
  3125. ClangBuiltin<"__nvvm_sust_b_1d_array_i8_clamp">;
  3126. def int_nvvm_sust_b_1d_array_i16_clamp
  3127. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3128. "llvm.nvvm.sust.b.1d.array.i16.clamp">,
  3129. ClangBuiltin<"__nvvm_sust_b_1d_array_i16_clamp">;
  3130. def int_nvvm_sust_b_1d_array_i32_clamp
  3131. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3132. "llvm.nvvm.sust.b.1d.array.i32.clamp">,
  3133. ClangBuiltin<"__nvvm_sust_b_1d_array_i32_clamp">;
  3134. def int_nvvm_sust_b_1d_array_i64_clamp
  3135. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3136. "llvm.nvvm.sust.b.1d.array.i64.clamp">,
  3137. ClangBuiltin<"__nvvm_sust_b_1d_array_i64_clamp">;
  3138. def int_nvvm_sust_b_1d_array_v2i8_clamp
  3139. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3140. llvm_i16_ty, llvm_i16_ty], [],
  3141. "llvm.nvvm.sust.b.1d.array.v2i8.clamp">,
  3142. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_clamp">;
  3143. def int_nvvm_sust_b_1d_array_v2i16_clamp
  3144. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3145. llvm_i16_ty, llvm_i16_ty], [],
  3146. "llvm.nvvm.sust.b.1d.array.v2i16.clamp">,
  3147. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_clamp">;
  3148. def int_nvvm_sust_b_1d_array_v2i32_clamp
  3149. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3150. llvm_i32_ty, llvm_i32_ty], [],
  3151. "llvm.nvvm.sust.b.1d.array.v2i32.clamp">,
  3152. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_clamp">;
  3153. def int_nvvm_sust_b_1d_array_v2i64_clamp
  3154. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3155. llvm_i64_ty, llvm_i64_ty], [],
  3156. "llvm.nvvm.sust.b.1d.array.v2i64.clamp">,
  3157. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_clamp">;
  3158. def int_nvvm_sust_b_1d_array_v4i8_clamp
  3159. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3160. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3161. "llvm.nvvm.sust.b.1d.array.v4i8.clamp">,
  3162. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_clamp">;
  3163. def int_nvvm_sust_b_1d_array_v4i16_clamp
  3164. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3165. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3166. "llvm.nvvm.sust.b.1d.array.v4i16.clamp">,
  3167. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_clamp">;
  3168. def int_nvvm_sust_b_1d_array_v4i32_clamp
  3169. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3170. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3171. "llvm.nvvm.sust.b.1d.array.v4i32.clamp">,
  3172. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_clamp">;
  3173. def int_nvvm_sust_b_2d_i8_clamp
  3174. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3175. "llvm.nvvm.sust.b.2d.i8.clamp">,
  3176. ClangBuiltin<"__nvvm_sust_b_2d_i8_clamp">;
  3177. def int_nvvm_sust_b_2d_i16_clamp
  3178. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3179. "llvm.nvvm.sust.b.2d.i16.clamp">,
  3180. ClangBuiltin<"__nvvm_sust_b_2d_i16_clamp">;
  3181. def int_nvvm_sust_b_2d_i32_clamp
  3182. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3183. "llvm.nvvm.sust.b.2d.i32.clamp">,
  3184. ClangBuiltin<"__nvvm_sust_b_2d_i32_clamp">;
  3185. def int_nvvm_sust_b_2d_i64_clamp
  3186. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3187. "llvm.nvvm.sust.b.2d.i64.clamp">,
  3188. ClangBuiltin<"__nvvm_sust_b_2d_i64_clamp">;
  3189. def int_nvvm_sust_b_2d_v2i8_clamp
  3190. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3191. llvm_i16_ty, llvm_i16_ty], [],
  3192. "llvm.nvvm.sust.b.2d.v2i8.clamp">,
  3193. ClangBuiltin<"__nvvm_sust_b_2d_v2i8_clamp">;
  3194. def int_nvvm_sust_b_2d_v2i16_clamp
  3195. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3196. llvm_i16_ty, llvm_i16_ty], [],
  3197. "llvm.nvvm.sust.b.2d.v2i16.clamp">,
  3198. ClangBuiltin<"__nvvm_sust_b_2d_v2i16_clamp">;
  3199. def int_nvvm_sust_b_2d_v2i32_clamp
  3200. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3201. llvm_i32_ty, llvm_i32_ty], [],
  3202. "llvm.nvvm.sust.b.2d.v2i32.clamp">,
  3203. ClangBuiltin<"__nvvm_sust_b_2d_v2i32_clamp">;
  3204. def int_nvvm_sust_b_2d_v2i64_clamp
  3205. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3206. llvm_i64_ty, llvm_i64_ty], [],
  3207. "llvm.nvvm.sust.b.2d.v2i64.clamp">,
  3208. ClangBuiltin<"__nvvm_sust_b_2d_v2i64_clamp">;
  3209. def int_nvvm_sust_b_2d_v4i8_clamp
  3210. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3211. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3212. "llvm.nvvm.sust.b.2d.v4i8.clamp">,
  3213. ClangBuiltin<"__nvvm_sust_b_2d_v4i8_clamp">;
  3214. def int_nvvm_sust_b_2d_v4i16_clamp
  3215. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3216. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3217. "llvm.nvvm.sust.b.2d.v4i16.clamp">,
  3218. ClangBuiltin<"__nvvm_sust_b_2d_v4i16_clamp">;
  3219. def int_nvvm_sust_b_2d_v4i32_clamp
  3220. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3221. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3222. "llvm.nvvm.sust.b.2d.v4i32.clamp">,
  3223. ClangBuiltin<"__nvvm_sust_b_2d_v4i32_clamp">;
  3224. def int_nvvm_sust_b_2d_array_i8_clamp
  3225. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3226. llvm_i32_ty, llvm_i16_ty], [],
  3227. "llvm.nvvm.sust.b.2d.array.i8.clamp">,
  3228. ClangBuiltin<"__nvvm_sust_b_2d_array_i8_clamp">;
  3229. def int_nvvm_sust_b_2d_array_i16_clamp
  3230. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3231. llvm_i32_ty, llvm_i16_ty], [],
  3232. "llvm.nvvm.sust.b.2d.array.i16.clamp">,
  3233. ClangBuiltin<"__nvvm_sust_b_2d_array_i16_clamp">;
  3234. def int_nvvm_sust_b_2d_array_i32_clamp
  3235. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3236. llvm_i32_ty, llvm_i32_ty], [],
  3237. "llvm.nvvm.sust.b.2d.array.i32.clamp">,
  3238. ClangBuiltin<"__nvvm_sust_b_2d_array_i32_clamp">;
  3239. def int_nvvm_sust_b_2d_array_i64_clamp
  3240. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3241. llvm_i32_ty, llvm_i64_ty], [],
  3242. "llvm.nvvm.sust.b.2d.array.i64.clamp">,
  3243. ClangBuiltin<"__nvvm_sust_b_2d_array_i64_clamp">;
  3244. def int_nvvm_sust_b_2d_array_v2i8_clamp
  3245. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3246. llvm_i16_ty, llvm_i16_ty], [],
  3247. "llvm.nvvm.sust.b.2d.array.v2i8.clamp">,
  3248. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_clamp">;
  3249. def int_nvvm_sust_b_2d_array_v2i16_clamp
  3250. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3251. llvm_i16_ty, llvm_i16_ty], [],
  3252. "llvm.nvvm.sust.b.2d.array.v2i16.clamp">,
  3253. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_clamp">;
  3254. def int_nvvm_sust_b_2d_array_v2i32_clamp
  3255. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3256. llvm_i32_ty, llvm_i32_ty], [],
  3257. "llvm.nvvm.sust.b.2d.array.v2i32.clamp">,
  3258. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_clamp">;
  3259. def int_nvvm_sust_b_2d_array_v2i64_clamp
  3260. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3261. llvm_i64_ty, llvm_i64_ty], [],
  3262. "llvm.nvvm.sust.b.2d.array.v2i64.clamp">,
  3263. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_clamp">;
  3264. def int_nvvm_sust_b_2d_array_v4i8_clamp
  3265. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3266. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3267. "llvm.nvvm.sust.b.2d.array.v4i8.clamp">,
  3268. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_clamp">;
  3269. def int_nvvm_sust_b_2d_array_v4i16_clamp
  3270. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3271. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3272. "llvm.nvvm.sust.b.2d.array.v4i16.clamp">,
  3273. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_clamp">;
  3274. def int_nvvm_sust_b_2d_array_v4i32_clamp
  3275. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3276. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3277. "llvm.nvvm.sust.b.2d.array.v4i32.clamp">,
  3278. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_clamp">;
  3279. def int_nvvm_sust_b_3d_i8_clamp
  3280. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3281. llvm_i32_ty, llvm_i16_ty], [],
  3282. "llvm.nvvm.sust.b.3d.i8.clamp">,
  3283. ClangBuiltin<"__nvvm_sust_b_3d_i8_clamp">;
  3284. def int_nvvm_sust_b_3d_i16_clamp
  3285. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3286. llvm_i32_ty, llvm_i16_ty], [],
  3287. "llvm.nvvm.sust.b.3d.i16.clamp">,
  3288. ClangBuiltin<"__nvvm_sust_b_3d_i16_clamp">;
  3289. def int_nvvm_sust_b_3d_i32_clamp
  3290. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3291. llvm_i32_ty, llvm_i32_ty], [],
  3292. "llvm.nvvm.sust.b.3d.i32.clamp">,
  3293. ClangBuiltin<"__nvvm_sust_b_3d_i32_clamp">;
  3294. def int_nvvm_sust_b_3d_i64_clamp
  3295. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3296. llvm_i32_ty, llvm_i64_ty], [],
  3297. "llvm.nvvm.sust.b.3d.i64.clamp">,
  3298. ClangBuiltin<"__nvvm_sust_b_3d_i64_clamp">;
  3299. def int_nvvm_sust_b_3d_v2i8_clamp
  3300. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3301. llvm_i16_ty, llvm_i16_ty], [],
  3302. "llvm.nvvm.sust.b.3d.v2i8.clamp">,
  3303. ClangBuiltin<"__nvvm_sust_b_3d_v2i8_clamp">;
  3304. def int_nvvm_sust_b_3d_v2i16_clamp
  3305. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3306. llvm_i16_ty, llvm_i16_ty], [],
  3307. "llvm.nvvm.sust.b.3d.v2i16.clamp">,
  3308. ClangBuiltin<"__nvvm_sust_b_3d_v2i16_clamp">;
  3309. def int_nvvm_sust_b_3d_v2i32_clamp
  3310. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3311. llvm_i32_ty, llvm_i32_ty], [],
  3312. "llvm.nvvm.sust.b.3d.v2i32.clamp">,
  3313. ClangBuiltin<"__nvvm_sust_b_3d_v2i32_clamp">;
  3314. def int_nvvm_sust_b_3d_v2i64_clamp
  3315. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3316. llvm_i64_ty, llvm_i64_ty], [],
  3317. "llvm.nvvm.sust.b.3d.v2i64.clamp">,
  3318. ClangBuiltin<"__nvvm_sust_b_3d_v2i64_clamp">;
  3319. def int_nvvm_sust_b_3d_v4i8_clamp
  3320. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3321. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3322. "llvm.nvvm.sust.b.3d.v4i8.clamp">,
  3323. ClangBuiltin<"__nvvm_sust_b_3d_v4i8_clamp">;
  3324. def int_nvvm_sust_b_3d_v4i16_clamp
  3325. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3326. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3327. "llvm.nvvm.sust.b.3d.v4i16.clamp">,
  3328. ClangBuiltin<"__nvvm_sust_b_3d_v4i16_clamp">;
  3329. def int_nvvm_sust_b_3d_v4i32_clamp
  3330. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3331. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3332. "llvm.nvvm.sust.b.3d.v4i32.clamp">,
  3333. ClangBuiltin<"__nvvm_sust_b_3d_v4i32_clamp">;
  3334. // .trap variant
  3335. def int_nvvm_sust_b_1d_i8_trap
  3336. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3337. "llvm.nvvm.sust.b.1d.i8.trap">,
  3338. ClangBuiltin<"__nvvm_sust_b_1d_i8_trap">;
  3339. def int_nvvm_sust_b_1d_i16_trap
  3340. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3341. "llvm.nvvm.sust.b.1d.i16.trap">,
  3342. ClangBuiltin<"__nvvm_sust_b_1d_i16_trap">;
  3343. def int_nvvm_sust_b_1d_i32_trap
  3344. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  3345. "llvm.nvvm.sust.b.1d.i32.trap">,
  3346. ClangBuiltin<"__nvvm_sust_b_1d_i32_trap">;
  3347. def int_nvvm_sust_b_1d_i64_trap
  3348. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
  3349. "llvm.nvvm.sust.b.1d.i64.trap">,
  3350. ClangBuiltin<"__nvvm_sust_b_1d_i64_trap">;
  3351. def int_nvvm_sust_b_1d_v2i8_trap
  3352. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3353. "llvm.nvvm.sust.b.1d.v2i8.trap">,
  3354. ClangBuiltin<"__nvvm_sust_b_1d_v2i8_trap">;
  3355. def int_nvvm_sust_b_1d_v2i16_trap
  3356. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3357. "llvm.nvvm.sust.b.1d.v2i16.trap">,
  3358. ClangBuiltin<"__nvvm_sust_b_1d_v2i16_trap">;
  3359. def int_nvvm_sust_b_1d_v2i32_trap
  3360. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3361. "llvm.nvvm.sust.b.1d.v2i32.trap">,
  3362. ClangBuiltin<"__nvvm_sust_b_1d_v2i32_trap">;
  3363. def int_nvvm_sust_b_1d_v2i64_trap
  3364. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
  3365. "llvm.nvvm.sust.b.1d.v2i64.trap">,
  3366. ClangBuiltin<"__nvvm_sust_b_1d_v2i64_trap">;
  3367. def int_nvvm_sust_b_1d_v4i8_trap
  3368. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3369. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3370. "llvm.nvvm.sust.b.1d.v4i8.trap">,
  3371. ClangBuiltin<"__nvvm_sust_b_1d_v4i8_trap">;
  3372. def int_nvvm_sust_b_1d_v4i16_trap
  3373. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3374. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3375. "llvm.nvvm.sust.b.1d.v4i16.trap">,
  3376. ClangBuiltin<"__nvvm_sust_b_1d_v4i16_trap">;
  3377. def int_nvvm_sust_b_1d_v4i32_trap
  3378. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3379. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3380. "llvm.nvvm.sust.b.1d.v4i32.trap">,
  3381. ClangBuiltin<"__nvvm_sust_b_1d_v4i32_trap">;
  3382. def int_nvvm_sust_b_1d_array_i8_trap
  3383. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3384. "llvm.nvvm.sust.b.1d.array.i8.trap">,
  3385. ClangBuiltin<"__nvvm_sust_b_1d_array_i8_trap">;
  3386. def int_nvvm_sust_b_1d_array_i16_trap
  3387. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3388. "llvm.nvvm.sust.b.1d.array.i16.trap">,
  3389. ClangBuiltin<"__nvvm_sust_b_1d_array_i16_trap">;
  3390. def int_nvvm_sust_b_1d_array_i32_trap
  3391. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3392. "llvm.nvvm.sust.b.1d.array.i32.trap">,
  3393. ClangBuiltin<"__nvvm_sust_b_1d_array_i32_trap">;
  3394. def int_nvvm_sust_b_1d_array_i64_trap
  3395. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3396. "llvm.nvvm.sust.b.1d.array.i64.trap">,
  3397. ClangBuiltin<"__nvvm_sust_b_1d_array_i64_trap">;
  3398. def int_nvvm_sust_b_1d_array_v2i8_trap
  3399. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3400. llvm_i16_ty, llvm_i16_ty], [],
  3401. "llvm.nvvm.sust.b.1d.array.v2i8.trap">,
  3402. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_trap">;
  3403. def int_nvvm_sust_b_1d_array_v2i16_trap
  3404. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3405. llvm_i16_ty, llvm_i16_ty], [],
  3406. "llvm.nvvm.sust.b.1d.array.v2i16.trap">,
  3407. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_trap">;
  3408. def int_nvvm_sust_b_1d_array_v2i32_trap
  3409. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3410. llvm_i32_ty, llvm_i32_ty], [],
  3411. "llvm.nvvm.sust.b.1d.array.v2i32.trap">,
  3412. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_trap">;
  3413. def int_nvvm_sust_b_1d_array_v2i64_trap
  3414. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3415. llvm_i64_ty, llvm_i64_ty], [],
  3416. "llvm.nvvm.sust.b.1d.array.v2i64.trap">,
  3417. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_trap">;
  3418. def int_nvvm_sust_b_1d_array_v4i8_trap
  3419. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3420. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3421. "llvm.nvvm.sust.b.1d.array.v4i8.trap">,
  3422. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_trap">;
  3423. def int_nvvm_sust_b_1d_array_v4i16_trap
  3424. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3425. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3426. "llvm.nvvm.sust.b.1d.array.v4i16.trap">,
  3427. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_trap">;
  3428. def int_nvvm_sust_b_1d_array_v4i32_trap
  3429. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3430. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3431. "llvm.nvvm.sust.b.1d.array.v4i32.trap">,
  3432. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_trap">;
  3433. def int_nvvm_sust_b_2d_i8_trap
  3434. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3435. "llvm.nvvm.sust.b.2d.i8.trap">,
  3436. ClangBuiltin<"__nvvm_sust_b_2d_i8_trap">;
  3437. def int_nvvm_sust_b_2d_i16_trap
  3438. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3439. "llvm.nvvm.sust.b.2d.i16.trap">,
  3440. ClangBuiltin<"__nvvm_sust_b_2d_i16_trap">;
  3441. def int_nvvm_sust_b_2d_i32_trap
  3442. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3443. "llvm.nvvm.sust.b.2d.i32.trap">,
  3444. ClangBuiltin<"__nvvm_sust_b_2d_i32_trap">;
  3445. def int_nvvm_sust_b_2d_i64_trap
  3446. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3447. "llvm.nvvm.sust.b.2d.i64.trap">,
  3448. ClangBuiltin<"__nvvm_sust_b_2d_i64_trap">;
  3449. def int_nvvm_sust_b_2d_v2i8_trap
  3450. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3451. llvm_i16_ty, llvm_i16_ty], [],
  3452. "llvm.nvvm.sust.b.2d.v2i8.trap">,
  3453. ClangBuiltin<"__nvvm_sust_b_2d_v2i8_trap">;
  3454. def int_nvvm_sust_b_2d_v2i16_trap
  3455. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3456. llvm_i16_ty, llvm_i16_ty], [],
  3457. "llvm.nvvm.sust.b.2d.v2i16.trap">,
  3458. ClangBuiltin<"__nvvm_sust_b_2d_v2i16_trap">;
  3459. def int_nvvm_sust_b_2d_v2i32_trap
  3460. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3461. llvm_i32_ty, llvm_i32_ty], [],
  3462. "llvm.nvvm.sust.b.2d.v2i32.trap">,
  3463. ClangBuiltin<"__nvvm_sust_b_2d_v2i32_trap">;
  3464. def int_nvvm_sust_b_2d_v2i64_trap
  3465. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3466. llvm_i64_ty, llvm_i64_ty], [],
  3467. "llvm.nvvm.sust.b.2d.v2i64.trap">,
  3468. ClangBuiltin<"__nvvm_sust_b_2d_v2i64_trap">;
  3469. def int_nvvm_sust_b_2d_v4i8_trap
  3470. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3471. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3472. "llvm.nvvm.sust.b.2d.v4i8.trap">,
  3473. ClangBuiltin<"__nvvm_sust_b_2d_v4i8_trap">;
  3474. def int_nvvm_sust_b_2d_v4i16_trap
  3475. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3476. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3477. "llvm.nvvm.sust.b.2d.v4i16.trap">,
  3478. ClangBuiltin<"__nvvm_sust_b_2d_v4i16_trap">;
  3479. def int_nvvm_sust_b_2d_v4i32_trap
  3480. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3481. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3482. "llvm.nvvm.sust.b.2d.v4i32.trap">,
  3483. ClangBuiltin<"__nvvm_sust_b_2d_v4i32_trap">;
  3484. def int_nvvm_sust_b_2d_array_i8_trap
  3485. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3486. llvm_i32_ty, llvm_i16_ty], [],
  3487. "llvm.nvvm.sust.b.2d.array.i8.trap">,
  3488. ClangBuiltin<"__nvvm_sust_b_2d_array_i8_trap">;
  3489. def int_nvvm_sust_b_2d_array_i16_trap
  3490. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3491. llvm_i32_ty, llvm_i16_ty], [],
  3492. "llvm.nvvm.sust.b.2d.array.i16.trap">,
  3493. ClangBuiltin<"__nvvm_sust_b_2d_array_i16_trap">;
  3494. def int_nvvm_sust_b_2d_array_i32_trap
  3495. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3496. llvm_i32_ty, llvm_i32_ty], [],
  3497. "llvm.nvvm.sust.b.2d.array.i32.trap">,
  3498. ClangBuiltin<"__nvvm_sust_b_2d_array_i32_trap">;
  3499. def int_nvvm_sust_b_2d_array_i64_trap
  3500. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3501. llvm_i32_ty, llvm_i64_ty], [],
  3502. "llvm.nvvm.sust.b.2d.array.i64.trap">,
  3503. ClangBuiltin<"__nvvm_sust_b_2d_array_i64_trap">;
  3504. def int_nvvm_sust_b_2d_array_v2i8_trap
  3505. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3506. llvm_i16_ty, llvm_i16_ty], [],
  3507. "llvm.nvvm.sust.b.2d.array.v2i8.trap">,
  3508. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_trap">;
  3509. def int_nvvm_sust_b_2d_array_v2i16_trap
  3510. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3511. llvm_i16_ty, llvm_i16_ty], [],
  3512. "llvm.nvvm.sust.b.2d.array.v2i16.trap">,
  3513. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_trap">;
  3514. def int_nvvm_sust_b_2d_array_v2i32_trap
  3515. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3516. llvm_i32_ty, llvm_i32_ty], [],
  3517. "llvm.nvvm.sust.b.2d.array.v2i32.trap">,
  3518. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_trap">;
  3519. def int_nvvm_sust_b_2d_array_v2i64_trap
  3520. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3521. llvm_i64_ty, llvm_i64_ty], [],
  3522. "llvm.nvvm.sust.b.2d.array.v2i64.trap">,
  3523. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_trap">;
  3524. def int_nvvm_sust_b_2d_array_v4i8_trap
  3525. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3526. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3527. "llvm.nvvm.sust.b.2d.array.v4i8.trap">,
  3528. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_trap">;
  3529. def int_nvvm_sust_b_2d_array_v4i16_trap
  3530. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3531. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3532. "llvm.nvvm.sust.b.2d.array.v4i16.trap">,
  3533. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_trap">;
  3534. def int_nvvm_sust_b_2d_array_v4i32_trap
  3535. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3536. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3537. "llvm.nvvm.sust.b.2d.array.v4i32.trap">,
  3538. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_trap">;
  3539. def int_nvvm_sust_b_3d_i8_trap
  3540. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3541. llvm_i32_ty, llvm_i16_ty], [],
  3542. "llvm.nvvm.sust.b.3d.i8.trap">,
  3543. ClangBuiltin<"__nvvm_sust_b_3d_i8_trap">;
  3544. def int_nvvm_sust_b_3d_i16_trap
  3545. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3546. llvm_i32_ty, llvm_i16_ty], [],
  3547. "llvm.nvvm.sust.b.3d.i16.trap">,
  3548. ClangBuiltin<"__nvvm_sust_b_3d_i16_trap">;
  3549. def int_nvvm_sust_b_3d_i32_trap
  3550. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3551. llvm_i32_ty, llvm_i32_ty], [],
  3552. "llvm.nvvm.sust.b.3d.i32.trap">,
  3553. ClangBuiltin<"__nvvm_sust_b_3d_i32_trap">;
  3554. def int_nvvm_sust_b_3d_i64_trap
  3555. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3556. llvm_i32_ty, llvm_i64_ty], [],
  3557. "llvm.nvvm.sust.b.3d.i64.trap">,
  3558. ClangBuiltin<"__nvvm_sust_b_3d_i64_trap">;
  3559. def int_nvvm_sust_b_3d_v2i8_trap
  3560. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3561. llvm_i16_ty, llvm_i16_ty], [],
  3562. "llvm.nvvm.sust.b.3d.v2i8.trap">,
  3563. ClangBuiltin<"__nvvm_sust_b_3d_v2i8_trap">;
  3564. def int_nvvm_sust_b_3d_v2i16_trap
  3565. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3566. llvm_i16_ty, llvm_i16_ty], [],
  3567. "llvm.nvvm.sust.b.3d.v2i16.trap">,
  3568. ClangBuiltin<"__nvvm_sust_b_3d_v2i16_trap">;
  3569. def int_nvvm_sust_b_3d_v2i32_trap
  3570. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3571. llvm_i32_ty, llvm_i32_ty], [],
  3572. "llvm.nvvm.sust.b.3d.v2i32.trap">,
  3573. ClangBuiltin<"__nvvm_sust_b_3d_v2i32_trap">;
  3574. def int_nvvm_sust_b_3d_v2i64_trap
  3575. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3576. llvm_i64_ty, llvm_i64_ty], [],
  3577. "llvm.nvvm.sust.b.3d.v2i64.trap">,
  3578. ClangBuiltin<"__nvvm_sust_b_3d_v2i64_trap">;
  3579. def int_nvvm_sust_b_3d_v4i8_trap
  3580. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3581. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3582. "llvm.nvvm.sust.b.3d.v4i8.trap">,
  3583. ClangBuiltin<"__nvvm_sust_b_3d_v4i8_trap">;
  3584. def int_nvvm_sust_b_3d_v4i16_trap
  3585. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3586. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3587. "llvm.nvvm.sust.b.3d.v4i16.trap">,
  3588. ClangBuiltin<"__nvvm_sust_b_3d_v4i16_trap">;
  3589. def int_nvvm_sust_b_3d_v4i32_trap
  3590. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3591. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3592. "llvm.nvvm.sust.b.3d.v4i32.trap">,
  3593. ClangBuiltin<"__nvvm_sust_b_3d_v4i32_trap">;
  3594. // .zero variant
  3595. def int_nvvm_sust_b_1d_i8_zero
  3596. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3597. "llvm.nvvm.sust.b.1d.i8.zero">,
  3598. ClangBuiltin<"__nvvm_sust_b_1d_i8_zero">;
  3599. def int_nvvm_sust_b_1d_i16_zero
  3600. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3601. "llvm.nvvm.sust.b.1d.i16.zero">,
  3602. ClangBuiltin<"__nvvm_sust_b_1d_i16_zero">;
  3603. def int_nvvm_sust_b_1d_i32_zero
  3604. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  3605. "llvm.nvvm.sust.b.1d.i32.zero">,
  3606. ClangBuiltin<"__nvvm_sust_b_1d_i32_zero">;
  3607. def int_nvvm_sust_b_1d_i64_zero
  3608. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
  3609. "llvm.nvvm.sust.b.1d.i64.zero">,
  3610. ClangBuiltin<"__nvvm_sust_b_1d_i64_zero">;
  3611. def int_nvvm_sust_b_1d_v2i8_zero
  3612. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3613. "llvm.nvvm.sust.b.1d.v2i8.zero">,
  3614. ClangBuiltin<"__nvvm_sust_b_1d_v2i8_zero">;
  3615. def int_nvvm_sust_b_1d_v2i16_zero
  3616. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3617. "llvm.nvvm.sust.b.1d.v2i16.zero">,
  3618. ClangBuiltin<"__nvvm_sust_b_1d_v2i16_zero">;
  3619. def int_nvvm_sust_b_1d_v2i32_zero
  3620. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3621. "llvm.nvvm.sust.b.1d.v2i32.zero">,
  3622. ClangBuiltin<"__nvvm_sust_b_1d_v2i32_zero">;
  3623. def int_nvvm_sust_b_1d_v2i64_zero
  3624. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
  3625. "llvm.nvvm.sust.b.1d.v2i64.zero">,
  3626. ClangBuiltin<"__nvvm_sust_b_1d_v2i64_zero">;
  3627. def int_nvvm_sust_b_1d_v4i8_zero
  3628. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3629. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3630. "llvm.nvvm.sust.b.1d.v4i8.zero">,
  3631. ClangBuiltin<"__nvvm_sust_b_1d_v4i8_zero">;
  3632. def int_nvvm_sust_b_1d_v4i16_zero
  3633. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3634. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3635. "llvm.nvvm.sust.b.1d.v4i16.zero">,
  3636. ClangBuiltin<"__nvvm_sust_b_1d_v4i16_zero">;
  3637. def int_nvvm_sust_b_1d_v4i32_zero
  3638. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3639. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3640. "llvm.nvvm.sust.b.1d.v4i32.zero">,
  3641. ClangBuiltin<"__nvvm_sust_b_1d_v4i32_zero">;
  3642. def int_nvvm_sust_b_1d_array_i8_zero
  3643. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3644. "llvm.nvvm.sust.b.1d.array.i8.zero">,
  3645. ClangBuiltin<"__nvvm_sust_b_1d_array_i8_zero">;
  3646. def int_nvvm_sust_b_1d_array_i16_zero
  3647. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3648. "llvm.nvvm.sust.b.1d.array.i16.zero">,
  3649. ClangBuiltin<"__nvvm_sust_b_1d_array_i16_zero">;
  3650. def int_nvvm_sust_b_1d_array_i32_zero
  3651. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3652. "llvm.nvvm.sust.b.1d.array.i32.zero">,
  3653. ClangBuiltin<"__nvvm_sust_b_1d_array_i32_zero">;
  3654. def int_nvvm_sust_b_1d_array_i64_zero
  3655. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3656. "llvm.nvvm.sust.b.1d.array.i64.zero">,
  3657. ClangBuiltin<"__nvvm_sust_b_1d_array_i64_zero">;
  3658. def int_nvvm_sust_b_1d_array_v2i8_zero
  3659. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3660. llvm_i16_ty, llvm_i16_ty], [],
  3661. "llvm.nvvm.sust.b.1d.array.v2i8.zero">,
  3662. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_zero">;
  3663. def int_nvvm_sust_b_1d_array_v2i16_zero
  3664. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3665. llvm_i16_ty, llvm_i16_ty], [],
  3666. "llvm.nvvm.sust.b.1d.array.v2i16.zero">,
  3667. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_zero">;
  3668. def int_nvvm_sust_b_1d_array_v2i32_zero
  3669. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3670. llvm_i32_ty, llvm_i32_ty], [],
  3671. "llvm.nvvm.sust.b.1d.array.v2i32.zero">,
  3672. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_zero">;
  3673. def int_nvvm_sust_b_1d_array_v2i64_zero
  3674. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3675. llvm_i64_ty, llvm_i64_ty], [],
  3676. "llvm.nvvm.sust.b.1d.array.v2i64.zero">,
  3677. ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_zero">;
  3678. def int_nvvm_sust_b_1d_array_v4i8_zero
  3679. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3680. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3681. "llvm.nvvm.sust.b.1d.array.v4i8.zero">,
  3682. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_zero">;
  3683. def int_nvvm_sust_b_1d_array_v4i16_zero
  3684. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3685. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3686. "llvm.nvvm.sust.b.1d.array.v4i16.zero">,
  3687. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_zero">;
  3688. def int_nvvm_sust_b_1d_array_v4i32_zero
  3689. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3690. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3691. "llvm.nvvm.sust.b.1d.array.v4i32.zero">,
  3692. ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_zero">;
  3693. def int_nvvm_sust_b_2d_i8_zero
  3694. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3695. "llvm.nvvm.sust.b.2d.i8.zero">,
  3696. ClangBuiltin<"__nvvm_sust_b_2d_i8_zero">;
  3697. def int_nvvm_sust_b_2d_i16_zero
  3698. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3699. "llvm.nvvm.sust.b.2d.i16.zero">,
  3700. ClangBuiltin<"__nvvm_sust_b_2d_i16_zero">;
  3701. def int_nvvm_sust_b_2d_i32_zero
  3702. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3703. "llvm.nvvm.sust.b.2d.i32.zero">,
  3704. ClangBuiltin<"__nvvm_sust_b_2d_i32_zero">;
  3705. def int_nvvm_sust_b_2d_i64_zero
  3706. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
  3707. "llvm.nvvm.sust.b.2d.i64.zero">,
  3708. ClangBuiltin<"__nvvm_sust_b_2d_i64_zero">;
  3709. def int_nvvm_sust_b_2d_v2i8_zero
  3710. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3711. llvm_i16_ty, llvm_i16_ty], [],
  3712. "llvm.nvvm.sust.b.2d.v2i8.zero">,
  3713. ClangBuiltin<"__nvvm_sust_b_2d_v2i8_zero">;
  3714. def int_nvvm_sust_b_2d_v2i16_zero
  3715. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3716. llvm_i16_ty, llvm_i16_ty], [],
  3717. "llvm.nvvm.sust.b.2d.v2i16.zero">,
  3718. ClangBuiltin<"__nvvm_sust_b_2d_v2i16_zero">;
  3719. def int_nvvm_sust_b_2d_v2i32_zero
  3720. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3721. llvm_i32_ty, llvm_i32_ty], [],
  3722. "llvm.nvvm.sust.b.2d.v2i32.zero">,
  3723. ClangBuiltin<"__nvvm_sust_b_2d_v2i32_zero">;
  3724. def int_nvvm_sust_b_2d_v2i64_zero
  3725. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3726. llvm_i64_ty, llvm_i64_ty], [],
  3727. "llvm.nvvm.sust.b.2d.v2i64.zero">,
  3728. ClangBuiltin<"__nvvm_sust_b_2d_v2i64_zero">;
  3729. def int_nvvm_sust_b_2d_v4i8_zero
  3730. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3731. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3732. "llvm.nvvm.sust.b.2d.v4i8.zero">,
  3733. ClangBuiltin<"__nvvm_sust_b_2d_v4i8_zero">;
  3734. def int_nvvm_sust_b_2d_v4i16_zero
  3735. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3736. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3737. "llvm.nvvm.sust.b.2d.v4i16.zero">,
  3738. ClangBuiltin<"__nvvm_sust_b_2d_v4i16_zero">;
  3739. def int_nvvm_sust_b_2d_v4i32_zero
  3740. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3741. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3742. "llvm.nvvm.sust.b.2d.v4i32.zero">,
  3743. ClangBuiltin<"__nvvm_sust_b_2d_v4i32_zero">;
  3744. def int_nvvm_sust_b_2d_array_i8_zero
  3745. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3746. llvm_i32_ty, llvm_i16_ty], [],
  3747. "llvm.nvvm.sust.b.2d.array.i8.zero">,
  3748. ClangBuiltin<"__nvvm_sust_b_2d_array_i8_zero">;
  3749. def int_nvvm_sust_b_2d_array_i16_zero
  3750. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3751. llvm_i32_ty, llvm_i16_ty], [],
  3752. "llvm.nvvm.sust.b.2d.array.i16.zero">,
  3753. ClangBuiltin<"__nvvm_sust_b_2d_array_i16_zero">;
  3754. def int_nvvm_sust_b_2d_array_i32_zero
  3755. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3756. llvm_i32_ty, llvm_i32_ty], [],
  3757. "llvm.nvvm.sust.b.2d.array.i32.zero">,
  3758. ClangBuiltin<"__nvvm_sust_b_2d_array_i32_zero">;
  3759. def int_nvvm_sust_b_2d_array_i64_zero
  3760. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3761. llvm_i32_ty, llvm_i64_ty], [],
  3762. "llvm.nvvm.sust.b.2d.array.i64.zero">,
  3763. ClangBuiltin<"__nvvm_sust_b_2d_array_i64_zero">;
  3764. def int_nvvm_sust_b_2d_array_v2i8_zero
  3765. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3766. llvm_i16_ty, llvm_i16_ty], [],
  3767. "llvm.nvvm.sust.b.2d.array.v2i8.zero">,
  3768. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_zero">;
  3769. def int_nvvm_sust_b_2d_array_v2i16_zero
  3770. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3771. llvm_i16_ty, llvm_i16_ty], [],
  3772. "llvm.nvvm.sust.b.2d.array.v2i16.zero">,
  3773. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_zero">;
  3774. def int_nvvm_sust_b_2d_array_v2i32_zero
  3775. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3776. llvm_i32_ty, llvm_i32_ty], [],
  3777. "llvm.nvvm.sust.b.2d.array.v2i32.zero">,
  3778. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_zero">;
  3779. def int_nvvm_sust_b_2d_array_v2i64_zero
  3780. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3781. llvm_i64_ty, llvm_i64_ty], [],
  3782. "llvm.nvvm.sust.b.2d.array.v2i64.zero">,
  3783. ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_zero">;
  3784. def int_nvvm_sust_b_2d_array_v4i8_zero
  3785. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3786. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3787. "llvm.nvvm.sust.b.2d.array.v4i8.zero">,
  3788. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_zero">;
  3789. def int_nvvm_sust_b_2d_array_v4i16_zero
  3790. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3791. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3792. "llvm.nvvm.sust.b.2d.array.v4i16.zero">,
  3793. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_zero">;
  3794. def int_nvvm_sust_b_2d_array_v4i32_zero
  3795. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3796. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3797. "llvm.nvvm.sust.b.2d.array.v4i32.zero">,
  3798. ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_zero">;
  3799. def int_nvvm_sust_b_3d_i8_zero
  3800. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3801. llvm_i32_ty, llvm_i16_ty], [],
  3802. "llvm.nvvm.sust.b.3d.i8.zero">,
  3803. ClangBuiltin<"__nvvm_sust_b_3d_i8_zero">;
  3804. def int_nvvm_sust_b_3d_i16_zero
  3805. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3806. llvm_i32_ty, llvm_i16_ty], [],
  3807. "llvm.nvvm.sust.b.3d.i16.zero">,
  3808. ClangBuiltin<"__nvvm_sust_b_3d_i16_zero">;
  3809. def int_nvvm_sust_b_3d_i32_zero
  3810. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3811. llvm_i32_ty, llvm_i32_ty], [],
  3812. "llvm.nvvm.sust.b.3d.i32.zero">,
  3813. ClangBuiltin<"__nvvm_sust_b_3d_i32_zero">;
  3814. def int_nvvm_sust_b_3d_i64_zero
  3815. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3816. llvm_i32_ty, llvm_i64_ty], [],
  3817. "llvm.nvvm.sust.b.3d.i64.zero">,
  3818. ClangBuiltin<"__nvvm_sust_b_3d_i64_zero">;
  3819. def int_nvvm_sust_b_3d_v2i8_zero
  3820. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3821. llvm_i16_ty, llvm_i16_ty], [],
  3822. "llvm.nvvm.sust.b.3d.v2i8.zero">,
  3823. ClangBuiltin<"__nvvm_sust_b_3d_v2i8_zero">;
  3824. def int_nvvm_sust_b_3d_v2i16_zero
  3825. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3826. llvm_i16_ty, llvm_i16_ty], [],
  3827. "llvm.nvvm.sust.b.3d.v2i16.zero">,
  3828. ClangBuiltin<"__nvvm_sust_b_3d_v2i16_zero">;
  3829. def int_nvvm_sust_b_3d_v2i32_zero
  3830. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3831. llvm_i32_ty, llvm_i32_ty], [],
  3832. "llvm.nvvm.sust.b.3d.v2i32.zero">,
  3833. ClangBuiltin<"__nvvm_sust_b_3d_v2i32_zero">;
  3834. def int_nvvm_sust_b_3d_v2i64_zero
  3835. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3836. llvm_i64_ty, llvm_i64_ty], [],
  3837. "llvm.nvvm.sust.b.3d.v2i64.zero">,
  3838. ClangBuiltin<"__nvvm_sust_b_3d_v2i64_zero">;
  3839. def int_nvvm_sust_b_3d_v4i8_zero
  3840. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3841. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3842. "llvm.nvvm.sust.b.3d.v4i8.zero">,
  3843. ClangBuiltin<"__nvvm_sust_b_3d_v4i8_zero">;
  3844. def int_nvvm_sust_b_3d_v4i16_zero
  3845. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3846. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3847. "llvm.nvvm.sust.b.3d.v4i16.zero">,
  3848. ClangBuiltin<"__nvvm_sust_b_3d_v4i16_zero">;
  3849. def int_nvvm_sust_b_3d_v4i32_zero
  3850. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3851. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3852. "llvm.nvvm.sust.b.3d.v4i32.zero">,
  3853. ClangBuiltin<"__nvvm_sust_b_3d_v4i32_zero">;
  3854. // Formatted
  3855. def int_nvvm_sust_p_1d_i8_trap
  3856. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3857. "llvm.nvvm.sust.p.1d.i8.trap">,
  3858. ClangBuiltin<"__nvvm_sust_p_1d_i8_trap">;
  3859. def int_nvvm_sust_p_1d_i16_trap
  3860. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
  3861. "llvm.nvvm.sust.p.1d.i16.trap">,
  3862. ClangBuiltin<"__nvvm_sust_p_1d_i16_trap">;
  3863. def int_nvvm_sust_p_1d_i32_trap
  3864. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
  3865. "llvm.nvvm.sust.p.1d.i32.trap">,
  3866. ClangBuiltin<"__nvvm_sust_p_1d_i32_trap">;
  3867. def int_nvvm_sust_p_1d_v2i8_trap
  3868. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3869. "llvm.nvvm.sust.p.1d.v2i8.trap">,
  3870. ClangBuiltin<"__nvvm_sust_p_1d_v2i8_trap">;
  3871. def int_nvvm_sust_p_1d_v2i16_trap
  3872. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
  3873. "llvm.nvvm.sust.p.1d.v2i16.trap">,
  3874. ClangBuiltin<"__nvvm_sust_p_1d_v2i16_trap">;
  3875. def int_nvvm_sust_p_1d_v2i32_trap
  3876. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3877. "llvm.nvvm.sust.p.1d.v2i32.trap">,
  3878. ClangBuiltin<"__nvvm_sust_p_1d_v2i32_trap">;
  3879. def int_nvvm_sust_p_1d_v4i8_trap
  3880. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3881. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3882. "llvm.nvvm.sust.p.1d.v4i8.trap">,
  3883. ClangBuiltin<"__nvvm_sust_p_1d_v4i8_trap">;
  3884. def int_nvvm_sust_p_1d_v4i16_trap
  3885. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
  3886. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3887. "llvm.nvvm.sust.p.1d.v4i16.trap">,
  3888. ClangBuiltin<"__nvvm_sust_p_1d_v4i16_trap">;
  3889. def int_nvvm_sust_p_1d_v4i32_trap
  3890. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3891. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3892. "llvm.nvvm.sust.p.1d.v4i32.trap">,
  3893. ClangBuiltin<"__nvvm_sust_p_1d_v4i32_trap">;
  3894. def int_nvvm_sust_p_1d_array_i8_trap
  3895. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3896. "llvm.nvvm.sust.p.1d.array.i8.trap">,
  3897. ClangBuiltin<"__nvvm_sust_p_1d_array_i8_trap">;
  3898. def int_nvvm_sust_p_1d_array_i16_trap
  3899. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3900. "llvm.nvvm.sust.p.1d.array.i16.trap">,
  3901. ClangBuiltin<"__nvvm_sust_p_1d_array_i16_trap">;
  3902. def int_nvvm_sust_p_1d_array_i32_trap
  3903. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3904. "llvm.nvvm.sust.p.1d.array.i32.trap">,
  3905. ClangBuiltin<"__nvvm_sust_p_1d_array_i32_trap">;
  3906. def int_nvvm_sust_p_1d_array_v2i8_trap
  3907. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3908. llvm_i16_ty, llvm_i16_ty], [],
  3909. "llvm.nvvm.sust.p.1d.array.v2i8.trap">,
  3910. ClangBuiltin<"__nvvm_sust_p_1d_array_v2i8_trap">;
  3911. def int_nvvm_sust_p_1d_array_v2i16_trap
  3912. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3913. llvm_i16_ty, llvm_i16_ty], [],
  3914. "llvm.nvvm.sust.p.1d.array.v2i16.trap">,
  3915. ClangBuiltin<"__nvvm_sust_p_1d_array_v2i16_trap">;
  3916. def int_nvvm_sust_p_1d_array_v2i32_trap
  3917. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3918. llvm_i32_ty, llvm_i32_ty], [],
  3919. "llvm.nvvm.sust.p.1d.array.v2i32.trap">,
  3920. ClangBuiltin<"__nvvm_sust_p_1d_array_v2i32_trap">;
  3921. def int_nvvm_sust_p_1d_array_v4i8_trap
  3922. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3923. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3924. "llvm.nvvm.sust.p.1d.array.v4i8.trap">,
  3925. ClangBuiltin<"__nvvm_sust_p_1d_array_v4i8_trap">;
  3926. def int_nvvm_sust_p_1d_array_v4i16_trap
  3927. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3928. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3929. "llvm.nvvm.sust.p.1d.array.v4i16.trap">,
  3930. ClangBuiltin<"__nvvm_sust_p_1d_array_v4i16_trap">;
  3931. def int_nvvm_sust_p_1d_array_v4i32_trap
  3932. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3933. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3934. "llvm.nvvm.sust.p.1d.array.v4i32.trap">,
  3935. ClangBuiltin<"__nvvm_sust_p_1d_array_v4i32_trap">;
  3936. def int_nvvm_sust_p_2d_i8_trap
  3937. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3938. "llvm.nvvm.sust.p.2d.i8.trap">,
  3939. ClangBuiltin<"__nvvm_sust_p_2d_i8_trap">;
  3940. def int_nvvm_sust_p_2d_i16_trap
  3941. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
  3942. "llvm.nvvm.sust.p.2d.i16.trap">,
  3943. ClangBuiltin<"__nvvm_sust_p_2d_i16_trap">;
  3944. def int_nvvm_sust_p_2d_i32_trap
  3945. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3946. "llvm.nvvm.sust.p.2d.i32.trap">,
  3947. ClangBuiltin<"__nvvm_sust_p_2d_i32_trap">;
  3948. def int_nvvm_sust_p_2d_v2i8_trap
  3949. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3950. llvm_i16_ty, llvm_i16_ty], [],
  3951. "llvm.nvvm.sust.p.2d.v2i8.trap">,
  3952. ClangBuiltin<"__nvvm_sust_p_2d_v2i8_trap">;
  3953. def int_nvvm_sust_p_2d_v2i16_trap
  3954. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3955. llvm_i16_ty, llvm_i16_ty], [],
  3956. "llvm.nvvm.sust.p.2d.v2i16.trap">,
  3957. ClangBuiltin<"__nvvm_sust_p_2d_v2i16_trap">;
  3958. def int_nvvm_sust_p_2d_v2i32_trap
  3959. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3960. llvm_i32_ty, llvm_i32_ty], [],
  3961. "llvm.nvvm.sust.p.2d.v2i32.trap">,
  3962. ClangBuiltin<"__nvvm_sust_p_2d_v2i32_trap">;
  3963. def int_nvvm_sust_p_2d_v4i8_trap
  3964. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3965. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3966. "llvm.nvvm.sust.p.2d.v4i8.trap">,
  3967. ClangBuiltin<"__nvvm_sust_p_2d_v4i8_trap">;
  3968. def int_nvvm_sust_p_2d_v4i16_trap
  3969. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
  3970. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  3971. "llvm.nvvm.sust.p.2d.v4i16.trap">,
  3972. ClangBuiltin<"__nvvm_sust_p_2d_v4i16_trap">;
  3973. def int_nvvm_sust_p_2d_v4i32_trap
  3974. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3975. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  3976. "llvm.nvvm.sust.p.2d.v4i32.trap">,
  3977. ClangBuiltin<"__nvvm_sust_p_2d_v4i32_trap">;
  3978. def int_nvvm_sust_p_2d_array_i8_trap
  3979. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3980. llvm_i32_ty, llvm_i16_ty], [],
  3981. "llvm.nvvm.sust.p.2d.array.i8.trap">,
  3982. ClangBuiltin<"__nvvm_sust_p_2d_array_i8_trap">;
  3983. def int_nvvm_sust_p_2d_array_i16_trap
  3984. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3985. llvm_i32_ty, llvm_i16_ty], [],
  3986. "llvm.nvvm.sust.p.2d.array.i16.trap">,
  3987. ClangBuiltin<"__nvvm_sust_p_2d_array_i16_trap">;
  3988. def int_nvvm_sust_p_2d_array_i32_trap
  3989. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  3990. llvm_i32_ty, llvm_i32_ty], [],
  3991. "llvm.nvvm.sust.p.2d.array.i32.trap">,
  3992. ClangBuiltin<"__nvvm_sust_p_2d_array_i32_trap">;
  3993. def int_nvvm_sust_p_2d_array_v2i8_trap
  3994. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  3995. llvm_i16_ty, llvm_i16_ty], [],
  3996. "llvm.nvvm.sust.p.2d.array.v2i8.trap">,
  3997. ClangBuiltin<"__nvvm_sust_p_2d_array_v2i8_trap">;
  3998. def int_nvvm_sust_p_2d_array_v2i16_trap
  3999. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4000. llvm_i16_ty, llvm_i16_ty], [],
  4001. "llvm.nvvm.sust.p.2d.array.v2i16.trap">,
  4002. ClangBuiltin<"__nvvm_sust_p_2d_array_v2i16_trap">;
  4003. def int_nvvm_sust_p_2d_array_v2i32_trap
  4004. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4005. llvm_i32_ty, llvm_i32_ty], [],
  4006. "llvm.nvvm.sust.p.2d.array.v2i32.trap">,
  4007. ClangBuiltin<"__nvvm_sust_p_2d_array_v2i32_trap">;
  4008. def int_nvvm_sust_p_2d_array_v4i8_trap
  4009. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4010. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  4011. "llvm.nvvm.sust.p.2d.array.v4i8.trap">,
  4012. ClangBuiltin<"__nvvm_sust_p_2d_array_v4i8_trap">;
  4013. def int_nvvm_sust_p_2d_array_v4i16_trap
  4014. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4015. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  4016. "llvm.nvvm.sust.p.2d.array.v4i16.trap">,
  4017. ClangBuiltin<"__nvvm_sust_p_2d_array_v4i16_trap">;
  4018. def int_nvvm_sust_p_2d_array_v4i32_trap
  4019. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4020. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  4021. "llvm.nvvm.sust.p.2d.array.v4i32.trap">,
  4022. ClangBuiltin<"__nvvm_sust_p_2d_array_v4i32_trap">;
  4023. def int_nvvm_sust_p_3d_i8_trap
  4024. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  4025. llvm_i32_ty, llvm_i16_ty], [],
  4026. "llvm.nvvm.sust.p.3d.i8.trap">,
  4027. ClangBuiltin<"__nvvm_sust_p_3d_i8_trap">;
  4028. def int_nvvm_sust_p_3d_i16_trap
  4029. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  4030. llvm_i32_ty, llvm_i16_ty], [],
  4031. "llvm.nvvm.sust.p.3d.i16.trap">,
  4032. ClangBuiltin<"__nvvm_sust_p_3d_i16_trap">;
  4033. def int_nvvm_sust_p_3d_i32_trap
  4034. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
  4035. llvm_i32_ty, llvm_i32_ty], [],
  4036. "llvm.nvvm.sust.p.3d.i32.trap">,
  4037. ClangBuiltin<"__nvvm_sust_p_3d_i32_trap">;
  4038. def int_nvvm_sust_p_3d_v2i8_trap
  4039. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4040. llvm_i16_ty, llvm_i16_ty], [],
  4041. "llvm.nvvm.sust.p.3d.v2i8.trap">,
  4042. ClangBuiltin<"__nvvm_sust_p_3d_v2i8_trap">;
  4043. def int_nvvm_sust_p_3d_v2i16_trap
  4044. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4045. llvm_i16_ty, llvm_i16_ty], [],
  4046. "llvm.nvvm.sust.p.3d.v2i16.trap">,
  4047. ClangBuiltin<"__nvvm_sust_p_3d_v2i16_trap">;
  4048. def int_nvvm_sust_p_3d_v2i32_trap
  4049. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4050. llvm_i32_ty, llvm_i32_ty], [],
  4051. "llvm.nvvm.sust.p.3d.v2i32.trap">,
  4052. ClangBuiltin<"__nvvm_sust_p_3d_v2i32_trap">;
  4053. def int_nvvm_sust_p_3d_v4i8_trap
  4054. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4055. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  4056. "llvm.nvvm.sust.p.3d.v4i8.trap">,
  4057. ClangBuiltin<"__nvvm_sust_p_3d_v4i8_trap">;
  4058. def int_nvvm_sust_p_3d_v4i16_trap
  4059. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4060. llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
  4061. "llvm.nvvm.sust.p.3d.v4i16.trap">,
  4062. ClangBuiltin<"__nvvm_sust_p_3d_v4i16_trap">;
  4063. def int_nvvm_sust_p_3d_v4i32_trap
  4064. : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
  4065. llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
  4066. "llvm.nvvm.sust.p.3d.v4i32.trap">,
  4067. ClangBuiltin<"__nvvm_sust_p_3d_v4i32_trap">;
  4068. def int_nvvm_rotate_b32
  4069. : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4070. [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.b32">,
  4071. ClangBuiltin<"__nvvm_rotate_b32">;
  4072. def int_nvvm_rotate_b64
  4073. : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty],
  4074. [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.b64">,
  4075. ClangBuiltin<"__nvvm_rotate_b64">;
  4076. def int_nvvm_rotate_right_b64
  4077. : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty],
  4078. [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.right.b64">,
  4079. ClangBuiltin<"__nvvm_rotate_right_b64">;
  4080. def int_nvvm_swap_lo_hi_b64
  4081. : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty],
  4082. [IntrNoMem, IntrSpeculatable], "llvm.nvvm.swap.lo.hi.b64">,
  4083. ClangBuiltin<"__nvvm_swap_lo_hi_b64">;
  4084. // Accessing special registers.
  4085. multiclass PTXReadSRegIntrinsic_v4i32<string regname> {
  4086. // FIXME: Do we need the 128-bit integer type version?
  4087. // def _r64 : Intrinsic<[llvm_i128_ty], [], [IntrNoMem, IntrSpeculatable]>;
  4088. // FIXME: Enable this once v4i32 support is enabled in back-end.
  4089. // def _v4i16 : Intrinsic<[llvm_v4i32_ty], [], [IntrNoMem, IntrSpeculatable]>;
  4090. def _x : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4091. ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_x">;
  4092. def _y : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4093. ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_y">;
  4094. def _z : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4095. ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_z">;
  4096. def _w : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4097. ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_w">;
  4098. }
  4099. class PTXReadSRegIntrinsic_r32<string name>
  4100. : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4101. ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
  4102. class PTXReadSRegIntrinsic_r64<string name>
  4103. : DefaultAttrsIntrinsic<[llvm_i64_ty], [], [IntrNoMem, IntrSpeculatable]>,
  4104. ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
  4105. // Intrinsics to read registers with non-constant values. E.g. the values that
  4106. // do change over the kernel lifetime. Such reads should not be CSE'd.
  4107. class PTXReadNCSRegIntrinsic_r32<string name>
  4108. : Intrinsic<[llvm_i32_ty], [], [IntrInaccessibleMemOnly, IntrNoCallback]>,
  4109. ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
  4110. class PTXReadNCSRegIntrinsic_r64<string name>
  4111. : Intrinsic<[llvm_i64_ty], [], [IntrInaccessibleMemOnly, IntrNoCallback]>,
  4112. ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
  4113. defm int_nvvm_read_ptx_sreg_tid : PTXReadSRegIntrinsic_v4i32<"tid">;
  4114. defm int_nvvm_read_ptx_sreg_ntid : PTXReadSRegIntrinsic_v4i32<"ntid">;
  4115. def int_nvvm_read_ptx_sreg_laneid : PTXReadSRegIntrinsic_r32<"laneid">;
  4116. def int_nvvm_read_ptx_sreg_warpid : PTXReadSRegIntrinsic_r32<"warpid">;
  4117. def int_nvvm_read_ptx_sreg_nwarpid : PTXReadSRegIntrinsic_r32<"nwarpid">;
  4118. defm int_nvvm_read_ptx_sreg_ctaid : PTXReadSRegIntrinsic_v4i32<"ctaid">;
  4119. defm int_nvvm_read_ptx_sreg_nctaid : PTXReadSRegIntrinsic_v4i32<"nctaid">;
  4120. def int_nvvm_read_ptx_sreg_smid : PTXReadSRegIntrinsic_r32<"smid">;
  4121. def int_nvvm_read_ptx_sreg_nsmid : PTXReadSRegIntrinsic_r32<"nsmid">;
  4122. def int_nvvm_read_ptx_sreg_gridid : PTXReadSRegIntrinsic_r32<"gridid">;
  4123. def int_nvvm_read_ptx_sreg_lanemask_eq :
  4124. PTXReadSRegIntrinsic_r32<"lanemask_eq">;
  4125. def int_nvvm_read_ptx_sreg_lanemask_le :
  4126. PTXReadSRegIntrinsic_r32<"lanemask_le">;
  4127. def int_nvvm_read_ptx_sreg_lanemask_lt :
  4128. PTXReadSRegIntrinsic_r32<"lanemask_lt">;
  4129. def int_nvvm_read_ptx_sreg_lanemask_ge :
  4130. PTXReadSRegIntrinsic_r32<"lanemask_ge">;
  4131. def int_nvvm_read_ptx_sreg_lanemask_gt :
  4132. PTXReadSRegIntrinsic_r32<"lanemask_gt">;
  4133. def int_nvvm_read_ptx_sreg_clock : PTXReadNCSRegIntrinsic_r32<"clock">;
  4134. def int_nvvm_read_ptx_sreg_clock64 : PTXReadNCSRegIntrinsic_r64<"clock64">;
  4135. def int_nvvm_read_ptx_sreg_pm0 : PTXReadNCSRegIntrinsic_r32<"pm0">;
  4136. def int_nvvm_read_ptx_sreg_pm1 : PTXReadNCSRegIntrinsic_r32<"pm1">;
  4137. def int_nvvm_read_ptx_sreg_pm2 : PTXReadNCSRegIntrinsic_r32<"pm2">;
  4138. def int_nvvm_read_ptx_sreg_pm3 : PTXReadNCSRegIntrinsic_r32<"pm3">;
  4139. def int_nvvm_read_ptx_sreg_warpsize : PTXReadSRegIntrinsic_r32<"warpsize">;
  4140. //
  4141. // SHUFFLE
  4142. //
  4143. // Generate intrinsics for all variants of shfl instruction.
  4144. foreach sync = [false, true] in {
  4145. foreach mode = ["up", "down", "bfly", "idx"] in {
  4146. foreach type = ["i32", "f32"] in {
  4147. foreach return_pred = [false, true] in {
  4148. foreach i = [SHFL_INFO<sync, mode, type, return_pred>] in {
  4149. if i.withGccBuiltin then {
  4150. def i.Name : ClangBuiltin<i.Builtin>,
  4151. Intrinsic<i.RetTy, i.ArgsTy,
  4152. [IntrInaccessibleMemOnly, IntrConvergent,
  4153. IntrNoCallback],
  4154. i.IntrName>;
  4155. }
  4156. if i.withoutGccBuiltin then {
  4157. def i.Name : Intrinsic<i.RetTy, i.ArgsTy,
  4158. [IntrInaccessibleMemOnly, IntrConvergent,
  4159. IntrNoCallback], i.IntrName>;
  4160. }
  4161. }
  4162. }
  4163. }
  4164. }
  4165. }
  4166. //
  4167. // VOTE
  4168. //
  4169. // vote.all pred
  4170. def int_nvvm_vote_all :
  4171. Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
  4172. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.all">,
  4173. ClangBuiltin<"__nvvm_vote_all">;
  4174. // vote.any pred
  4175. def int_nvvm_vote_any :
  4176. Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
  4177. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.any">,
  4178. ClangBuiltin<"__nvvm_vote_any">;
  4179. // vote.uni pred
  4180. def int_nvvm_vote_uni :
  4181. Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
  4182. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.uni">,
  4183. ClangBuiltin<"__nvvm_vote_uni">;
  4184. // vote.ballot pred
  4185. def int_nvvm_vote_ballot :
  4186. Intrinsic<[llvm_i32_ty], [llvm_i1_ty],
  4187. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.ballot">,
  4188. ClangBuiltin<"__nvvm_vote_ballot">;
  4189. //
  4190. // VOTE.SYNC
  4191. //
  4192. // vote.sync.all mask, pred
  4193. def int_nvvm_vote_all_sync :
  4194. Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
  4195. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.all.sync">,
  4196. ClangBuiltin<"__nvvm_vote_all_sync">;
  4197. // vote.sync.any mask, pred
  4198. def int_nvvm_vote_any_sync :
  4199. Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
  4200. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.any.sync">,
  4201. ClangBuiltin<"__nvvm_vote_any_sync">;
  4202. // vote.sync.uni mask, pred
  4203. def int_nvvm_vote_uni_sync :
  4204. Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
  4205. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.uni.sync">,
  4206. ClangBuiltin<"__nvvm_vote_uni_sync">;
  4207. // vote.sync.ballot mask, pred
  4208. def int_nvvm_vote_ballot_sync :
  4209. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i1_ty],
  4210. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.ballot.sync">,
  4211. ClangBuiltin<"__nvvm_vote_ballot_sync">;
  4212. //
  4213. // MATCH.SYNC
  4214. //
  4215. // match.any.sync.b32 mask, value
  4216. def int_nvvm_match_any_sync_i32 :
  4217. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4218. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.any.sync.i32">,
  4219. ClangBuiltin<"__nvvm_match_any_sync_i32">;
  4220. // match.any.sync.b64 mask, value
  4221. def int_nvvm_match_any_sync_i64 :
  4222. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty],
  4223. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.any.sync.i64">,
  4224. ClangBuiltin<"__nvvm_match_any_sync_i64">;
  4225. // match.all instruction have two variants -- one returns a single value, another
  4226. // returns a pair {value, predicate}. We currently only implement the latter as
  4227. // that's the variant exposed by CUDA API.
  4228. // match.all.sync.b32p mask, value
  4229. def int_nvvm_match_all_sync_i32p :
  4230. Intrinsic<[llvm_i32_ty, llvm_i1_ty], [llvm_i32_ty, llvm_i32_ty],
  4231. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.all.sync.i32p">;
  4232. // match.all.sync.b64p mask, value
  4233. def int_nvvm_match_all_sync_i64p :
  4234. Intrinsic<[llvm_i32_ty, llvm_i1_ty], [llvm_i32_ty, llvm_i64_ty],
  4235. [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.all.sync.i64p">;
  4236. //
  4237. // REDUX.SYNC
  4238. //
  4239. // redux.sync.min.u32 dst, src, membermask;
  4240. def int_nvvm_redux_sync_umin : ClangBuiltin<"__nvvm_redux_sync_umin">,
  4241. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4242. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4243. // redux.sync.max.u32 dst, src, membermask;
  4244. def int_nvvm_redux_sync_umax : ClangBuiltin<"__nvvm_redux_sync_umax">,
  4245. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4246. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4247. // redux.sync.add.s32 dst, src, membermask;
  4248. def int_nvvm_redux_sync_add : ClangBuiltin<"__nvvm_redux_sync_add">,
  4249. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4250. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4251. // redux.sync.min.s32 dst, src, membermask;
  4252. def int_nvvm_redux_sync_min : ClangBuiltin<"__nvvm_redux_sync_min">,
  4253. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4254. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4255. // redux.sync.max.s32 dst, src, membermask;
  4256. def int_nvvm_redux_sync_max : ClangBuiltin<"__nvvm_redux_sync_max">,
  4257. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4258. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4259. // redux.sync.and.b32 dst, src, membermask;
  4260. def int_nvvm_redux_sync_and : ClangBuiltin<"__nvvm_redux_sync_and">,
  4261. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4262. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4263. // redux.sync.xor.b32 dst, src, membermask;
  4264. def int_nvvm_redux_sync_xor : ClangBuiltin<"__nvvm_redux_sync_xor">,
  4265. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4266. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4267. // redux.sync.or.b32 dst, src, membermask;
  4268. def int_nvvm_redux_sync_or : ClangBuiltin<"__nvvm_redux_sync_or">,
  4269. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  4270. [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
  4271. //
  4272. // WMMA instructions
  4273. //
  4274. // WMMA.LOAD
  4275. class NVVM_WMMA_LD<WMMA_REGS Frag, string Layout, int WithStride>
  4276. : Intrinsic<Frag.regs,
  4277. !if(WithStride, [llvm_anyptr_ty, llvm_i32_ty], [llvm_anyptr_ty]),
  4278. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
  4279. WMMA_NAME_LDST<"load", Frag, Layout, WithStride>.intr>;
  4280. // WMMA.STORE.D
  4281. class NVVM_WMMA_ST<WMMA_REGS Frag, string Layout, int WithStride>
  4282. : Intrinsic<[],
  4283. !listconcat(
  4284. [llvm_anyptr_ty],
  4285. Frag.regs,
  4286. !if(WithStride, [llvm_i32_ty], [])),
  4287. [IntrWriteMem, IntrArgMemOnly, IntrNoCallback, WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
  4288. WMMA_NAME_LDST<"store", Frag, Layout, WithStride>.intr>;
  4289. // Create all load/store variants
  4290. foreach layout = ["row", "col"] in {
  4291. foreach stride = [0, 1] in {
  4292. foreach frag = NVVM_MMA_OPS.all_ld_ops in
  4293. if NVVM_WMMA_LDST_SUPPORTED<frag, layout>.ret then
  4294. def WMMA_NAME_LDST<"load", frag, layout, stride>.record
  4295. : NVVM_WMMA_LD<frag, layout, stride>;
  4296. foreach frag = NVVM_MMA_OPS.all_st_ops in
  4297. if NVVM_WMMA_LDST_SUPPORTED<frag, layout>.ret then
  4298. def WMMA_NAME_LDST<"store", frag, layout, stride>.record
  4299. : NVVM_WMMA_ST<frag, layout, stride>;
  4300. }
  4301. }
  4302. // WMMA.MMA
  4303. class NVVM_WMMA_MMA<string ALayout, string BLayout, int Satfinite, string rnd, string b1op,
  4304. WMMA_REGS A, WMMA_REGS B,
  4305. WMMA_REGS C, WMMA_REGS D>
  4306. : Intrinsic<D.regs,
  4307. !listconcat(A.regs, B.regs, C.regs),
  4308. [IntrNoMem, IntrNoCallback],
  4309. WMMA_NAME<ALayout, BLayout, Satfinite, rnd, b1op, A, B, C, D>.llvm>;
  4310. foreach layout_a = ["row", "col"] in {
  4311. foreach layout_b = ["row", "col"] in {
  4312. foreach satf = [0, 1] in {
  4313. foreach rnd = ["", "rn", "rz", "rm", "rp"] in {
  4314. foreach op = NVVM_MMA_OPS.all_wmma_ops in {
  4315. foreach b1op = NVVM_MMA_B1OPS<op>.ret in {
  4316. if NVVM_WMMA_SUPPORTED<op, layout_a, layout_b, satf, rnd>.ret then {
  4317. def WMMA_NAME<layout_a, layout_b, satf, rnd, b1op,
  4318. op[0], op[1], op[2], op[3]>.record
  4319. : NVVM_WMMA_MMA<layout_a, layout_b, satf, rnd, b1op,
  4320. op[0], op[1], op[2], op[3]>;
  4321. }
  4322. } // b1op
  4323. } // op
  4324. } // rnd
  4325. } // satf
  4326. } // layout_b
  4327. } // layout_a
  4328. // MMA
  4329. class NVVM_MMA<string ALayout, string BLayout, int Satfinite, string b1op,
  4330. WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D>
  4331. : Intrinsic<D.regs,
  4332. !listconcat(A.regs, B.regs, C.regs),
  4333. [IntrNoMem, IntrNoCallback],
  4334. MMA_NAME<ALayout, BLayout, Satfinite, b1op, A, B, C, D>.llvm>;
  4335. foreach layout_a = ["row", "col"] in {
  4336. foreach layout_b = ["row", "col"] in {
  4337. foreach satf = [0, 1] in {
  4338. foreach op = NVVM_MMA_OPS.all_mma_ops in {
  4339. foreach b1op = NVVM_MMA_B1OPS<op>.ret in {
  4340. if NVVM_MMA_SUPPORTED<op, layout_a, layout_b, satf>.ret then {
  4341. def MMA_NAME<layout_a, layout_b, satf, b1op, op[0], op[1], op[2], op[3]>.record
  4342. : NVVM_MMA<layout_a, layout_b, satf, b1op, op[0], op[1], op[2], op[3]>;
  4343. }
  4344. } // b1op
  4345. } // op
  4346. } // satf
  4347. } // layout_b
  4348. } // layout_a
  4349. // LDMATRIX
  4350. class NVVM_LDMATRIX<WMMA_REGS Frag, int Transposed>
  4351. : Intrinsic<Frag.regs, [llvm_anyptr_ty],
  4352. [IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>,
  4353. NoCapture<ArgIndex<0>>],
  4354. LDMATRIX_NAME<Frag, Transposed>.intr>;
  4355. foreach transposed = [0, 1] in {
  4356. foreach frag = NVVM_MMA_OPS.all_ldmatrix_ops in {
  4357. if NVVM_LDMATRIX_SUPPORTED<frag>.ret then {
  4358. def LDMATRIX_NAME<frag, transposed>.record
  4359. : NVVM_LDMATRIX<frag, transposed>;
  4360. }
  4361. }
  4362. }
  4363. } // let TargetPrefix = "nvvm"