ARMISelLowering.h 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001
  1. //===- ARMISelLowering.h - ARM DAG Lowering Interface -----------*- C++ -*-===//
  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 the interfaces that ARM uses to lower LLVM code into a
  10. // selection DAG.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H
  14. #define LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H
  15. #include "MCTargetDesc/ARMBaseInfo.h"
  16. #include "llvm/ADT/SmallVector.h"
  17. #include "llvm/ADT/StringRef.h"
  18. #include "llvm/CodeGen/CallingConvLower.h"
  19. #include "llvm/CodeGen/ISDOpcodes.h"
  20. #include "llvm/CodeGen/MachineFunction.h"
  21. #include "llvm/CodeGen/SelectionDAGNodes.h"
  22. #include "llvm/CodeGen/TargetLowering.h"
  23. #include "llvm/CodeGen/ValueTypes.h"
  24. #include "llvm/IR/Attributes.h"
  25. #include "llvm/IR/CallingConv.h"
  26. #include "llvm/IR/Function.h"
  27. #include "llvm/IR/IRBuilder.h"
  28. #include "llvm/IR/InlineAsm.h"
  29. #include "llvm/Support/CodeGen.h"
  30. #include "llvm/Support/MachineValueType.h"
  31. #include <optional>
  32. #include <utility>
  33. namespace llvm {
  34. class ARMSubtarget;
  35. class DataLayout;
  36. class FastISel;
  37. class FunctionLoweringInfo;
  38. class GlobalValue;
  39. class InstrItineraryData;
  40. class Instruction;
  41. class MachineBasicBlock;
  42. class MachineInstr;
  43. class SelectionDAG;
  44. class TargetLibraryInfo;
  45. class TargetMachine;
  46. class TargetRegisterInfo;
  47. class VectorType;
  48. namespace ARMISD {
  49. // ARM Specific DAG Nodes
  50. enum NodeType : unsigned {
  51. // Start the numbering where the builtin ops and target ops leave off.
  52. FIRST_NUMBER = ISD::BUILTIN_OP_END,
  53. Wrapper, // Wrapper - A wrapper node for TargetConstantPool,
  54. // TargetExternalSymbol, and TargetGlobalAddress.
  55. WrapperPIC, // WrapperPIC - A wrapper node for TargetGlobalAddress in
  56. // PIC mode.
  57. WrapperJT, // WrapperJT - A wrapper node for TargetJumpTable
  58. // Add pseudo op to model memcpy for struct byval.
  59. COPY_STRUCT_BYVAL,
  60. CALL, // Function call.
  61. CALL_PRED, // Function call that's predicable.
  62. CALL_NOLINK, // Function call with branch not branch-and-link.
  63. tSECALL, // CMSE non-secure function call.
  64. t2CALL_BTI, // Thumb function call followed by BTI instruction.
  65. BRCOND, // Conditional branch.
  66. BR_JT, // Jumptable branch.
  67. BR2_JT, // Jumptable branch (2 level - jumptable entry is a jump).
  68. RET_FLAG, // Return with a flag operand.
  69. SERET_FLAG, // CMSE Entry function return with a flag operand.
  70. INTRET_FLAG, // Interrupt return with an LR-offset and a flag operand.
  71. PIC_ADD, // Add with a PC operand and a PIC label.
  72. ASRL, // MVE long arithmetic shift right.
  73. LSRL, // MVE long shift right.
  74. LSLL, // MVE long shift left.
  75. CMP, // ARM compare instructions.
  76. CMN, // ARM CMN instructions.
  77. CMPZ, // ARM compare that sets only Z flag.
  78. CMPFP, // ARM VFP compare instruction, sets FPSCR.
  79. CMPFPE, // ARM VFP signalling compare instruction, sets FPSCR.
  80. CMPFPw0, // ARM VFP compare against zero instruction, sets FPSCR.
  81. CMPFPEw0, // ARM VFP signalling compare against zero instruction, sets
  82. // FPSCR.
  83. FMSTAT, // ARM fmstat instruction.
  84. CMOV, // ARM conditional move instructions.
  85. SUBS, // Flag-setting subtraction.
  86. SSAT, // Signed saturation
  87. USAT, // Unsigned saturation
  88. BCC_i64,
  89. SRL_FLAG, // V,Flag = srl_flag X -> srl X, 1 + save carry out.
  90. SRA_FLAG, // V,Flag = sra_flag X -> sra X, 1 + save carry out.
  91. RRX, // V = RRX X, Flag -> srl X, 1 + shift in carry flag.
  92. ADDC, // Add with carry
  93. ADDE, // Add using carry
  94. SUBC, // Sub with carry
  95. SUBE, // Sub using carry
  96. LSLS, // Shift left producing carry
  97. VMOVRRD, // double to two gprs.
  98. VMOVDRR, // Two gprs to double.
  99. VMOVSR, // move gpr to single, used for f32 literal constructed in a gpr
  100. EH_SJLJ_SETJMP, // SjLj exception handling setjmp.
  101. EH_SJLJ_LONGJMP, // SjLj exception handling longjmp.
  102. EH_SJLJ_SETUP_DISPATCH, // SjLj exception handling setup_dispatch.
  103. TC_RETURN, // Tail call return pseudo.
  104. THREAD_POINTER,
  105. DYN_ALLOC, // Dynamic allocation on the stack.
  106. MEMBARRIER_MCR, // Memory barrier (MCR)
  107. PRELOAD, // Preload
  108. WIN__CHKSTK, // Windows' __chkstk call to do stack probing.
  109. WIN__DBZCHK, // Windows' divide by zero check
  110. WLS, // Low-overhead loops, While Loop Start branch. See t2WhileLoopStart
  111. WLSSETUP, // Setup for the iteration count of a WLS. See t2WhileLoopSetup.
  112. LOOP_DEC, // Really a part of LE, performs the sub
  113. LE, // Low-overhead loops, Loop End
  114. PREDICATE_CAST, // Predicate cast for MVE i1 types
  115. VECTOR_REG_CAST, // Reinterpret the current contents of a vector register
  116. MVESEXT, // Legalization aids for extending a vector into two/four vectors.
  117. MVEZEXT, // or truncating two/four vectors into one. Eventually becomes
  118. MVETRUNC, // stack store/load sequence, if not optimized to anything else.
  119. VCMP, // Vector compare.
  120. VCMPZ, // Vector compare to zero.
  121. VTST, // Vector test bits.
  122. // Vector shift by vector
  123. VSHLs, // ...left/right by signed
  124. VSHLu, // ...left/right by unsigned
  125. // Vector shift by immediate:
  126. VSHLIMM, // ...left
  127. VSHRsIMM, // ...right (signed)
  128. VSHRuIMM, // ...right (unsigned)
  129. // Vector rounding shift by immediate:
  130. VRSHRsIMM, // ...right (signed)
  131. VRSHRuIMM, // ...right (unsigned)
  132. VRSHRNIMM, // ...right narrow
  133. // Vector saturating shift by immediate:
  134. VQSHLsIMM, // ...left (signed)
  135. VQSHLuIMM, // ...left (unsigned)
  136. VQSHLsuIMM, // ...left (signed to unsigned)
  137. VQSHRNsIMM, // ...right narrow (signed)
  138. VQSHRNuIMM, // ...right narrow (unsigned)
  139. VQSHRNsuIMM, // ...right narrow (signed to unsigned)
  140. // Vector saturating rounding shift by immediate:
  141. VQRSHRNsIMM, // ...right narrow (signed)
  142. VQRSHRNuIMM, // ...right narrow (unsigned)
  143. VQRSHRNsuIMM, // ...right narrow (signed to unsigned)
  144. // Vector shift and insert:
  145. VSLIIMM, // ...left
  146. VSRIIMM, // ...right
  147. // Vector get lane (VMOV scalar to ARM core register)
  148. // (These are used for 8- and 16-bit element types only.)
  149. VGETLANEu, // zero-extend vector extract element
  150. VGETLANEs, // sign-extend vector extract element
  151. // Vector move immediate and move negated immediate:
  152. VMOVIMM,
  153. VMVNIMM,
  154. // Vector move f32 immediate:
  155. VMOVFPIMM,
  156. // Move H <-> R, clearing top 16 bits
  157. VMOVrh,
  158. VMOVhr,
  159. // Vector duplicate:
  160. VDUP,
  161. VDUPLANE,
  162. // Vector shuffles:
  163. VEXT, // extract
  164. VREV64, // reverse elements within 64-bit doublewords
  165. VREV32, // reverse elements within 32-bit words
  166. VREV16, // reverse elements within 16-bit halfwords
  167. VZIP, // zip (interleave)
  168. VUZP, // unzip (deinterleave)
  169. VTRN, // transpose
  170. VTBL1, // 1-register shuffle with mask
  171. VTBL2, // 2-register shuffle with mask
  172. VMOVN, // MVE vmovn
  173. // MVE Saturating truncates
  174. VQMOVNs, // Vector (V) Saturating (Q) Move and Narrow (N), signed (s)
  175. VQMOVNu, // Vector (V) Saturating (Q) Move and Narrow (N), unsigned (u)
  176. // MVE float <> half converts
  177. VCVTN, // MVE vcvt f32 -> f16, truncating into either the bottom or top
  178. // lanes
  179. VCVTL, // MVE vcvt f16 -> f32, extending from either the bottom or top lanes
  180. // MVE VIDUP instruction, taking a start value and increment.
  181. VIDUP,
  182. // Vector multiply long:
  183. VMULLs, // ...signed
  184. VMULLu, // ...unsigned
  185. VQDMULH, // MVE vqdmulh instruction
  186. // MVE reductions
  187. VADDVs, // sign- or zero-extend the elements of a vector to i32,
  188. VADDVu, // add them all together, and return an i32 of their sum
  189. VADDVps, // Same as VADDV[su] but with a v4i1 predicate mask
  190. VADDVpu,
  191. VADDLVs, // sign- or zero-extend elements to i64 and sum, returning
  192. VADDLVu, // the low and high 32-bit halves of the sum
  193. VADDLVAs, // Same as VADDLV[su] but also add an input accumulator
  194. VADDLVAu, // provided as low and high halves
  195. VADDLVps, // Same as VADDLV[su] but with a v4i1 predicate mask
  196. VADDLVpu,
  197. VADDLVAps, // Same as VADDLVp[su] but with a v4i1 predicate mask
  198. VADDLVApu,
  199. VMLAVs, // sign- or zero-extend the elements of two vectors to i32, multiply
  200. // them
  201. VMLAVu, // and add the results together, returning an i32 of their sum
  202. VMLAVps, // Same as VMLAV[su] with a v4i1 predicate mask
  203. VMLAVpu,
  204. VMLALVs, // Same as VMLAV but with i64, returning the low and
  205. VMLALVu, // high 32-bit halves of the sum
  206. VMLALVps, // Same as VMLALV[su] with a v4i1 predicate mask
  207. VMLALVpu,
  208. VMLALVAs, // Same as VMLALV but also add an input accumulator
  209. VMLALVAu, // provided as low and high halves
  210. VMLALVAps, // Same as VMLALVA[su] with a v4i1 predicate mask
  211. VMLALVApu,
  212. VMINVu, // Find minimum unsigned value of a vector and register
  213. VMINVs, // Find minimum signed value of a vector and register
  214. VMAXVu, // Find maximum unsigned value of a vector and register
  215. VMAXVs, // Find maximum signed value of a vector and register
  216. SMULWB, // Signed multiply word by half word, bottom
  217. SMULWT, // Signed multiply word by half word, top
  218. UMLAL, // 64bit Unsigned Accumulate Multiply
  219. SMLAL, // 64bit Signed Accumulate Multiply
  220. UMAAL, // 64-bit Unsigned Accumulate Accumulate Multiply
  221. SMLALBB, // 64-bit signed accumulate multiply bottom, bottom 16
  222. SMLALBT, // 64-bit signed accumulate multiply bottom, top 16
  223. SMLALTB, // 64-bit signed accumulate multiply top, bottom 16
  224. SMLALTT, // 64-bit signed accumulate multiply top, top 16
  225. SMLALD, // Signed multiply accumulate long dual
  226. SMLALDX, // Signed multiply accumulate long dual exchange
  227. SMLSLD, // Signed multiply subtract long dual
  228. SMLSLDX, // Signed multiply subtract long dual exchange
  229. SMMLAR, // Signed multiply long, round and add
  230. SMMLSR, // Signed multiply long, subtract and round
  231. // Single Lane QADD8 and QADD16. Only the bottom lane. That's what the b
  232. // stands for.
  233. QADD8b,
  234. QSUB8b,
  235. QADD16b,
  236. QSUB16b,
  237. UQADD8b,
  238. UQSUB8b,
  239. UQADD16b,
  240. UQSUB16b,
  241. // Operands of the standard BUILD_VECTOR node are not legalized, which
  242. // is fine if BUILD_VECTORs are always lowered to shuffles or other
  243. // operations, but for ARM some BUILD_VECTORs are legal as-is and their
  244. // operands need to be legalized. Define an ARM-specific version of
  245. // BUILD_VECTOR for this purpose.
  246. BUILD_VECTOR,
  247. // Bit-field insert
  248. BFI,
  249. // Vector OR with immediate
  250. VORRIMM,
  251. // Vector AND with NOT of immediate
  252. VBICIMM,
  253. // Pseudo vector bitwise select
  254. VBSP,
  255. // Pseudo-instruction representing a memory copy using ldm/stm
  256. // instructions.
  257. MEMCPY,
  258. // Pseudo-instruction representing a memory copy using a tail predicated
  259. // loop
  260. MEMCPYLOOP,
  261. // Pseudo-instruction representing a memset using a tail predicated
  262. // loop
  263. MEMSETLOOP,
  264. // V8.1MMainline condition select
  265. CSINV, // Conditional select invert.
  266. CSNEG, // Conditional select negate.
  267. CSINC, // Conditional select increment.
  268. // Vector load N-element structure to all lanes:
  269. VLD1DUP = ISD::FIRST_TARGET_MEMORY_OPCODE,
  270. VLD2DUP,
  271. VLD3DUP,
  272. VLD4DUP,
  273. // NEON loads with post-increment base updates:
  274. VLD1_UPD,
  275. VLD2_UPD,
  276. VLD3_UPD,
  277. VLD4_UPD,
  278. VLD2LN_UPD,
  279. VLD3LN_UPD,
  280. VLD4LN_UPD,
  281. VLD1DUP_UPD,
  282. VLD2DUP_UPD,
  283. VLD3DUP_UPD,
  284. VLD4DUP_UPD,
  285. VLD1x2_UPD,
  286. VLD1x3_UPD,
  287. VLD1x4_UPD,
  288. // NEON stores with post-increment base updates:
  289. VST1_UPD,
  290. VST2_UPD,
  291. VST3_UPD,
  292. VST4_UPD,
  293. VST2LN_UPD,
  294. VST3LN_UPD,
  295. VST4LN_UPD,
  296. VST1x2_UPD,
  297. VST1x3_UPD,
  298. VST1x4_UPD,
  299. // Load/Store of dual registers
  300. LDRD,
  301. STRD
  302. };
  303. } // end namespace ARMISD
  304. namespace ARM {
  305. /// Possible values of current rounding mode, which is specified in bits
  306. /// 23:22 of FPSCR.
  307. enum Rounding {
  308. RN = 0, // Round to Nearest
  309. RP = 1, // Round towards Plus infinity
  310. RM = 2, // Round towards Minus infinity
  311. RZ = 3, // Round towards Zero
  312. rmMask = 3 // Bit mask selecting rounding mode
  313. };
  314. // Bit position of rounding mode bits in FPSCR.
  315. const unsigned RoundingBitsPos = 22;
  316. } // namespace ARM
  317. /// Define some predicates that are used for node matching.
  318. namespace ARM {
  319. bool isBitFieldInvertedMask(unsigned v);
  320. } // end namespace ARM
  321. //===--------------------------------------------------------------------===//
  322. // ARMTargetLowering - ARM Implementation of the TargetLowering interface
  323. class ARMTargetLowering : public TargetLowering {
  324. public:
  325. explicit ARMTargetLowering(const TargetMachine &TM,
  326. const ARMSubtarget &STI);
  327. unsigned getJumpTableEncoding() const override;
  328. bool useSoftFloat() const override;
  329. SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
  330. /// ReplaceNodeResults - Replace the results of node with an illegal result
  331. /// type with new values built out of custom code.
  332. void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue>&Results,
  333. SelectionDAG &DAG) const override;
  334. const char *getTargetNodeName(unsigned Opcode) const override;
  335. bool isSelectSupported(SelectSupportKind Kind) const override {
  336. // ARM does not support scalar condition selects on vectors.
  337. return (Kind != ScalarCondVectorVal);
  338. }
  339. bool isReadOnly(const GlobalValue *GV) const;
  340. /// getSetCCResultType - Return the value type to use for ISD::SETCC.
  341. EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context,
  342. EVT VT) const override;
  343. MachineBasicBlock *
  344. EmitInstrWithCustomInserter(MachineInstr &MI,
  345. MachineBasicBlock *MBB) const override;
  346. void AdjustInstrPostInstrSelection(MachineInstr &MI,
  347. SDNode *Node) const override;
  348. SDValue PerformCMOVCombine(SDNode *N, SelectionDAG &DAG) const;
  349. SDValue PerformBRCONDCombine(SDNode *N, SelectionDAG &DAG) const;
  350. SDValue PerformCMOVToBFICombine(SDNode *N, SelectionDAG &DAG) const;
  351. SDValue PerformIntrinsicCombine(SDNode *N, DAGCombinerInfo &DCI) const;
  352. SDValue PerformMVEExtCombine(SDNode *N, DAGCombinerInfo &DCI) const;
  353. SDValue PerformMVETruncCombine(SDNode *N, DAGCombinerInfo &DCI) const;
  354. SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;
  355. bool SimplifyDemandedBitsForTargetNode(SDValue Op,
  356. const APInt &OriginalDemandedBits,
  357. const APInt &OriginalDemandedElts,
  358. KnownBits &Known,
  359. TargetLoweringOpt &TLO,
  360. unsigned Depth) const override;
  361. bool isDesirableToTransformToIntegerOp(unsigned Opc, EVT VT) const override;
  362. /// allowsMisalignedMemoryAccesses - Returns true if the target allows
  363. /// unaligned memory accesses of the specified type. Returns whether it
  364. /// is "fast" by reference in the second argument.
  365. bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
  366. Align Alignment,
  367. MachineMemOperand::Flags Flags,
  368. unsigned *Fast) const override;
  369. EVT getOptimalMemOpType(const MemOp &Op,
  370. const AttributeList &FuncAttributes) const override;
  371. bool isTruncateFree(Type *SrcTy, Type *DstTy) const override;
  372. bool isTruncateFree(EVT SrcVT, EVT DstVT) const override;
  373. bool isZExtFree(SDValue Val, EVT VT2) const override;
  374. bool shouldSinkOperands(Instruction *I,
  375. SmallVectorImpl<Use *> &Ops) const override;
  376. Type* shouldConvertSplatType(ShuffleVectorInst* SVI) const override;
  377. bool isFNegFree(EVT VT) const override;
  378. bool isVectorLoadExtDesirable(SDValue ExtVal) const override;
  379. bool allowTruncateForTailCall(Type *Ty1, Type *Ty2) const override;
  380. /// isLegalAddressingMode - Return true if the addressing mode represented
  381. /// by AM is legal for this target, for a load/store of the specified type.
  382. bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM,
  383. Type *Ty, unsigned AS,
  384. Instruction *I = nullptr) const override;
  385. bool isLegalT2ScaledAddressingMode(const AddrMode &AM, EVT VT) const;
  386. /// Returns true if the addressing mode representing by AM is legal
  387. /// for the Thumb1 target, for a load/store of the specified type.
  388. bool isLegalT1ScaledAddressingMode(const AddrMode &AM, EVT VT) const;
  389. /// isLegalICmpImmediate - Return true if the specified immediate is legal
  390. /// icmp immediate, that is the target has icmp instructions which can
  391. /// compare a register against the immediate without having to materialize
  392. /// the immediate into a register.
  393. bool isLegalICmpImmediate(int64_t Imm) const override;
  394. /// isLegalAddImmediate - Return true if the specified immediate is legal
  395. /// add immediate, that is the target has add instructions which can
  396. /// add a register and the immediate without having to materialize
  397. /// the immediate into a register.
  398. bool isLegalAddImmediate(int64_t Imm) const override;
  399. /// getPreIndexedAddressParts - returns true by value, base pointer and
  400. /// offset pointer and addressing mode by reference if the node's address
  401. /// can be legally represented as pre-indexed load / store address.
  402. bool getPreIndexedAddressParts(SDNode *N, SDValue &Base, SDValue &Offset,
  403. ISD::MemIndexedMode &AM,
  404. SelectionDAG &DAG) const override;
  405. /// getPostIndexedAddressParts - returns true by value, base pointer and
  406. /// offset pointer and addressing mode by reference if this node can be
  407. /// combined with a load / store to form a post-indexed load / store.
  408. bool getPostIndexedAddressParts(SDNode *N, SDNode *Op, SDValue &Base,
  409. SDValue &Offset, ISD::MemIndexedMode &AM,
  410. SelectionDAG &DAG) const override;
  411. void computeKnownBitsForTargetNode(const SDValue Op, KnownBits &Known,
  412. const APInt &DemandedElts,
  413. const SelectionDAG &DAG,
  414. unsigned Depth) const override;
  415. bool targetShrinkDemandedConstant(SDValue Op, const APInt &DemandedBits,
  416. const APInt &DemandedElts,
  417. TargetLoweringOpt &TLO) const override;
  418. bool ExpandInlineAsm(CallInst *CI) const override;
  419. ConstraintType getConstraintType(StringRef Constraint) const override;
  420. /// Examine constraint string and operand type and determine a weight value.
  421. /// The operand object must already have been set up with the operand type.
  422. ConstraintWeight getSingleConstraintMatchWeight(
  423. AsmOperandInfo &info, const char *constraint) const override;
  424. std::pair<unsigned, const TargetRegisterClass *>
  425. getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
  426. StringRef Constraint, MVT VT) const override;
  427. const char *LowerXConstraint(EVT ConstraintVT) const override;
  428. /// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
  429. /// vector. If it is invalid, don't add anything to Ops. If hasMemory is
  430. /// true it means one of the asm constraint of the inline asm instruction
  431. /// being processed is 'm'.
  432. void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint,
  433. std::vector<SDValue> &Ops,
  434. SelectionDAG &DAG) const override;
  435. unsigned
  436. getInlineAsmMemConstraint(StringRef ConstraintCode) const override {
  437. if (ConstraintCode == "Q")
  438. return InlineAsm::Constraint_Q;
  439. else if (ConstraintCode.size() == 2) {
  440. if (ConstraintCode[0] == 'U') {
  441. switch(ConstraintCode[1]) {
  442. default:
  443. break;
  444. case 'm':
  445. return InlineAsm::Constraint_Um;
  446. case 'n':
  447. return InlineAsm::Constraint_Un;
  448. case 'q':
  449. return InlineAsm::Constraint_Uq;
  450. case 's':
  451. return InlineAsm::Constraint_Us;
  452. case 't':
  453. return InlineAsm::Constraint_Ut;
  454. case 'v':
  455. return InlineAsm::Constraint_Uv;
  456. case 'y':
  457. return InlineAsm::Constraint_Uy;
  458. }
  459. }
  460. }
  461. return TargetLowering::getInlineAsmMemConstraint(ConstraintCode);
  462. }
  463. const ARMSubtarget* getSubtarget() const {
  464. return Subtarget;
  465. }
  466. /// getRegClassFor - Return the register class that should be used for the
  467. /// specified value type.
  468. const TargetRegisterClass *
  469. getRegClassFor(MVT VT, bool isDivergent = false) const override;
  470. bool shouldAlignPointerArgs(CallInst *CI, unsigned &MinSize,
  471. Align &PrefAlign) const override;
  472. /// createFastISel - This method returns a target specific FastISel object,
  473. /// or null if the target does not support "fast" ISel.
  474. FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
  475. const TargetLibraryInfo *libInfo) const override;
  476. Sched::Preference getSchedulingPreference(SDNode *N) const override;
  477. bool preferZeroCompareBranch() const override { return true; }
  478. bool isMaskAndCmp0FoldingBeneficial(const Instruction &AndI) const override;
  479. bool
  480. isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const override;
  481. bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override;
  482. /// isFPImmLegal - Returns true if the target can instruction select the
  483. /// specified FP immediate natively. If false, the legalizer will
  484. /// materialize the FP immediate as a load from a constant pool.
  485. bool isFPImmLegal(const APFloat &Imm, EVT VT,
  486. bool ForCodeSize = false) const override;
  487. bool getTgtMemIntrinsic(IntrinsicInfo &Info,
  488. const CallInst &I,
  489. MachineFunction &MF,
  490. unsigned Intrinsic) const override;
  491. /// Returns true if it is beneficial to convert a load of a constant
  492. /// to just the constant itself.
  493. bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
  494. Type *Ty) const override;
  495. /// Return true if EXTRACT_SUBVECTOR is cheap for this result type
  496. /// with this index.
  497. bool isExtractSubvectorCheap(EVT ResVT, EVT SrcVT,
  498. unsigned Index) const override;
  499. bool shouldFormOverflowOp(unsigned Opcode, EVT VT,
  500. bool MathUsed) const override {
  501. // Using overflow ops for overflow checks only should beneficial on ARM.
  502. return TargetLowering::shouldFormOverflowOp(Opcode, VT, true);
  503. }
  504. /// Returns true if an argument of type Ty needs to be passed in a
  505. /// contiguous block of registers in calling convention CallConv.
  506. bool functionArgumentNeedsConsecutiveRegisters(
  507. Type *Ty, CallingConv::ID CallConv, bool isVarArg,
  508. const DataLayout &DL) const override;
  509. /// If a physical register, this returns the register that receives the
  510. /// exception address on entry to an EH pad.
  511. Register
  512. getExceptionPointerRegister(const Constant *PersonalityFn) const override;
  513. /// If a physical register, this returns the register that receives the
  514. /// exception typeid on entry to a landing pad.
  515. Register
  516. getExceptionSelectorRegister(const Constant *PersonalityFn) const override;
  517. Instruction *makeDMB(IRBuilderBase &Builder, ARM_MB::MemBOpt Domain) const;
  518. Value *emitLoadLinked(IRBuilderBase &Builder, Type *ValueTy, Value *Addr,
  519. AtomicOrdering Ord) const override;
  520. Value *emitStoreConditional(IRBuilderBase &Builder, Value *Val, Value *Addr,
  521. AtomicOrdering Ord) const override;
  522. void
  523. emitAtomicCmpXchgNoStoreLLBalance(IRBuilderBase &Builder) const override;
  524. Instruction *emitLeadingFence(IRBuilderBase &Builder, Instruction *Inst,
  525. AtomicOrdering Ord) const override;
  526. Instruction *emitTrailingFence(IRBuilderBase &Builder, Instruction *Inst,
  527. AtomicOrdering Ord) const override;
  528. unsigned getMaxSupportedInterleaveFactor() const override;
  529. bool lowerInterleavedLoad(LoadInst *LI,
  530. ArrayRef<ShuffleVectorInst *> Shuffles,
  531. ArrayRef<unsigned> Indices,
  532. unsigned Factor) const override;
  533. bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
  534. unsigned Factor) const override;
  535. bool shouldInsertFencesForAtomic(const Instruction *I) const override;
  536. TargetLoweringBase::AtomicExpansionKind
  537. shouldExpandAtomicLoadInIR(LoadInst *LI) const override;
  538. TargetLoweringBase::AtomicExpansionKind
  539. shouldExpandAtomicStoreInIR(StoreInst *SI) const override;
  540. TargetLoweringBase::AtomicExpansionKind
  541. shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const override;
  542. TargetLoweringBase::AtomicExpansionKind
  543. shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const override;
  544. bool useLoadStackGuardNode() const override;
  545. void insertSSPDeclarations(Module &M) const override;
  546. Value *getSDagStackGuard(const Module &M) const override;
  547. Function *getSSPStackGuardCheck(const Module &M) const override;
  548. bool canCombineStoreAndExtract(Type *VectorTy, Value *Idx,
  549. unsigned &Cost) const override;
  550. bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT,
  551. const MachineFunction &MF) const override {
  552. // Do not merge to larger than i32.
  553. return (MemVT.getSizeInBits() <= 32);
  554. }
  555. bool isCheapToSpeculateCttz(Type *Ty) const override;
  556. bool isCheapToSpeculateCtlz(Type *Ty) const override;
  557. bool convertSetCCLogicToBitwiseLogic(EVT VT) const override {
  558. return VT.isScalarInteger();
  559. }
  560. bool supportSwiftError() const override {
  561. return true;
  562. }
  563. bool hasStandaloneRem(EVT VT) const override {
  564. return HasStandaloneRem;
  565. }
  566. ShiftLegalizationStrategy
  567. preferredShiftLegalizationStrategy(SelectionDAG &DAG, SDNode *N,
  568. unsigned ExpansionFactor) const override;
  569. CCAssignFn *CCAssignFnForCall(CallingConv::ID CC, bool isVarArg) const;
  570. CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC, bool isVarArg) const;
  571. /// Returns true if \p VecTy is a legal interleaved access type. This
  572. /// function checks the vector element type and the overall width of the
  573. /// vector.
  574. bool isLegalInterleavedAccessType(unsigned Factor, FixedVectorType *VecTy,
  575. Align Alignment,
  576. const DataLayout &DL) const;
  577. bool isMulAddWithConstProfitable(SDValue AddNode,
  578. SDValue ConstNode) const override;
  579. bool alignLoopsWithOptSize() const override;
  580. /// Returns the number of interleaved accesses that will be generated when
  581. /// lowering accesses of the given type.
  582. unsigned getNumInterleavedAccesses(VectorType *VecTy,
  583. const DataLayout &DL) const;
  584. void finalizeLowering(MachineFunction &MF) const override;
  585. /// Return the correct alignment for the current calling convention.
  586. Align getABIAlignmentForCallingConv(Type *ArgTy,
  587. const DataLayout &DL) const override;
  588. bool isDesirableToCommuteWithShift(const SDNode *N,
  589. CombineLevel Level) const override;
  590. bool isDesirableToCommuteXorWithShift(const SDNode *N) const override;
  591. bool shouldFoldConstantShiftPairToMask(const SDNode *N,
  592. CombineLevel Level) const override;
  593. bool preferIncOfAddToSubOfNot(EVT VT) const override;
  594. bool shouldConvertFpToSat(unsigned Op, EVT FPVT, EVT VT) const override;
  595. bool isComplexDeinterleavingSupported() const override;
  596. bool isComplexDeinterleavingOperationSupported(
  597. ComplexDeinterleavingOperation Operation, Type *Ty) const override;
  598. Value *createComplexDeinterleavingIR(
  599. Instruction *I, ComplexDeinterleavingOperation OperationType,
  600. ComplexDeinterleavingRotation Rotation, Value *InputA, Value *InputB,
  601. Value *Accumulator = nullptr) const override;
  602. protected:
  603. std::pair<const TargetRegisterClass *, uint8_t>
  604. findRepresentativeClass(const TargetRegisterInfo *TRI,
  605. MVT VT) const override;
  606. private:
  607. /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
  608. /// make the right decision when generating code for different targets.
  609. const ARMSubtarget *Subtarget;
  610. const TargetRegisterInfo *RegInfo;
  611. const InstrItineraryData *Itins;
  612. /// ARMPCLabelIndex - Keep track of the number of ARM PC labels created.
  613. unsigned ARMPCLabelIndex;
  614. // TODO: remove this, and have shouldInsertFencesForAtomic do the proper
  615. // check.
  616. bool InsertFencesForAtomic;
  617. bool HasStandaloneRem = true;
  618. void addTypeForNEON(MVT VT, MVT PromotedLdStVT);
  619. void addDRTypeForNEON(MVT VT);
  620. void addQRTypeForNEON(MVT VT);
  621. std::pair<SDValue, SDValue> getARMXALUOOp(SDValue Op, SelectionDAG &DAG, SDValue &ARMcc) const;
  622. using RegsToPassVector = SmallVector<std::pair<unsigned, SDValue>, 8>;
  623. void PassF64ArgInRegs(const SDLoc &dl, SelectionDAG &DAG, SDValue Chain,
  624. SDValue &Arg, RegsToPassVector &RegsToPass,
  625. CCValAssign &VA, CCValAssign &NextVA,
  626. SDValue &StackPtr,
  627. SmallVectorImpl<SDValue> &MemOpChains,
  628. bool IsTailCall,
  629. int SPDiff) const;
  630. SDValue GetF64FormalArgument(CCValAssign &VA, CCValAssign &NextVA,
  631. SDValue &Root, SelectionDAG &DAG,
  632. const SDLoc &dl) const;
  633. CallingConv::ID getEffectiveCallingConv(CallingConv::ID CC,
  634. bool isVarArg) const;
  635. CCAssignFn *CCAssignFnForNode(CallingConv::ID CC, bool Return,
  636. bool isVarArg) const;
  637. std::pair<SDValue, MachinePointerInfo>
  638. computeAddrForCallArg(const SDLoc &dl, SelectionDAG &DAG,
  639. const CCValAssign &VA, SDValue StackPtr,
  640. bool IsTailCall, int SPDiff) const;
  641. SDValue LowerEH_SJLJ_SETJMP(SDValue Op, SelectionDAG &DAG) const;
  642. SDValue LowerEH_SJLJ_LONGJMP(SDValue Op, SelectionDAG &DAG) const;
  643. SDValue LowerEH_SJLJ_SETUP_DISPATCH(SDValue Op, SelectionDAG &DAG) const;
  644. SDValue LowerINTRINSIC_VOID(SDValue Op, SelectionDAG &DAG,
  645. const ARMSubtarget *Subtarget) const;
  646. SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG,
  647. const ARMSubtarget *Subtarget) const;
  648. SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const;
  649. SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) const;
  650. SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
  651. SDValue LowerGlobalAddressDarwin(SDValue Op, SelectionDAG &DAG) const;
  652. SDValue LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG) const;
  653. SDValue LowerGlobalAddressWindows(SDValue Op, SelectionDAG &DAG) const;
  654. SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const;
  655. SDValue LowerToTLSGeneralDynamicModel(GlobalAddressSDNode *GA,
  656. SelectionDAG &DAG) const;
  657. SDValue LowerToTLSExecModels(GlobalAddressSDNode *GA,
  658. SelectionDAG &DAG,
  659. TLSModel::Model model) const;
  660. SDValue LowerGlobalTLSAddressDarwin(SDValue Op, SelectionDAG &DAG) const;
  661. SDValue LowerGlobalTLSAddressWindows(SDValue Op, SelectionDAG &DAG) const;
  662. SDValue LowerGLOBAL_OFFSET_TABLE(SDValue Op, SelectionDAG &DAG) const;
  663. SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG) const;
  664. SDValue LowerSignedALUO(SDValue Op, SelectionDAG &DAG) const;
  665. SDValue LowerUnsignedALUO(SDValue Op, SelectionDAG &DAG) const;
  666. SDValue LowerSELECT(SDValue Op, SelectionDAG &DAG) const;
  667. SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const;
  668. SDValue LowerBRCOND(SDValue Op, SelectionDAG &DAG) const;
  669. SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const;
  670. SDValue LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const;
  671. SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const;
  672. SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const;
  673. SDValue LowerShiftRightParts(SDValue Op, SelectionDAG &DAG) const;
  674. SDValue LowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const;
  675. SDValue LowerGET_ROUNDING(SDValue Op, SelectionDAG &DAG) const;
  676. SDValue LowerSET_ROUNDING(SDValue Op, SelectionDAG &DAG) const;
  677. SDValue LowerConstantFP(SDValue Op, SelectionDAG &DAG,
  678. const ARMSubtarget *ST) const;
  679. SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
  680. const ARMSubtarget *ST) const;
  681. SDValue LowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const;
  682. SDValue LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const;
  683. SDValue LowerDivRem(SDValue Op, SelectionDAG &DAG) const;
  684. SDValue LowerDIV_Windows(SDValue Op, SelectionDAG &DAG, bool Signed) const;
  685. void ExpandDIV_Windows(SDValue Op, SelectionDAG &DAG, bool Signed,
  686. SmallVectorImpl<SDValue> &Results) const;
  687. SDValue ExpandBITCAST(SDNode *N, SelectionDAG &DAG,
  688. const ARMSubtarget *Subtarget) const;
  689. SDValue LowerWindowsDIVLibCall(SDValue Op, SelectionDAG &DAG, bool Signed,
  690. SDValue &Chain) const;
  691. SDValue LowerREM(SDNode *N, SelectionDAG &DAG) const;
  692. SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const;
  693. SDValue LowerFP_ROUND(SDValue Op, SelectionDAG &DAG) const;
  694. SDValue LowerFP_EXTEND(SDValue Op, SelectionDAG &DAG) const;
  695. SDValue LowerFP_TO_INT(SDValue Op, SelectionDAG &DAG) const;
  696. SDValue LowerINT_TO_FP(SDValue Op, SelectionDAG &DAG) const;
  697. SDValue LowerFSETCC(SDValue Op, SelectionDAG &DAG) const;
  698. SDValue LowerSPONENTRY(SDValue Op, SelectionDAG &DAG) const;
  699. void LowerLOAD(SDNode *N, SmallVectorImpl<SDValue> &Results,
  700. SelectionDAG &DAG) const;
  701. Register getRegisterByName(const char* RegName, LLT VT,
  702. const MachineFunction &MF) const override;
  703. SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor, SelectionDAG &DAG,
  704. SmallVectorImpl<SDNode *> &Created) const override;
  705. bool isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,
  706. EVT VT) const override;
  707. SDValue MoveToHPR(const SDLoc &dl, SelectionDAG &DAG, MVT LocVT, MVT ValVT,
  708. SDValue Val) const;
  709. SDValue MoveFromHPR(const SDLoc &dl, SelectionDAG &DAG, MVT LocVT,
  710. MVT ValVT, SDValue Val) const;
  711. SDValue ReconstructShuffle(SDValue Op, SelectionDAG &DAG) const;
  712. SDValue LowerCallResult(SDValue Chain, SDValue InFlag,
  713. CallingConv::ID CallConv, bool isVarArg,
  714. const SmallVectorImpl<ISD::InputArg> &Ins,
  715. const SDLoc &dl, SelectionDAG &DAG,
  716. SmallVectorImpl<SDValue> &InVals, bool isThisReturn,
  717. SDValue ThisVal) const;
  718. bool supportSplitCSR(MachineFunction *MF) const override {
  719. return MF->getFunction().getCallingConv() == CallingConv::CXX_FAST_TLS &&
  720. MF->getFunction().hasFnAttribute(Attribute::NoUnwind);
  721. }
  722. void initializeSplitCSR(MachineBasicBlock *Entry) const override;
  723. void insertCopiesSplitCSR(
  724. MachineBasicBlock *Entry,
  725. const SmallVectorImpl<MachineBasicBlock *> &Exits) const override;
  726. bool splitValueIntoRegisterParts(
  727. SelectionDAG & DAG, const SDLoc &DL, SDValue Val, SDValue *Parts,
  728. unsigned NumParts, MVT PartVT, std::optional<CallingConv::ID> CC)
  729. const override;
  730. SDValue joinRegisterPartsIntoValue(
  731. SelectionDAG & DAG, const SDLoc &DL, const SDValue *Parts,
  732. unsigned NumParts, MVT PartVT, EVT ValueVT,
  733. std::optional<CallingConv::ID> CC) const override;
  734. SDValue
  735. LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
  736. const SmallVectorImpl<ISD::InputArg> &Ins,
  737. const SDLoc &dl, SelectionDAG &DAG,
  738. SmallVectorImpl<SDValue> &InVals) const override;
  739. int StoreByValRegs(CCState &CCInfo, SelectionDAG &DAG, const SDLoc &dl,
  740. SDValue &Chain, const Value *OrigArg,
  741. unsigned InRegsParamRecordIdx, int ArgOffset,
  742. unsigned ArgSize) const;
  743. void VarArgStyleRegisters(CCState &CCInfo, SelectionDAG &DAG,
  744. const SDLoc &dl, SDValue &Chain,
  745. unsigned ArgOffset, unsigned TotalArgRegsSaveSize,
  746. bool ForceMutable = false) const;
  747. SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI,
  748. SmallVectorImpl<SDValue> &InVals) const override;
  749. /// HandleByVal - Target-specific cleanup for ByVal support.
  750. void HandleByVal(CCState *, unsigned &, Align) const override;
  751. /// IsEligibleForTailCallOptimization - Check whether the call is eligible
  752. /// for tail call optimization. Targets which want to do tail call
  753. /// optimization should implement this function.
  754. bool IsEligibleForTailCallOptimization(
  755. SDValue Callee, CallingConv::ID CalleeCC, bool isVarArg,
  756. bool isCalleeStructRet, bool isCallerStructRet,
  757. const SmallVectorImpl<ISD::OutputArg> &Outs,
  758. const SmallVectorImpl<SDValue> &OutVals,
  759. const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG &DAG,
  760. const bool isIndirect) const;
  761. bool CanLowerReturn(CallingConv::ID CallConv,
  762. MachineFunction &MF, bool isVarArg,
  763. const SmallVectorImpl<ISD::OutputArg> &Outs,
  764. LLVMContext &Context) const override;
  765. SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
  766. const SmallVectorImpl<ISD::OutputArg> &Outs,
  767. const SmallVectorImpl<SDValue> &OutVals,
  768. const SDLoc &dl, SelectionDAG &DAG) const override;
  769. bool isUsedByReturnOnly(SDNode *N, SDValue &Chain) const override;
  770. bool mayBeEmittedAsTailCall(const CallInst *CI) const override;
  771. bool shouldConsiderGEPOffsetSplit() const override { return true; }
  772. bool isUnsupportedFloatingType(EVT VT) const;
  773. SDValue getCMOV(const SDLoc &dl, EVT VT, SDValue FalseVal, SDValue TrueVal,
  774. SDValue ARMcc, SDValue CCR, SDValue Cmp,
  775. SelectionDAG &DAG) const;
  776. SDValue getARMCmp(SDValue LHS, SDValue RHS, ISD::CondCode CC,
  777. SDValue &ARMcc, SelectionDAG &DAG, const SDLoc &dl) const;
  778. SDValue getVFPCmp(SDValue LHS, SDValue RHS, SelectionDAG &DAG,
  779. const SDLoc &dl, bool Signaling = false) const;
  780. SDValue duplicateCmp(SDValue Cmp, SelectionDAG &DAG) const;
  781. SDValue OptimizeVFPBrcond(SDValue Op, SelectionDAG &DAG) const;
  782. void SetupEntryBlockForSjLj(MachineInstr &MI, MachineBasicBlock *MBB,
  783. MachineBasicBlock *DispatchBB, int FI) const;
  784. void EmitSjLjDispatchBlock(MachineInstr &MI, MachineBasicBlock *MBB) const;
  785. bool RemapAddSubWithFlags(MachineInstr &MI, MachineBasicBlock *BB) const;
  786. MachineBasicBlock *EmitStructByval(MachineInstr &MI,
  787. MachineBasicBlock *MBB) const;
  788. MachineBasicBlock *EmitLowered__chkstk(MachineInstr &MI,
  789. MachineBasicBlock *MBB) const;
  790. MachineBasicBlock *EmitLowered__dbzchk(MachineInstr &MI,
  791. MachineBasicBlock *MBB) const;
  792. void addMVEVectorTypes(bool HasMVEFP);
  793. void addAllExtLoads(const MVT From, const MVT To, LegalizeAction Action);
  794. void setAllExpand(MVT VT);
  795. };
  796. enum VMOVModImmType {
  797. VMOVModImm,
  798. VMVNModImm,
  799. MVEVMVNModImm,
  800. OtherModImm
  801. };
  802. namespace ARM {
  803. FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
  804. const TargetLibraryInfo *libInfo);
  805. } // end namespace ARM
  806. } // end namespace llvm
  807. #endif // LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H