ISDOpcodes.h 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===-- llvm/CodeGen/ISDOpcodes.h - CodeGen opcodes -------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file declares codegen opcodes and related utilities.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_CODEGEN_ISDOPCODES_H
  18. #define LLVM_CODEGEN_ISDOPCODES_H
  19. #include "llvm/CodeGen/ValueTypes.h"
  20. namespace llvm {
  21. /// ISD namespace - This namespace contains an enum which represents all of the
  22. /// SelectionDAG node types and value types.
  23. ///
  24. namespace ISD {
  25. //===--------------------------------------------------------------------===//
  26. /// ISD::NodeType enum - This enum defines the target-independent operators
  27. /// for a SelectionDAG.
  28. ///
  29. /// Targets may also define target-dependent operator codes for SDNodes. For
  30. /// example, on x86, these are the enum values in the X86ISD namespace.
  31. /// Targets should aim to use target-independent operators to model their
  32. /// instruction sets as much as possible, and only use target-dependent
  33. /// operators when they have special requirements.
  34. ///
  35. /// Finally, during and after selection proper, SNodes may use special
  36. /// operator codes that correspond directly with MachineInstr opcodes. These
  37. /// are used to represent selected instructions. See the isMachineOpcode()
  38. /// and getMachineOpcode() member functions of SDNode.
  39. ///
  40. enum NodeType {
  41. /// DELETED_NODE - This is an illegal value that is used to catch
  42. /// errors. This opcode is not a legal opcode for any node.
  43. DELETED_NODE,
  44. /// EntryToken - This is the marker used to indicate the start of a region.
  45. EntryToken,
  46. /// TokenFactor - This node takes multiple tokens as input and produces a
  47. /// single token result. This is used to represent the fact that the operand
  48. /// operators are independent of each other.
  49. TokenFactor,
  50. /// AssertSext, AssertZext - These nodes record if a register contains a
  51. /// value that has already been zero or sign extended from a narrower type.
  52. /// These nodes take two operands. The first is the node that has already
  53. /// been extended, and the second is a value type node indicating the width
  54. /// of the extension.
  55. /// NOTE: In case of the source value (or any vector element value) is
  56. /// poisoned the assertion will not be true for that value.
  57. AssertSext,
  58. AssertZext,
  59. /// AssertAlign - These nodes record if a register contains a value that
  60. /// has a known alignment and the trailing bits are known to be zero.
  61. /// NOTE: In case of the source value (or any vector element value) is
  62. /// poisoned the assertion will not be true for that value.
  63. AssertAlign,
  64. /// Various leaf nodes.
  65. BasicBlock,
  66. VALUETYPE,
  67. CONDCODE,
  68. Register,
  69. RegisterMask,
  70. Constant,
  71. ConstantFP,
  72. GlobalAddress,
  73. GlobalTLSAddress,
  74. FrameIndex,
  75. JumpTable,
  76. ConstantPool,
  77. ExternalSymbol,
  78. BlockAddress,
  79. /// The address of the GOT
  80. GLOBAL_OFFSET_TABLE,
  81. /// FRAMEADDR, RETURNADDR - These nodes represent llvm.frameaddress and
  82. /// llvm.returnaddress on the DAG. These nodes take one operand, the index
  83. /// of the frame or return address to return. An index of zero corresponds
  84. /// to the current function's frame or return address, an index of one to
  85. /// the parent's frame or return address, and so on.
  86. FRAMEADDR,
  87. RETURNADDR,
  88. /// ADDROFRETURNADDR - Represents the llvm.addressofreturnaddress intrinsic.
  89. /// This node takes no operand, returns a target-specific pointer to the
  90. /// place in the stack frame where the return address of the current
  91. /// function is stored.
  92. ADDROFRETURNADDR,
  93. /// SPONENTRY - Represents the llvm.sponentry intrinsic. Takes no argument
  94. /// and returns the stack pointer value at the entry of the current
  95. /// function calling this intrinsic.
  96. SPONENTRY,
  97. /// LOCAL_RECOVER - Represents the llvm.localrecover intrinsic.
  98. /// Materializes the offset from the local object pointer of another
  99. /// function to a particular local object passed to llvm.localescape. The
  100. /// operand is the MCSymbol label used to represent this offset, since
  101. /// typically the offset is not known until after code generation of the
  102. /// parent.
  103. LOCAL_RECOVER,
  104. /// READ_REGISTER, WRITE_REGISTER - This node represents llvm.register on
  105. /// the DAG, which implements the named register global variables extension.
  106. READ_REGISTER,
  107. WRITE_REGISTER,
  108. /// FRAME_TO_ARGS_OFFSET - This node represents offset from frame pointer to
  109. /// first (possible) on-stack argument. This is needed for correct stack
  110. /// adjustment during unwind.
  111. FRAME_TO_ARGS_OFFSET,
  112. /// EH_DWARF_CFA - This node represents the pointer to the DWARF Canonical
  113. /// Frame Address (CFA), generally the value of the stack pointer at the
  114. /// call site in the previous frame.
  115. EH_DWARF_CFA,
  116. /// OUTCHAIN = EH_RETURN(INCHAIN, OFFSET, HANDLER) - This node represents
  117. /// 'eh_return' gcc dwarf builtin, which is used to return from
  118. /// exception. The general meaning is: adjust stack by OFFSET and pass
  119. /// execution to HANDLER. Many platform-related details also :)
  120. EH_RETURN,
  121. /// RESULT, OUTCHAIN = EH_SJLJ_SETJMP(INCHAIN, buffer)
  122. /// This corresponds to the eh.sjlj.setjmp intrinsic.
  123. /// It takes an input chain and a pointer to the jump buffer as inputs
  124. /// and returns an outchain.
  125. EH_SJLJ_SETJMP,
  126. /// OUTCHAIN = EH_SJLJ_LONGJMP(INCHAIN, buffer)
  127. /// This corresponds to the eh.sjlj.longjmp intrinsic.
  128. /// It takes an input chain and a pointer to the jump buffer as inputs
  129. /// and returns an outchain.
  130. EH_SJLJ_LONGJMP,
  131. /// OUTCHAIN = EH_SJLJ_SETUP_DISPATCH(INCHAIN)
  132. /// The target initializes the dispatch table here.
  133. EH_SJLJ_SETUP_DISPATCH,
  134. /// TargetConstant* - Like Constant*, but the DAG does not do any folding,
  135. /// simplification, or lowering of the constant. They are used for constants
  136. /// which are known to fit in the immediate fields of their users, or for
  137. /// carrying magic numbers which are not values which need to be
  138. /// materialized in registers.
  139. TargetConstant,
  140. TargetConstantFP,
  141. /// TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or
  142. /// anything else with this node, and this is valid in the target-specific
  143. /// dag, turning into a GlobalAddress operand.
  144. TargetGlobalAddress,
  145. TargetGlobalTLSAddress,
  146. TargetFrameIndex,
  147. TargetJumpTable,
  148. TargetConstantPool,
  149. TargetExternalSymbol,
  150. TargetBlockAddress,
  151. MCSymbol,
  152. /// TargetIndex - Like a constant pool entry, but with completely
  153. /// target-dependent semantics. Holds target flags, a 32-bit index, and a
  154. /// 64-bit index. Targets can use this however they like.
  155. TargetIndex,
  156. /// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...)
  157. /// This node represents a target intrinsic function with no side effects.
  158. /// The first operand is the ID number of the intrinsic from the
  159. /// llvm::Intrinsic namespace. The operands to the intrinsic follow. The
  160. /// node returns the result of the intrinsic.
  161. INTRINSIC_WO_CHAIN,
  162. /// RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...)
  163. /// This node represents a target intrinsic function with side effects that
  164. /// returns a result. The first operand is a chain pointer. The second is
  165. /// the ID number of the intrinsic from the llvm::Intrinsic namespace. The
  166. /// operands to the intrinsic follow. The node has two results, the result
  167. /// of the intrinsic and an output chain.
  168. INTRINSIC_W_CHAIN,
  169. /// OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...)
  170. /// This node represents a target intrinsic function with side effects that
  171. /// does not return a result. The first operand is a chain pointer. The
  172. /// second is the ID number of the intrinsic from the llvm::Intrinsic
  173. /// namespace. The operands to the intrinsic follow.
  174. INTRINSIC_VOID,
  175. /// CopyToReg - This node has three operands: a chain, a register number to
  176. /// set to this value, and a value.
  177. CopyToReg,
  178. /// CopyFromReg - This node indicates that the input value is a virtual or
  179. /// physical register that is defined outside of the scope of this
  180. /// SelectionDAG. The register is available from the RegisterSDNode object.
  181. CopyFromReg,
  182. /// UNDEF - An undefined node.
  183. UNDEF,
  184. // FREEZE - FREEZE(VAL) returns an arbitrary value if VAL is UNDEF (or
  185. // is evaluated to UNDEF), or returns VAL otherwise. Note that each
  186. // read of UNDEF can yield different value, but FREEZE(UNDEF) cannot.
  187. FREEZE,
  188. /// EXTRACT_ELEMENT - This is used to get the lower or upper (determined by
  189. /// a Constant, which is required to be operand #1) half of the integer or
  190. /// float value specified as operand #0. This is only for use before
  191. /// legalization, for values that will be broken into multiple registers.
  192. EXTRACT_ELEMENT,
  193. /// BUILD_PAIR - This is the opposite of EXTRACT_ELEMENT in some ways.
  194. /// Given two values of the same integer value type, this produces a value
  195. /// twice as big. Like EXTRACT_ELEMENT, this can only be used before
  196. /// legalization. The lower part of the composite value should be in
  197. /// element 0 and the upper part should be in element 1.
  198. BUILD_PAIR,
  199. /// MERGE_VALUES - This node takes multiple discrete operands and returns
  200. /// them all as its individual results. This nodes has exactly the same
  201. /// number of inputs and outputs. This node is useful for some pieces of the
  202. /// code generator that want to think about a single node with multiple
  203. /// results, not multiple nodes.
  204. MERGE_VALUES,
  205. /// Simple integer binary arithmetic operators.
  206. ADD,
  207. SUB,
  208. MUL,
  209. SDIV,
  210. UDIV,
  211. SREM,
  212. UREM,
  213. /// SMUL_LOHI/UMUL_LOHI - Multiply two integers of type iN, producing
  214. /// a signed/unsigned value of type i[2*N], and return the full value as
  215. /// two results, each of type iN.
  216. SMUL_LOHI,
  217. UMUL_LOHI,
  218. /// SDIVREM/UDIVREM - Divide two integers and produce both a quotient and
  219. /// remainder result.
  220. SDIVREM,
  221. UDIVREM,
  222. /// CARRY_FALSE - This node is used when folding other nodes,
  223. /// like ADDC/SUBC, which indicate the carry result is always false.
  224. CARRY_FALSE,
  225. /// Carry-setting nodes for multiple precision addition and subtraction.
  226. /// These nodes take two operands of the same value type, and produce two
  227. /// results. The first result is the normal add or sub result, the second
  228. /// result is the carry flag result.
  229. /// FIXME: These nodes are deprecated in favor of ADDCARRY and SUBCARRY.
  230. /// They are kept around for now to provide a smooth transition path
  231. /// toward the use of ADDCARRY/SUBCARRY and will eventually be removed.
  232. ADDC,
  233. SUBC,
  234. /// Carry-using nodes for multiple precision addition and subtraction. These
  235. /// nodes take three operands: The first two are the normal lhs and rhs to
  236. /// the add or sub, and the third is the input carry flag. These nodes
  237. /// produce two results; the normal result of the add or sub, and the output
  238. /// carry flag. These nodes both read and write a carry flag to allow them
  239. /// to them to be chained together for add and sub of arbitrarily large
  240. /// values.
  241. ADDE,
  242. SUBE,
  243. /// Carry-using nodes for multiple precision addition and subtraction.
  244. /// These nodes take three operands: The first two are the normal lhs and
  245. /// rhs to the add or sub, and the third is a boolean indicating if there
  246. /// is an incoming carry. These nodes produce two results: the normal
  247. /// result of the add or sub, and the output carry so they can be chained
  248. /// together. The use of this opcode is preferable to adde/sube if the
  249. /// target supports it, as the carry is a regular value rather than a
  250. /// glue, which allows further optimisation.
  251. ADDCARRY,
  252. SUBCARRY,
  253. /// Carry-using overflow-aware nodes for multiple precision addition and
  254. /// subtraction. These nodes take three operands: The first two are normal lhs
  255. /// and rhs to the add or sub, and the third is a boolean indicating if there
  256. /// is an incoming carry. They produce two results: the normal result of the
  257. /// add or sub, and a boolean that indicates if an overflow occured (*not*
  258. /// flag, because it may be a store to memory, etc.). If the type of the
  259. /// boolean is not i1 then the high bits conform to getBooleanContents.
  260. SADDO_CARRY,
  261. SSUBO_CARRY,
  262. /// RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for addition.
  263. /// These nodes take two operands: the normal LHS and RHS to the add. They
  264. /// produce two results: the normal result of the add, and a boolean that
  265. /// indicates if an overflow occurred (*not* a flag, because it may be store
  266. /// to memory, etc.). If the type of the boolean is not i1 then the high
  267. /// bits conform to getBooleanContents.
  268. /// These nodes are generated from llvm.[su]add.with.overflow intrinsics.
  269. SADDO,
  270. UADDO,
  271. /// Same for subtraction.
  272. SSUBO,
  273. USUBO,
  274. /// Same for multiplication.
  275. SMULO,
  276. UMULO,
  277. /// RESULT = [US]ADDSAT(LHS, RHS) - Perform saturation addition on 2
  278. /// integers with the same bit width (W). If the true value of LHS + RHS
  279. /// exceeds the largest value that can be represented by W bits, the
  280. /// resulting value is this maximum value. Otherwise, if this value is less
  281. /// than the smallest value that can be represented by W bits, the
  282. /// resulting value is this minimum value.
  283. SADDSAT,
  284. UADDSAT,
  285. /// RESULT = [US]SUBSAT(LHS, RHS) - Perform saturation subtraction on 2
  286. /// integers with the same bit width (W). If the true value of LHS - RHS
  287. /// exceeds the largest value that can be represented by W bits, the
  288. /// resulting value is this maximum value. Otherwise, if this value is less
  289. /// than the smallest value that can be represented by W bits, the
  290. /// resulting value is this minimum value.
  291. SSUBSAT,
  292. USUBSAT,
  293. /// RESULT = [US]SHLSAT(LHS, RHS) - Perform saturation left shift. The first
  294. /// operand is the value to be shifted, and the second argument is the amount
  295. /// to shift by. Both must be integers of the same bit width (W). If the true
  296. /// value of LHS << RHS exceeds the largest value that can be represented by
  297. /// W bits, the resulting value is this maximum value, Otherwise, if this
  298. /// value is less than the smallest value that can be represented by W bits,
  299. /// the resulting value is this minimum value.
  300. SSHLSAT,
  301. USHLSAT,
  302. /// RESULT = [US]MULFIX(LHS, RHS, SCALE) - Perform fixed point multiplication
  303. /// on 2 integers with the same width and scale. SCALE represents the scale
  304. /// of both operands as fixed point numbers. This SCALE parameter must be a
  305. /// constant integer. A scale of zero is effectively performing
  306. /// multiplication on 2 integers.
  307. SMULFIX,
  308. UMULFIX,
  309. /// Same as the corresponding unsaturated fixed point instructions, but the
  310. /// result is clamped between the min and max values representable by the
  311. /// bits of the first 2 operands.
  312. SMULFIXSAT,
  313. UMULFIXSAT,
  314. /// RESULT = [US]DIVFIX(LHS, RHS, SCALE) - Perform fixed point division on
  315. /// 2 integers with the same width and scale. SCALE represents the scale
  316. /// of both operands as fixed point numbers. This SCALE parameter must be a
  317. /// constant integer.
  318. SDIVFIX,
  319. UDIVFIX,
  320. /// Same as the corresponding unsaturated fixed point instructions, but the
  321. /// result is clamped between the min and max values representable by the
  322. /// bits of the first 2 operands.
  323. SDIVFIXSAT,
  324. UDIVFIXSAT,
  325. /// Simple binary floating point operators.
  326. FADD,
  327. FSUB,
  328. FMUL,
  329. FDIV,
  330. FREM,
  331. /// Constrained versions of the binary floating point operators.
  332. /// These will be lowered to the simple operators before final selection.
  333. /// They are used to limit optimizations while the DAG is being
  334. /// optimized.
  335. STRICT_FADD,
  336. STRICT_FSUB,
  337. STRICT_FMUL,
  338. STRICT_FDIV,
  339. STRICT_FREM,
  340. STRICT_FMA,
  341. /// Constrained versions of libm-equivalent floating point intrinsics.
  342. /// These will be lowered to the equivalent non-constrained pseudo-op
  343. /// (or expanded to the equivalent library call) before final selection.
  344. /// They are used to limit optimizations while the DAG is being optimized.
  345. STRICT_FSQRT,
  346. STRICT_FPOW,
  347. STRICT_FPOWI,
  348. STRICT_FSIN,
  349. STRICT_FCOS,
  350. STRICT_FEXP,
  351. STRICT_FEXP2,
  352. STRICT_FLOG,
  353. STRICT_FLOG10,
  354. STRICT_FLOG2,
  355. STRICT_FRINT,
  356. STRICT_FNEARBYINT,
  357. STRICT_FMAXNUM,
  358. STRICT_FMINNUM,
  359. STRICT_FCEIL,
  360. STRICT_FFLOOR,
  361. STRICT_FROUND,
  362. STRICT_FROUNDEVEN,
  363. STRICT_FTRUNC,
  364. STRICT_LROUND,
  365. STRICT_LLROUND,
  366. STRICT_LRINT,
  367. STRICT_LLRINT,
  368. STRICT_FMAXIMUM,
  369. STRICT_FMINIMUM,
  370. /// STRICT_FP_TO_[US]INT - Convert a floating point value to a signed or
  371. /// unsigned integer. These have the same semantics as fptosi and fptoui
  372. /// in IR.
  373. /// They are used to limit optimizations while the DAG is being optimized.
  374. STRICT_FP_TO_SINT,
  375. STRICT_FP_TO_UINT,
  376. /// STRICT_[US]INT_TO_FP - Convert a signed or unsigned integer to
  377. /// a floating point value. These have the same semantics as sitofp and
  378. /// uitofp in IR.
  379. /// They are used to limit optimizations while the DAG is being optimized.
  380. STRICT_SINT_TO_FP,
  381. STRICT_UINT_TO_FP,
  382. /// X = STRICT_FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating
  383. /// point type down to the precision of the destination VT. TRUNC is a
  384. /// flag, which is always an integer that is zero or one. If TRUNC is 0,
  385. /// this is a normal rounding, if it is 1, this FP_ROUND is known to not
  386. /// change the value of Y.
  387. ///
  388. /// The TRUNC = 1 case is used in cases where we know that the value will
  389. /// not be modified by the node, because Y is not using any of the extra
  390. /// precision of source type. This allows certain transformations like
  391. /// STRICT_FP_EXTEND(STRICT_FP_ROUND(X,1)) -> X which are not safe for
  392. /// STRICT_FP_EXTEND(STRICT_FP_ROUND(X,0)) because the extra bits aren't
  393. /// removed.
  394. /// It is used to limit optimizations while the DAG is being optimized.
  395. STRICT_FP_ROUND,
  396. /// X = STRICT_FP_EXTEND(Y) - Extend a smaller FP type into a larger FP
  397. /// type.
  398. /// It is used to limit optimizations while the DAG is being optimized.
  399. STRICT_FP_EXTEND,
  400. /// STRICT_FSETCC/STRICT_FSETCCS - Constrained versions of SETCC, used
  401. /// for floating-point operands only. STRICT_FSETCC performs a quiet
  402. /// comparison operation, while STRICT_FSETCCS performs a signaling
  403. /// comparison operation.
  404. STRICT_FSETCC,
  405. STRICT_FSETCCS,
  406. /// FMA - Perform a * b + c with no intermediate rounding step.
  407. FMA,
  408. /// FMAD - Perform a * b + c, while getting the same result as the
  409. /// separately rounded operations.
  410. FMAD,
  411. /// FCOPYSIGN(X, Y) - Return the value of X with the sign of Y. NOTE: This
  412. /// DAG node does not require that X and Y have the same type, just that
  413. /// they are both floating point. X and the result must have the same type.
  414. /// FCOPYSIGN(f32, f64) is allowed.
  415. FCOPYSIGN,
  416. /// INT = FGETSIGN(FP) - Return the sign bit of the specified floating point
  417. /// value as an integer 0/1 value.
  418. FGETSIGN,
  419. /// Returns platform specific canonical encoding of a floating point number.
  420. FCANONICALIZE,
  421. /// BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a fixed-width vector
  422. /// with the specified, possibly variable, elements. The types of the
  423. /// operands must match the vector element type, except that integer types
  424. /// are allowed to be larger than the element type, in which case the
  425. /// operands are implicitly truncated. The types of the operands must all
  426. /// be the same.
  427. BUILD_VECTOR,
  428. /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element
  429. /// at IDX replaced with VAL. If the type of VAL is larger than the vector
  430. /// element type then VAL is truncated before replacement.
  431. ///
  432. /// If VECTOR is a scalable vector, then IDX may be larger than the minimum
  433. /// vector width. IDX is not first scaled by the runtime scaling factor of
  434. /// VECTOR.
  435. INSERT_VECTOR_ELT,
  436. /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
  437. /// identified by the (potentially variable) element number IDX. If the return
  438. /// type is an integer type larger than the element type of the vector, the
  439. /// result is extended to the width of the return type. In that case, the high
  440. /// bits are undefined.
  441. ///
  442. /// If VECTOR is a scalable vector, then IDX may be larger than the minimum
  443. /// vector width. IDX is not first scaled by the runtime scaling factor of
  444. /// VECTOR.
  445. EXTRACT_VECTOR_ELT,
  446. /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of
  447. /// vector type with the same length and element type, this produces a
  448. /// concatenated vector result value, with length equal to the sum of the
  449. /// lengths of the input vectors. If VECTOR0 is a fixed-width vector, then
  450. /// VECTOR1..VECTORN must all be fixed-width vectors. Similarly, if VECTOR0
  451. /// is a scalable vector, then VECTOR1..VECTORN must all be scalable vectors.
  452. CONCAT_VECTORS,
  453. /// INSERT_SUBVECTOR(VECTOR1, VECTOR2, IDX) - Returns a vector with VECTOR2
  454. /// inserted into VECTOR1. IDX represents the starting element number at which
  455. /// VECTOR2 will be inserted. IDX must be a constant multiple of T's known
  456. /// minimum vector length. Let the type of VECTOR2 be T, then if T is a
  457. /// scalable vector, IDX is first scaled by the runtime scaling factor of T.
  458. /// The elements of VECTOR1 starting at IDX are overwritten with VECTOR2.
  459. /// Elements IDX through (IDX + num_elements(T) - 1) must be valid VECTOR1
  460. /// indices. If this condition cannot be determined statically but is false at
  461. /// runtime, then the result vector is undefined. The IDX parameter must be a
  462. /// vector index constant type, which for most targets will be an integer
  463. /// pointer type.
  464. ///
  465. /// This operation supports inserting a fixed-width vector into a scalable
  466. /// vector, but not the other way around.
  467. INSERT_SUBVECTOR,
  468. /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR.
  469. /// Let the result type be T, then IDX represents the starting element number
  470. /// from which a subvector of type T is extracted. IDX must be a constant
  471. /// multiple of T's known minimum vector length. If T is a scalable vector,
  472. /// IDX is first scaled by the runtime scaling factor of T. Elements IDX
  473. /// through (IDX + num_elements(T) - 1) must be valid VECTOR indices. If this
  474. /// condition cannot be determined statically but is false at runtime, then
  475. /// the result vector is undefined. The IDX parameter must be a vector index
  476. /// constant type, which for most targets will be an integer pointer type.
  477. ///
  478. /// This operation supports extracting a fixed-width vector from a scalable
  479. /// vector, but not the other way around.
  480. EXTRACT_SUBVECTOR,
  481. /// VECTOR_REVERSE(VECTOR) - Returns a vector, of the same type as VECTOR,
  482. /// whose elements are shuffled using the following algorithm:
  483. /// RESULT[i] = VECTOR[VECTOR.ElementCount - 1 - i]
  484. VECTOR_REVERSE,
  485. /// VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as
  486. /// VEC1/VEC2. A VECTOR_SHUFFLE node also contains an array of constant int
  487. /// values that indicate which value (or undef) each result element will
  488. /// get. These constant ints are accessible through the
  489. /// ShuffleVectorSDNode class. This is quite similar to the Altivec
  490. /// 'vperm' instruction, except that the indices must be constants and are
  491. /// in terms of the element size of VEC1/VEC2, not in terms of bytes.
  492. VECTOR_SHUFFLE,
  493. /// VECTOR_SPLICE(VEC1, VEC2, IMM) - Returns a subvector of the same type as
  494. /// VEC1/VEC2 from CONCAT_VECTORS(VEC1, VEC2), based on the IMM in two ways.
  495. /// Let the result type be T, if IMM is positive it represents the starting
  496. /// element number (an index) from which a subvector of type T is extracted
  497. /// from CONCAT_VECTORS(VEC1, VEC2). If IMM is negative it represents a count
  498. /// specifying the number of trailing elements to extract from VEC1, where the
  499. /// elements of T are selected using the following algorithm:
  500. /// RESULT[i] = CONCAT_VECTORS(VEC1,VEC2)[VEC1.ElementCount - ABS(IMM) + i]
  501. /// If IMM is not in the range [-VL, VL-1] the result vector is undefined. IMM
  502. /// is a constant integer.
  503. VECTOR_SPLICE,
  504. /// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a
  505. /// scalar value into element 0 of the resultant vector type. The top
  506. /// elements 1 to N-1 of the N-element vector are undefined. The type
  507. /// of the operand must match the vector element type, except when they
  508. /// are integer types. In this case the operand is allowed to be wider
  509. /// than the vector element type, and is implicitly truncated to it.
  510. SCALAR_TO_VECTOR,
  511. /// SPLAT_VECTOR(VAL) - Returns a vector with the scalar value VAL
  512. /// duplicated in all lanes. The type of the operand must match the vector
  513. /// element type, except when they are integer types. In this case the
  514. /// operand is allowed to be wider than the vector element type, and is
  515. /// implicitly truncated to it.
  516. SPLAT_VECTOR,
  517. /// SPLAT_VECTOR_PARTS(SCALAR1, SCALAR2, ...) - Returns a vector with the
  518. /// scalar values joined together and then duplicated in all lanes. This
  519. /// represents a SPLAT_VECTOR that has had its scalar operand expanded. This
  520. /// allows representing a 64-bit splat on a target with 32-bit integers. The
  521. /// total width of the scalars must cover the element width. SCALAR1 contains
  522. /// the least significant bits of the value regardless of endianness and all
  523. /// scalars should have the same type.
  524. SPLAT_VECTOR_PARTS,
  525. /// STEP_VECTOR(IMM) - Returns a scalable vector whose lanes are comprised
  526. /// of a linear sequence of unsigned values starting from 0 with a step of
  527. /// IMM, where IMM must be a TargetConstant with type equal to the vector
  528. /// element type. The arithmetic is performed modulo the bitwidth of the
  529. /// element.
  530. ///
  531. /// The operation does not support returning fixed-width vectors or
  532. /// non-constant operands.
  533. STEP_VECTOR,
  534. /// MULHU/MULHS - Multiply high - Multiply two integers of type iN,
  535. /// producing an unsigned/signed value of type i[2*N], then return the top
  536. /// part.
  537. MULHU,
  538. MULHS,
  539. // ABDS/ABDU - Absolute difference - Return the absolute difference between
  540. // two numbers interpreted as signed/unsigned.
  541. // i.e trunc(abs(sext(Op0) - sext(Op1))) becomes abds(Op0, Op1)
  542. // or trunc(abs(zext(Op0) - zext(Op1))) becomes abdu(Op0, Op1)
  543. ABDS,
  544. ABDU,
  545. /// [US]{MIN/MAX} - Binary minimum or maximum of signed or unsigned
  546. /// integers.
  547. SMIN,
  548. SMAX,
  549. UMIN,
  550. UMAX,
  551. /// Bitwise operators - logical and, logical or, logical xor.
  552. AND,
  553. OR,
  554. XOR,
  555. /// ABS - Determine the unsigned absolute value of a signed integer value of
  556. /// the same bitwidth.
  557. /// Note: A value of INT_MIN will return INT_MIN, no saturation or overflow
  558. /// is performed.
  559. ABS,
  560. /// Shift and rotation operations. After legalization, the type of the
  561. /// shift amount is known to be TLI.getShiftAmountTy(). Before legalization
  562. /// the shift amount can be any type, but care must be taken to ensure it is
  563. /// large enough. TLI.getShiftAmountTy() is i8 on some targets, but before
  564. /// legalization, types like i1024 can occur and i8 doesn't have enough bits
  565. /// to represent the shift amount.
  566. /// When the 1st operand is a vector, the shift amount must be in the same
  567. /// type. (TLI.getShiftAmountTy() will return the same type when the input
  568. /// type is a vector.)
  569. /// For rotates and funnel shifts, the shift amount is treated as an unsigned
  570. /// amount modulo the element size of the first operand.
  571. ///
  572. /// Funnel 'double' shifts take 3 operands, 2 inputs and the shift amount.
  573. /// fshl(X,Y,Z): (X << (Z % BW)) | (Y >> (BW - (Z % BW)))
  574. /// fshr(X,Y,Z): (X << (BW - (Z % BW))) | (Y >> (Z % BW))
  575. SHL,
  576. SRA,
  577. SRL,
  578. ROTL,
  579. ROTR,
  580. FSHL,
  581. FSHR,
  582. /// Byte Swap and Counting operators.
  583. BSWAP,
  584. CTTZ,
  585. CTLZ,
  586. CTPOP,
  587. BITREVERSE,
  588. PARITY,
  589. /// Bit counting operators with an undefined result for zero inputs.
  590. CTTZ_ZERO_UNDEF,
  591. CTLZ_ZERO_UNDEF,
  592. /// Select(COND, TRUEVAL, FALSEVAL). If the type of the boolean COND is not
  593. /// i1 then the high bits must conform to getBooleanContents.
  594. SELECT,
  595. /// Select with a vector condition (op #0) and two vector operands (ops #1
  596. /// and #2), returning a vector result. All vectors have the same length.
  597. /// Much like the scalar select and setcc, each bit in the condition selects
  598. /// whether the corresponding result element is taken from op #1 or op #2.
  599. /// At first, the VSELECT condition is of vXi1 type. Later, targets may
  600. /// change the condition type in order to match the VSELECT node using a
  601. /// pattern. The condition follows the BooleanContent format of the target.
  602. VSELECT,
  603. /// Select with condition operator - This selects between a true value and
  604. /// a false value (ops #2 and #3) based on the boolean result of comparing
  605. /// the lhs and rhs (ops #0 and #1) of a conditional expression with the
  606. /// condition code in op #4, a CondCodeSDNode.
  607. SELECT_CC,
  608. /// SetCC operator - This evaluates to a true value iff the condition is
  609. /// true. If the result value type is not i1 then the high bits conform
  610. /// to getBooleanContents. The operands to this are the left and right
  611. /// operands to compare (ops #0, and #1) and the condition code to compare
  612. /// them with (op #2) as a CondCodeSDNode. If the operands are vector types
  613. /// then the result type must also be a vector type.
  614. SETCC,
  615. /// Like SetCC, ops #0 and #1 are the LHS and RHS operands to compare, but
  616. /// op #2 is a boolean indicating if there is an incoming carry. This
  617. /// operator checks the result of "LHS - RHS - Carry", and can be used to
  618. /// compare two wide integers:
  619. /// (setcccarry lhshi rhshi (subcarry lhslo rhslo) cc).
  620. /// Only valid for integers.
  621. SETCCCARRY,
  622. /// SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded
  623. /// integer shift operations. The operation ordering is:
  624. /// [Lo,Hi] = op [LoLHS,HiLHS], Amt
  625. SHL_PARTS,
  626. SRA_PARTS,
  627. SRL_PARTS,
  628. /// Conversion operators. These are all single input single output
  629. /// operations. For all of these, the result type must be strictly
  630. /// wider or narrower (depending on the operation) than the source
  631. /// type.
  632. /// SIGN_EXTEND - Used for integer types, replicating the sign bit
  633. /// into new bits.
  634. SIGN_EXTEND,
  635. /// ZERO_EXTEND - Used for integer types, zeroing the new bits.
  636. ZERO_EXTEND,
  637. /// ANY_EXTEND - Used for integer types. The high bits are undefined.
  638. ANY_EXTEND,
  639. /// TRUNCATE - Completely drop the high bits.
  640. TRUNCATE,
  641. /// [SU]INT_TO_FP - These operators convert integers (whose interpreted sign
  642. /// depends on the first letter) to floating point.
  643. SINT_TO_FP,
  644. UINT_TO_FP,
  645. /// SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to
  646. /// sign extend a small value in a large integer register (e.g. sign
  647. /// extending the low 8 bits of a 32-bit register to fill the top 24 bits
  648. /// with the 7th bit). The size of the smaller type is indicated by the 1th
  649. /// operand, a ValueType node.
  650. SIGN_EXTEND_INREG,
  651. /// ANY_EXTEND_VECTOR_INREG(Vector) - This operator represents an
  652. /// in-register any-extension of the low lanes of an integer vector. The
  653. /// result type must have fewer elements than the operand type, and those
  654. /// elements must be larger integer types such that the total size of the
  655. /// operand type is less than or equal to the size of the result type. Each
  656. /// of the low operand elements is any-extended into the corresponding,
  657. /// wider result elements with the high bits becoming undef.
  658. /// NOTE: The type legalizer prefers to make the operand and result size
  659. /// the same to allow expansion to shuffle vector during op legalization.
  660. ANY_EXTEND_VECTOR_INREG,
  661. /// SIGN_EXTEND_VECTOR_INREG(Vector) - This operator represents an
  662. /// in-register sign-extension of the low lanes of an integer vector. The
  663. /// result type must have fewer elements than the operand type, and those
  664. /// elements must be larger integer types such that the total size of the
  665. /// operand type is less than or equal to the size of the result type. Each
  666. /// of the low operand elements is sign-extended into the corresponding,
  667. /// wider result elements.
  668. /// NOTE: The type legalizer prefers to make the operand and result size
  669. /// the same to allow expansion to shuffle vector during op legalization.
  670. SIGN_EXTEND_VECTOR_INREG,
  671. /// ZERO_EXTEND_VECTOR_INREG(Vector) - This operator represents an
  672. /// in-register zero-extension of the low lanes of an integer vector. The
  673. /// result type must have fewer elements than the operand type, and those
  674. /// elements must be larger integer types such that the total size of the
  675. /// operand type is less than or equal to the size of the result type. Each
  676. /// of the low operand elements is zero-extended into the corresponding,
  677. /// wider result elements.
  678. /// NOTE: The type legalizer prefers to make the operand and result size
  679. /// the same to allow expansion to shuffle vector during op legalization.
  680. ZERO_EXTEND_VECTOR_INREG,
  681. /// FP_TO_[US]INT - Convert a floating point value to a signed or unsigned
  682. /// integer. These have the same semantics as fptosi and fptoui in IR. If
  683. /// the FP value cannot fit in the integer type, the results are undefined.
  684. FP_TO_SINT,
  685. FP_TO_UINT,
  686. /// FP_TO_[US]INT_SAT - Convert floating point value in operand 0 to a
  687. /// signed or unsigned scalar integer type given in operand 1 with the
  688. /// following semantics:
  689. ///
  690. /// * If the value is NaN, zero is returned.
  691. /// * If the value is larger/smaller than the largest/smallest integer,
  692. /// the largest/smallest integer is returned (saturation).
  693. /// * Otherwise the result of rounding the value towards zero is returned.
  694. ///
  695. /// The scalar width of the type given in operand 1 must be equal to, or
  696. /// smaller than, the scalar result type width. It may end up being smaller
  697. /// than the result width as a result of integer type legalization.
  698. ///
  699. /// After converting to the scalar integer type in operand 1, the value is
  700. /// extended to the result VT. FP_TO_SINT_SAT sign extends and FP_TO_UINT_SAT
  701. /// zero extends.
  702. FP_TO_SINT_SAT,
  703. FP_TO_UINT_SAT,
  704. /// X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating point type
  705. /// down to the precision of the destination VT. TRUNC is a flag, which is
  706. /// always an integer that is zero or one. If TRUNC is 0, this is a
  707. /// normal rounding, if it is 1, this FP_ROUND is known to not change the
  708. /// value of Y.
  709. ///
  710. /// The TRUNC = 1 case is used in cases where we know that the value will
  711. /// not be modified by the node, because Y is not using any of the extra
  712. /// precision of source type. This allows certain transformations like
  713. /// FP_EXTEND(FP_ROUND(X,1)) -> X which are not safe for
  714. /// FP_EXTEND(FP_ROUND(X,0)) because the extra bits aren't removed.
  715. FP_ROUND,
  716. /// Returns current rounding mode:
  717. /// -1 Undefined
  718. /// 0 Round to 0
  719. /// 1 Round to nearest, ties to even
  720. /// 2 Round to +inf
  721. /// 3 Round to -inf
  722. /// 4 Round to nearest, ties to zero
  723. /// Result is rounding mode and chain. Input is a chain.
  724. /// TODO: Rename this node to GET_ROUNDING.
  725. FLT_ROUNDS_,
  726. /// Set rounding mode.
  727. /// The first operand is a chain pointer. The second specifies the required
  728. /// rounding mode, encoded in the same way as used in '``FLT_ROUNDS_``'.
  729. SET_ROUNDING,
  730. /// X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type.
  731. FP_EXTEND,
  732. /// BITCAST - This operator converts between integer, vector and FP
  733. /// values, as if the value was stored to memory with one type and loaded
  734. /// from the same address with the other type (or equivalently for vector
  735. /// format conversions, etc). The source and result are required to have
  736. /// the same bit size (e.g. f32 <-> i32). This can also be used for
  737. /// int-to-int or fp-to-fp conversions, but that is a noop, deleted by
  738. /// getNode().
  739. ///
  740. /// This operator is subtly different from the bitcast instruction from
  741. /// LLVM-IR since this node may change the bits in the register. For
  742. /// example, this occurs on big-endian NEON and big-endian MSA where the
  743. /// layout of the bits in the register depends on the vector type and this
  744. /// operator acts as a shuffle operation for some vector type combinations.
  745. BITCAST,
  746. /// ADDRSPACECAST - This operator converts between pointers of different
  747. /// address spaces.
  748. ADDRSPACECAST,
  749. /// FP16_TO_FP, FP_TO_FP16 - These operators are used to perform promotions
  750. /// and truncation for half-precision (16 bit) floating numbers. These nodes
  751. /// form a semi-softened interface for dealing with f16 (as an i16), which
  752. /// is often a storage-only type but has native conversions.
  753. FP16_TO_FP,
  754. FP_TO_FP16,
  755. STRICT_FP16_TO_FP,
  756. STRICT_FP_TO_FP16,
  757. /// Perform various unary floating-point operations inspired by libm. For
  758. /// FPOWI, the result is undefined if if the integer operand doesn't fit into
  759. /// sizeof(int).
  760. FNEG,
  761. FABS,
  762. FSQRT,
  763. FCBRT,
  764. FSIN,
  765. FCOS,
  766. FPOWI,
  767. FPOW,
  768. FLOG,
  769. FLOG2,
  770. FLOG10,
  771. FEXP,
  772. FEXP2,
  773. FCEIL,
  774. FTRUNC,
  775. FRINT,
  776. FNEARBYINT,
  777. FROUND,
  778. FROUNDEVEN,
  779. FFLOOR,
  780. LROUND,
  781. LLROUND,
  782. LRINT,
  783. LLRINT,
  784. /// FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two
  785. /// values.
  786. //
  787. /// In the case where a single input is a NaN (either signaling or quiet),
  788. /// the non-NaN input is returned.
  789. ///
  790. /// The return value of (FMINNUM 0.0, -0.0) could be either 0.0 or -0.0.
  791. FMINNUM,
  792. FMAXNUM,
  793. /// FMINNUM_IEEE/FMAXNUM_IEEE - Perform floating-point minimum or maximum on
  794. /// two values, following the IEEE-754 2008 definition. This differs from
  795. /// FMINNUM/FMAXNUM in the handling of signaling NaNs. If one input is a
  796. /// signaling NaN, returns a quiet NaN.
  797. FMINNUM_IEEE,
  798. FMAXNUM_IEEE,
  799. /// FMINIMUM/FMAXIMUM - NaN-propagating minimum/maximum that also treat -0.0
  800. /// as less than 0.0. While FMINNUM_IEEE/FMAXNUM_IEEE follow IEEE 754-2008
  801. /// semantics, FMINIMUM/FMAXIMUM follow IEEE 754-2018 draft semantics.
  802. FMINIMUM,
  803. FMAXIMUM,
  804. /// FSINCOS - Compute both fsin and fcos as a single operation.
  805. FSINCOS,
  806. /// LOAD and STORE have token chains as their first operand, then the same
  807. /// operands as an LLVM load/store instruction, then an offset node that
  808. /// is added / subtracted from the base pointer to form the address (for
  809. /// indexed memory ops).
  810. LOAD,
  811. STORE,
  812. /// DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned
  813. /// to a specified boundary. This node always has two return values: a new
  814. /// stack pointer value and a chain. The first operand is the token chain,
  815. /// the second is the number of bytes to allocate, and the third is the
  816. /// alignment boundary. The size is guaranteed to be a multiple of the
  817. /// stack alignment, and the alignment is guaranteed to be bigger than the
  818. /// stack alignment (if required) or 0 to get standard stack alignment.
  819. DYNAMIC_STACKALLOC,
  820. /// Control flow instructions. These all have token chains.
  821. /// BR - Unconditional branch. The first operand is the chain
  822. /// operand, the second is the MBB to branch to.
  823. BR,
  824. /// BRIND - Indirect branch. The first operand is the chain, the second
  825. /// is the value to branch to, which must be of the same type as the
  826. /// target's pointer type.
  827. BRIND,
  828. /// BR_JT - Jumptable branch. The first operand is the chain, the second
  829. /// is the jumptable index, the last one is the jumptable entry index.
  830. BR_JT,
  831. /// BRCOND - Conditional branch. The first operand is the chain, the
  832. /// second is the condition, the third is the block to branch to if the
  833. /// condition is true. If the type of the condition is not i1, then the
  834. /// high bits must conform to getBooleanContents. If the condition is undef,
  835. /// it nondeterministically jumps to the block.
  836. /// TODO: Its semantics w.r.t undef requires further discussion; we need to
  837. /// make it sure that it is consistent with optimizations in MIR & the
  838. /// meaning of IMPLICIT_DEF. See https://reviews.llvm.org/D92015
  839. BRCOND,
  840. /// BR_CC - Conditional branch. The behavior is like that of SELECT_CC, in
  841. /// that the condition is represented as condition code, and two nodes to
  842. /// compare, rather than as a combined SetCC node. The operands in order
  843. /// are chain, cc, lhs, rhs, block to branch to if condition is true. If
  844. /// condition is undef, it nondeterministically jumps to the block.
  845. BR_CC,
  846. /// INLINEASM - Represents an inline asm block. This node always has two
  847. /// return values: a chain and a flag result. The inputs are as follows:
  848. /// Operand #0 : Input chain.
  849. /// Operand #1 : a ExternalSymbolSDNode with a pointer to the asm string.
  850. /// Operand #2 : a MDNodeSDNode with the !srcloc metadata.
  851. /// Operand #3 : HasSideEffect, IsAlignStack bits.
  852. /// After this, it is followed by a list of operands with this format:
  853. /// ConstantSDNode: Flags that encode whether it is a mem or not, the
  854. /// of operands that follow, etc. See InlineAsm.h.
  855. /// ... however many operands ...
  856. /// Operand #last: Optional, an incoming flag.
  857. ///
  858. /// The variable width operands are required to represent target addressing
  859. /// modes as a single "operand", even though they may have multiple
  860. /// SDOperands.
  861. INLINEASM,
  862. /// INLINEASM_BR - Branching version of inline asm. Used by asm-goto.
  863. INLINEASM_BR,
  864. /// EH_LABEL - Represents a label in mid basic block used to track
  865. /// locations needed for debug and exception handling tables. These nodes
  866. /// take a chain as input and return a chain.
  867. EH_LABEL,
  868. /// ANNOTATION_LABEL - Represents a mid basic block label used by
  869. /// annotations. This should remain within the basic block and be ordered
  870. /// with respect to other call instructions, but loads and stores may float
  871. /// past it.
  872. ANNOTATION_LABEL,
  873. /// CATCHRET - Represents a return from a catch block funclet. Used for
  874. /// MSVC compatible exception handling. Takes a chain operand and a
  875. /// destination basic block operand.
  876. CATCHRET,
  877. /// CLEANUPRET - Represents a return from a cleanup block funclet. Used for
  878. /// MSVC compatible exception handling. Takes only a chain operand.
  879. CLEANUPRET,
  880. /// STACKSAVE - STACKSAVE has one operand, an input chain. It produces a
  881. /// value, the same type as the pointer type for the system, and an output
  882. /// chain.
  883. STACKSAVE,
  884. /// STACKRESTORE has two operands, an input chain and a pointer to restore
  885. /// to it returns an output chain.
  886. STACKRESTORE,
  887. /// CALLSEQ_START/CALLSEQ_END - These operators mark the beginning and end
  888. /// of a call sequence, and carry arbitrary information that target might
  889. /// want to know. The first operand is a chain, the rest are specified by
  890. /// the target and not touched by the DAG optimizers.
  891. /// Targets that may use stack to pass call arguments define additional
  892. /// operands:
  893. /// - size of the call frame part that must be set up within the
  894. /// CALLSEQ_START..CALLSEQ_END pair,
  895. /// - part of the call frame prepared prior to CALLSEQ_START.
  896. /// Both these parameters must be constants, their sum is the total call
  897. /// frame size.
  898. /// CALLSEQ_START..CALLSEQ_END pairs may not be nested.
  899. CALLSEQ_START, // Beginning of a call sequence
  900. CALLSEQ_END, // End of a call sequence
  901. /// VAARG - VAARG has four operands: an input chain, a pointer, a SRCVALUE,
  902. /// and the alignment. It returns a pair of values: the vaarg value and a
  903. /// new chain.
  904. VAARG,
  905. /// VACOPY - VACOPY has 5 operands: an input chain, a destination pointer,
  906. /// a source pointer, a SRCVALUE for the destination, and a SRCVALUE for the
  907. /// source.
  908. VACOPY,
  909. /// VAEND, VASTART - VAEND and VASTART have three operands: an input chain,
  910. /// pointer, and a SRCVALUE.
  911. VAEND,
  912. VASTART,
  913. // PREALLOCATED_SETUP - This has 2 operands: an input chain and a SRCVALUE
  914. // with the preallocated call Value.
  915. PREALLOCATED_SETUP,
  916. // PREALLOCATED_ARG - This has 3 operands: an input chain, a SRCVALUE
  917. // with the preallocated call Value, and a constant int.
  918. PREALLOCATED_ARG,
  919. /// SRCVALUE - This is a node type that holds a Value* that is used to
  920. /// make reference to a value in the LLVM IR.
  921. SRCVALUE,
  922. /// MDNODE_SDNODE - This is a node that holdes an MDNode*, which is used to
  923. /// reference metadata in the IR.
  924. MDNODE_SDNODE,
  925. /// PCMARKER - This corresponds to the pcmarker intrinsic.
  926. PCMARKER,
  927. /// READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic.
  928. /// It produces a chain and one i64 value. The only operand is a chain.
  929. /// If i64 is not legal, the result will be expanded into smaller values.
  930. /// Still, it returns an i64, so targets should set legality for i64.
  931. /// The result is the content of the architecture-specific cycle
  932. /// counter-like register (or other high accuracy low latency clock source).
  933. READCYCLECOUNTER,
  934. /// HANDLENODE node - Used as a handle for various purposes.
  935. HANDLENODE,
  936. /// INIT_TRAMPOLINE - This corresponds to the init_trampoline intrinsic. It
  937. /// takes as input a token chain, the pointer to the trampoline, the pointer
  938. /// to the nested function, the pointer to pass for the 'nest' parameter, a
  939. /// SRCVALUE for the trampoline and another for the nested function
  940. /// (allowing targets to access the original Function*).
  941. /// It produces a token chain as output.
  942. INIT_TRAMPOLINE,
  943. /// ADJUST_TRAMPOLINE - This corresponds to the adjust_trampoline intrinsic.
  944. /// It takes a pointer to the trampoline and produces a (possibly) new
  945. /// pointer to the same trampoline with platform-specific adjustments
  946. /// applied. The pointer it returns points to an executable block of code.
  947. ADJUST_TRAMPOLINE,
  948. /// TRAP - Trapping instruction
  949. TRAP,
  950. /// DEBUGTRAP - Trap intended to get the attention of a debugger.
  951. DEBUGTRAP,
  952. /// UBSANTRAP - Trap with an immediate describing the kind of sanitizer
  953. /// failure.
  954. UBSANTRAP,
  955. /// PREFETCH - This corresponds to a prefetch intrinsic. The first operand
  956. /// is the chain. The other operands are the address to prefetch,
  957. /// read / write specifier, locality specifier and instruction / data cache
  958. /// specifier.
  959. PREFETCH,
  960. /// ARITH_FENCE - This corresponds to a arithmetic fence intrinsic. Both its
  961. /// operand and output are the same floating type.
  962. ARITH_FENCE,
  963. /// OUTCHAIN = ATOMIC_FENCE(INCHAIN, ordering, scope)
  964. /// This corresponds to the fence instruction. It takes an input chain, and
  965. /// two integer constants: an AtomicOrdering and a SynchronizationScope.
  966. ATOMIC_FENCE,
  967. /// Val, OUTCHAIN = ATOMIC_LOAD(INCHAIN, ptr)
  968. /// This corresponds to "load atomic" instruction.
  969. ATOMIC_LOAD,
  970. /// OUTCHAIN = ATOMIC_STORE(INCHAIN, ptr, val)
  971. /// This corresponds to "store atomic" instruction.
  972. ATOMIC_STORE,
  973. /// Val, OUTCHAIN = ATOMIC_CMP_SWAP(INCHAIN, ptr, cmp, swap)
  974. /// For double-word atomic operations:
  975. /// ValLo, ValHi, OUTCHAIN = ATOMIC_CMP_SWAP(INCHAIN, ptr, cmpLo, cmpHi,
  976. /// swapLo, swapHi)
  977. /// This corresponds to the cmpxchg instruction.
  978. ATOMIC_CMP_SWAP,
  979. /// Val, Success, OUTCHAIN
  980. /// = ATOMIC_CMP_SWAP_WITH_SUCCESS(INCHAIN, ptr, cmp, swap)
  981. /// N.b. this is still a strong cmpxchg operation, so
  982. /// Success == "Val == cmp".
  983. ATOMIC_CMP_SWAP_WITH_SUCCESS,
  984. /// Val, OUTCHAIN = ATOMIC_SWAP(INCHAIN, ptr, amt)
  985. /// Val, OUTCHAIN = ATOMIC_LOAD_[OpName](INCHAIN, ptr, amt)
  986. /// For double-word atomic operations:
  987. /// ValLo, ValHi, OUTCHAIN = ATOMIC_SWAP(INCHAIN, ptr, amtLo, amtHi)
  988. /// ValLo, ValHi, OUTCHAIN = ATOMIC_LOAD_[OpName](INCHAIN, ptr, amtLo, amtHi)
  989. /// These correspond to the atomicrmw instruction.
  990. ATOMIC_SWAP,
  991. ATOMIC_LOAD_ADD,
  992. ATOMIC_LOAD_SUB,
  993. ATOMIC_LOAD_AND,
  994. ATOMIC_LOAD_CLR,
  995. ATOMIC_LOAD_OR,
  996. ATOMIC_LOAD_XOR,
  997. ATOMIC_LOAD_NAND,
  998. ATOMIC_LOAD_MIN,
  999. ATOMIC_LOAD_MAX,
  1000. ATOMIC_LOAD_UMIN,
  1001. ATOMIC_LOAD_UMAX,
  1002. ATOMIC_LOAD_FADD,
  1003. ATOMIC_LOAD_FSUB,
  1004. // Masked load and store - consecutive vector load and store operations
  1005. // with additional mask operand that prevents memory accesses to the
  1006. // masked-off lanes.
  1007. //
  1008. // Val, OutChain = MLOAD(BasePtr, Mask, PassThru)
  1009. // OutChain = MSTORE(Value, BasePtr, Mask)
  1010. MLOAD,
  1011. MSTORE,
  1012. // Masked gather and scatter - load and store operations for a vector of
  1013. // random addresses with additional mask operand that prevents memory
  1014. // accesses to the masked-off lanes.
  1015. //
  1016. // Val, OutChain = GATHER(InChain, PassThru, Mask, BasePtr, Index, Scale)
  1017. // OutChain = SCATTER(InChain, Value, Mask, BasePtr, Index, Scale)
  1018. //
  1019. // The Index operand can have more vector elements than the other operands
  1020. // due to type legalization. The extra elements are ignored.
  1021. MGATHER,
  1022. MSCATTER,
  1023. /// This corresponds to the llvm.lifetime.* intrinsics. The first operand
  1024. /// is the chain and the second operand is the alloca pointer.
  1025. LIFETIME_START,
  1026. LIFETIME_END,
  1027. /// GC_TRANSITION_START/GC_TRANSITION_END - These operators mark the
  1028. /// beginning and end of GC transition sequence, and carry arbitrary
  1029. /// information that target might need for lowering. The first operand is
  1030. /// a chain, the rest are specified by the target and not touched by the DAG
  1031. /// optimizers. GC_TRANSITION_START..GC_TRANSITION_END pairs may not be
  1032. /// nested.
  1033. GC_TRANSITION_START,
  1034. GC_TRANSITION_END,
  1035. /// GET_DYNAMIC_AREA_OFFSET - get offset from native SP to the address of
  1036. /// the most recent dynamic alloca. For most targets that would be 0, but
  1037. /// for some others (e.g. PowerPC, PowerPC64) that would be compile-time
  1038. /// known nonzero constant. The only operand here is the chain.
  1039. GET_DYNAMIC_AREA_OFFSET,
  1040. /// Pseudo probe for AutoFDO, as a place holder in a basic block to improve
  1041. /// the sample counts quality.
  1042. PSEUDO_PROBE,
  1043. /// VSCALE(IMM) - Returns the runtime scaling factor used to calculate the
  1044. /// number of elements within a scalable vector. IMM is a constant integer
  1045. /// multiplier that is applied to the runtime value.
  1046. VSCALE,
  1047. /// Generic reduction nodes. These nodes represent horizontal vector
  1048. /// reduction operations, producing a scalar result.
  1049. /// The SEQ variants perform reductions in sequential order. The first
  1050. /// operand is an initial scalar accumulator value, and the second operand
  1051. /// is the vector to reduce.
  1052. /// E.g. RES = VECREDUCE_SEQ_FADD f32 ACC, <4 x f32> SRC_VEC
  1053. /// ... is equivalent to
  1054. /// RES = (((ACC + SRC_VEC[0]) + SRC_VEC[1]) + SRC_VEC[2]) + SRC_VEC[3]
  1055. VECREDUCE_SEQ_FADD,
  1056. VECREDUCE_SEQ_FMUL,
  1057. /// These reductions have relaxed evaluation order semantics, and have a
  1058. /// single vector operand. The order of evaluation is unspecified. For
  1059. /// pow-of-2 vectors, one valid legalizer expansion is to use a tree
  1060. /// reduction, i.e.:
  1061. /// For RES = VECREDUCE_FADD <8 x f16> SRC_VEC
  1062. /// PART_RDX = FADD SRC_VEC[0:3], SRC_VEC[4:7]
  1063. /// PART_RDX2 = FADD PART_RDX[0:1], PART_RDX[2:3]
  1064. /// RES = FADD PART_RDX2[0], PART_RDX2[1]
  1065. /// For non-pow-2 vectors, this can be computed by extracting each element
  1066. /// and performing the operation as if it were scalarized.
  1067. VECREDUCE_FADD,
  1068. VECREDUCE_FMUL,
  1069. /// FMIN/FMAX nodes can have flags, for NaN/NoNaN variants.
  1070. VECREDUCE_FMAX,
  1071. VECREDUCE_FMIN,
  1072. /// Integer reductions may have a result type larger than the vector element
  1073. /// type. However, the reduction is performed using the vector element type
  1074. /// and the value in the top bits is unspecified.
  1075. VECREDUCE_ADD,
  1076. VECREDUCE_MUL,
  1077. VECREDUCE_AND,
  1078. VECREDUCE_OR,
  1079. VECREDUCE_XOR,
  1080. VECREDUCE_SMAX,
  1081. VECREDUCE_SMIN,
  1082. VECREDUCE_UMAX,
  1083. VECREDUCE_UMIN,
  1084. // Vector Predication
  1085. #define BEGIN_REGISTER_VP_SDNODE(VPSDID, ...) VPSDID,
  1086. #include "llvm/IR/VPIntrinsics.def"
  1087. /// BUILTIN_OP_END - This must be the last enum value in this list.
  1088. /// The target-specific pre-isel opcode values start here.
  1089. BUILTIN_OP_END
  1090. };
  1091. /// FIRST_TARGET_STRICTFP_OPCODE - Target-specific pre-isel operations
  1092. /// which cannot raise FP exceptions should be less than this value.
  1093. /// Those that do must not be less than this value.
  1094. static const int FIRST_TARGET_STRICTFP_OPCODE = BUILTIN_OP_END + 400;
  1095. /// FIRST_TARGET_MEMORY_OPCODE - Target-specific pre-isel operations
  1096. /// which do not reference a specific memory location should be less than
  1097. /// this value. Those that do must not be less than this value, and can
  1098. /// be used with SelectionDAG::getMemIntrinsicNode.
  1099. static const int FIRST_TARGET_MEMORY_OPCODE = BUILTIN_OP_END + 500;
  1100. /// Whether this is bitwise logic opcode.
  1101. inline bool isBitwiseLogicOp(unsigned Opcode) {
  1102. return Opcode == ISD::AND || Opcode == ISD::OR || Opcode == ISD::XOR;
  1103. }
  1104. /// Get underlying scalar opcode for VECREDUCE opcode.
  1105. /// For example ISD::AND for ISD::VECREDUCE_AND.
  1106. NodeType getVecReduceBaseOpcode(unsigned VecReduceOpcode);
  1107. /// Whether this is a vector-predicated Opcode.
  1108. bool isVPOpcode(unsigned Opcode);
  1109. /// Whether this is a vector-predicated binary operation opcode.
  1110. bool isVPBinaryOp(unsigned Opcode);
  1111. /// Whether this is a vector-predicated reduction opcode.
  1112. bool isVPReduction(unsigned Opcode);
  1113. /// The operand position of the vector mask.
  1114. Optional<unsigned> getVPMaskIdx(unsigned Opcode);
  1115. /// The operand position of the explicit vector length parameter.
  1116. Optional<unsigned> getVPExplicitVectorLengthIdx(unsigned Opcode);
  1117. //===--------------------------------------------------------------------===//
  1118. /// MemIndexedMode enum - This enum defines the load / store indexed
  1119. /// addressing modes.
  1120. ///
  1121. /// UNINDEXED "Normal" load / store. The effective address is already
  1122. /// computed and is available in the base pointer. The offset
  1123. /// operand is always undefined. In addition to producing a
  1124. /// chain, an unindexed load produces one value (result of the
  1125. /// load); an unindexed store does not produce a value.
  1126. ///
  1127. /// PRE_INC Similar to the unindexed mode where the effective address is
  1128. /// PRE_DEC the value of the base pointer add / subtract the offset.
  1129. /// It considers the computation as being folded into the load /
  1130. /// store operation (i.e. the load / store does the address
  1131. /// computation as well as performing the memory transaction).
  1132. /// The base operand is always undefined. In addition to
  1133. /// producing a chain, pre-indexed load produces two values
  1134. /// (result of the load and the result of the address
  1135. /// computation); a pre-indexed store produces one value (result
  1136. /// of the address computation).
  1137. ///
  1138. /// POST_INC The effective address is the value of the base pointer. The
  1139. /// POST_DEC value of the offset operand is then added to / subtracted
  1140. /// from the base after memory transaction. In addition to
  1141. /// producing a chain, post-indexed load produces two values
  1142. /// (the result of the load and the result of the base +/- offset
  1143. /// computation); a post-indexed store produces one value (the
  1144. /// the result of the base +/- offset computation).
  1145. enum MemIndexedMode { UNINDEXED = 0, PRE_INC, PRE_DEC, POST_INC, POST_DEC };
  1146. static const int LAST_INDEXED_MODE = POST_DEC + 1;
  1147. //===--------------------------------------------------------------------===//
  1148. /// MemIndexType enum - This enum defines how to interpret MGATHER/SCATTER's
  1149. /// index parameter when calculating addresses.
  1150. ///
  1151. /// SIGNED_SCALED Addr = Base + ((signed)Index * sizeof(element))
  1152. /// SIGNED_UNSCALED Addr = Base + (signed)Index
  1153. /// UNSIGNED_SCALED Addr = Base + ((unsigned)Index * sizeof(element))
  1154. /// UNSIGNED_UNSCALED Addr = Base + (unsigned)Index
  1155. enum MemIndexType {
  1156. SIGNED_SCALED = 0,
  1157. SIGNED_UNSCALED,
  1158. UNSIGNED_SCALED,
  1159. UNSIGNED_UNSCALED
  1160. };
  1161. static const int LAST_MEM_INDEX_TYPE = UNSIGNED_UNSCALED + 1;
  1162. //===--------------------------------------------------------------------===//
  1163. /// LoadExtType enum - This enum defines the three variants of LOADEXT
  1164. /// (load with extension).
  1165. ///
  1166. /// SEXTLOAD loads the integer operand and sign extends it to a larger
  1167. /// integer result type.
  1168. /// ZEXTLOAD loads the integer operand and zero extends it to a larger
  1169. /// integer result type.
  1170. /// EXTLOAD is used for two things: floating point extending loads and
  1171. /// integer extending loads [the top bits are undefined].
  1172. enum LoadExtType { NON_EXTLOAD = 0, EXTLOAD, SEXTLOAD, ZEXTLOAD };
  1173. static const int LAST_LOADEXT_TYPE = ZEXTLOAD + 1;
  1174. NodeType getExtForLoadExtType(bool IsFP, LoadExtType);
  1175. //===--------------------------------------------------------------------===//
  1176. /// ISD::CondCode enum - These are ordered carefully to make the bitfields
  1177. /// below work out, when considering SETFALSE (something that never exists
  1178. /// dynamically) as 0. "U" -> Unsigned (for integer operands) or Unordered
  1179. /// (for floating point), "L" -> Less than, "G" -> Greater than, "E" -> Equal
  1180. /// to. If the "N" column is 1, the result of the comparison is undefined if
  1181. /// the input is a NAN.
  1182. ///
  1183. /// All of these (except for the 'always folded ops') should be handled for
  1184. /// floating point. For integer, only the SETEQ,SETNE,SETLT,SETLE,SETGT,
  1185. /// SETGE,SETULT,SETULE,SETUGT, and SETUGE opcodes are used.
  1186. ///
  1187. /// Note that these are laid out in a specific order to allow bit-twiddling
  1188. /// to transform conditions.
  1189. enum CondCode {
  1190. // Opcode N U L G E Intuitive operation
  1191. SETFALSE, // 0 0 0 0 Always false (always folded)
  1192. SETOEQ, // 0 0 0 1 True if ordered and equal
  1193. SETOGT, // 0 0 1 0 True if ordered and greater than
  1194. SETOGE, // 0 0 1 1 True if ordered and greater than or equal
  1195. SETOLT, // 0 1 0 0 True if ordered and less than
  1196. SETOLE, // 0 1 0 1 True if ordered and less than or equal
  1197. SETONE, // 0 1 1 0 True if ordered and operands are unequal
  1198. SETO, // 0 1 1 1 True if ordered (no nans)
  1199. SETUO, // 1 0 0 0 True if unordered: isnan(X) | isnan(Y)
  1200. SETUEQ, // 1 0 0 1 True if unordered or equal
  1201. SETUGT, // 1 0 1 0 True if unordered or greater than
  1202. SETUGE, // 1 0 1 1 True if unordered, greater than, or equal
  1203. SETULT, // 1 1 0 0 True if unordered or less than
  1204. SETULE, // 1 1 0 1 True if unordered, less than, or equal
  1205. SETUNE, // 1 1 1 0 True if unordered or not equal
  1206. SETTRUE, // 1 1 1 1 Always true (always folded)
  1207. // Don't care operations: undefined if the input is a nan.
  1208. SETFALSE2, // 1 X 0 0 0 Always false (always folded)
  1209. SETEQ, // 1 X 0 0 1 True if equal
  1210. SETGT, // 1 X 0 1 0 True if greater than
  1211. SETGE, // 1 X 0 1 1 True if greater than or equal
  1212. SETLT, // 1 X 1 0 0 True if less than
  1213. SETLE, // 1 X 1 0 1 True if less than or equal
  1214. SETNE, // 1 X 1 1 0 True if not equal
  1215. SETTRUE2, // 1 X 1 1 1 Always true (always folded)
  1216. SETCC_INVALID // Marker value.
  1217. };
  1218. /// Return true if this is a setcc instruction that performs a signed
  1219. /// comparison when used with integer operands.
  1220. inline bool isSignedIntSetCC(CondCode Code) {
  1221. return Code == SETGT || Code == SETGE || Code == SETLT || Code == SETLE;
  1222. }
  1223. /// Return true if this is a setcc instruction that performs an unsigned
  1224. /// comparison when used with integer operands.
  1225. inline bool isUnsignedIntSetCC(CondCode Code) {
  1226. return Code == SETUGT || Code == SETUGE || Code == SETULT || Code == SETULE;
  1227. }
  1228. /// Return true if this is a setcc instruction that performs an equality
  1229. /// comparison when used with integer operands.
  1230. inline bool isIntEqualitySetCC(CondCode Code) {
  1231. return Code == SETEQ || Code == SETNE;
  1232. }
  1233. /// Return true if the specified condition returns true if the two operands to
  1234. /// the condition are equal. Note that if one of the two operands is a NaN,
  1235. /// this value is meaningless.
  1236. inline bool isTrueWhenEqual(CondCode Cond) { return ((int)Cond & 1) != 0; }
  1237. /// This function returns 0 if the condition is always false if an operand is
  1238. /// a NaN, 1 if the condition is always true if the operand is a NaN, and 2 if
  1239. /// the condition is undefined if the operand is a NaN.
  1240. inline unsigned getUnorderedFlavor(CondCode Cond) {
  1241. return ((int)Cond >> 3) & 3;
  1242. }
  1243. /// Return the operation corresponding to !(X op Y), where 'op' is a valid
  1244. /// SetCC operation.
  1245. CondCode getSetCCInverse(CondCode Operation, EVT Type);
  1246. namespace GlobalISel {
  1247. /// Return the operation corresponding to !(X op Y), where 'op' is a valid
  1248. /// SetCC operation. The U bit of the condition code has different meanings
  1249. /// between floating point and integer comparisons and LLT's don't provide
  1250. /// this distinction. As such we need to be told whether the comparison is
  1251. /// floating point or integer-like. Pointers should use integer-like
  1252. /// comparisons.
  1253. CondCode getSetCCInverse(CondCode Operation, bool isIntegerLike);
  1254. } // end namespace GlobalISel
  1255. /// Return the operation corresponding to (Y op X) when given the operation
  1256. /// for (X op Y).
  1257. CondCode getSetCCSwappedOperands(CondCode Operation);
  1258. /// Return the result of a logical OR between different comparisons of
  1259. /// identical values: ((X op1 Y) | (X op2 Y)). This function returns
  1260. /// SETCC_INVALID if it is not possible to represent the resultant comparison.
  1261. CondCode getSetCCOrOperation(CondCode Op1, CondCode Op2, EVT Type);
  1262. /// Return the result of a logical AND between different comparisons of
  1263. /// identical values: ((X op1 Y) & (X op2 Y)). This function returns
  1264. /// SETCC_INVALID if it is not possible to represent the resultant comparison.
  1265. CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, EVT Type);
  1266. } // namespace ISD
  1267. } // namespace llvm
  1268. #endif
  1269. #ifdef __GNUC__
  1270. #pragma GCC diagnostic pop
  1271. #endif