LLVM  14.0.0git
AMDGPUISelLowering.h
Go to the documentation of this file.
1 //===-- AMDGPUISelLowering.h - AMDGPU 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 /// \file
10 /// Interface definition of the TargetLowering class that is common
11 /// to all AMD GPUs.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUISELLOWERING_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUISELLOWERING_H
17 
20 
21 namespace llvm {
22 
23 class AMDGPUMachineFunction;
24 class AMDGPUSubtarget;
25 struct ArgDescriptor;
26 
28 private:
29  const AMDGPUSubtarget *Subtarget;
30 
31  /// \returns AMDGPUISD::FFBH_U32 node if the incoming \p Op may have been
32  /// legalized from a smaller type VT. Need to match pre-legalized type because
33  /// the generic legalization inserts the add/sub between the select and
34  /// compare.
35  SDValue getFFBX_U32(SelectionDAG &DAG, SDValue Op, const SDLoc &DL, unsigned Opc) const;
36 
37 public:
38  static unsigned numBitsUnsigned(SDValue Op, SelectionDAG &DAG);
39  static unsigned numBitsSigned(SDValue Op, SelectionDAG &DAG);
40  static bool hasDefinedInitializer(const GlobalValue *GV);
41 
42 protected:
45  /// Split a vector store into multiple scalar stores.
46  /// \returns The resulting chain.
47 
53 
57  double Log2BaseInverted) const;
59 
61 
66 
70 
72 
73 protected:
74  bool shouldCombineMemoryType(EVT VT) const;
79 
81  unsigned Opc, SDValue LHS,
82  uint32_t ValLo, uint32_t ValHi) const;
91  SDValue RHS, DAGCombinerInfo &DCI) const;
93 
98 
100 
102  SelectionDAG &DAG) const;
103 
104  /// Return 64-bit value Op as two 32-bit integers.
105  std::pair<SDValue, SDValue> split64BitValue(SDValue Op,
106  SelectionDAG &DAG) const;
109 
110  /// Split a vector type into two parts. The first part is a power of two
111  /// vector. The second part is whatever is left over, and is a scalar if it
112  /// would otherwise be a 1-vector.
113  std::pair<EVT, EVT> getSplitDestVTs(const EVT &VT, SelectionDAG &DAG) const;
114 
115  /// Split a vector value into two parts of types LoVT and HiVT. HiVT could be
116  /// scalar.
117  std::pair<SDValue, SDValue> splitVector(const SDValue &N, const SDLoc &DL,
118  const EVT &LoVT, const EVT &HighVT,
119  SelectionDAG &DAG) const;
120 
121  /// Split a vector load into 2 loads of half the vector.
123 
124  /// Widen a suitably aligned v3 load. For all other cases, split the input
125  /// vector load.
127 
128  /// Split a vector store into 2 stores of half the vector.
130 
134  SDValue LowerDIVREM24(SDValue Op, SelectionDAG &DAG, bool sign) const;
137 
139  CCState &State,
140  const SmallVectorImpl<ISD::InputArg> &Ins) const;
141 
142 public:
144 
145  bool mayIgnoreSignedZero(SDValue Op) const;
146 
147  static inline SDValue stripBitcast(SDValue Val) {
148  return Val.getOpcode() == ISD::BITCAST ? Val.getOperand(0) : Val;
149  }
150 
151  static bool allUsesHaveSourceMods(const SDNode *N,
152  unsigned CostThreshold = 4);
153  bool isFAbsFree(EVT VT) const override;
154  bool isFNegFree(EVT VT) const override;
155  bool isTruncateFree(EVT Src, EVT Dest) const override;
156  bool isTruncateFree(Type *Src, Type *Dest) const override;
157 
158  bool isZExtFree(Type *Src, Type *Dest) const override;
159  bool isZExtFree(EVT Src, EVT Dest) const override;
160  bool isZExtFree(SDValue Val, EVT VT2) const override;
161 
163  bool LegalOperations, bool ForCodeSize,
164  NegatibleCost &Cost,
165  unsigned Depth) const override;
166 
167  bool isNarrowingProfitable(EVT VT1, EVT VT2) const override;
168 
170  ISD::NodeType ExtendKind) const override;
171 
172  MVT getVectorIdxTy(const DataLayout &) const override;
173  bool isSelectSupported(SelectSupportKind) const override;
174 
175  bool isFPImmLegal(const APFloat &Imm, EVT VT,
176  bool ForCodeSize) const override;
177  bool ShouldShrinkFPConstant(EVT VT) const override;
179  ISD::LoadExtType ExtType,
180  EVT ExtVT) const override;
181 
182  bool isLoadBitCastBeneficial(EVT, EVT, const SelectionDAG &DAG,
183  const MachineMemOperand &MMO) const final;
184 
186  unsigned NumElem,
187  unsigned AS) const override;
188  bool aggressivelyPreferBuildVectorSources(EVT VecVT) const override;
189  bool isCheapToSpeculateCttz() const override;
190  bool isCheapToSpeculateCtlz() const override;
191 
192  bool isSDNodeAlwaysUniform(const SDNode *N) const override;
193  static CCAssignFn *CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg);
194  static CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg);
195 
196  SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
198  const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL,
199  SelectionDAG &DAG) const override;
200 
202  SelectionDAG &DAG,
203  MachineFrameInfo &MFI,
204  int ClobberedFI) const;
205 
206  SDValue lowerUnhandledCall(CallLoweringInfo &CLI,
207  SmallVectorImpl<SDValue> &InVals,
208  StringRef Reason) const;
209  SDValue LowerCall(CallLoweringInfo &CLI,
210  SmallVectorImpl<SDValue> &InVals) const override;
211 
213  SelectionDAG &DAG) const;
214 
215  SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
216  SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;
217  void ReplaceNodeResults(SDNode * N,
219  SelectionDAG &DAG) const override;
220 
222  SDValue RHS, SDValue True, SDValue False,
223  SDValue CC, DAGCombinerInfo &DCI) const;
224 
225  const char* getTargetNodeName(unsigned Opcode) const override;
226 
227  // FIXME: Turn off MergeConsecutiveStores() before Instruction Selection for
228  // AMDGPU. Commit r319036,
229  // (https://github.com/llvm/llvm-project/commit/db77e57ea86d941a4262ef60261692f4cb6893e6)
230  // turned on MergeConsecutiveStores() before Instruction Selection for all
231  // targets. Enough AMDGPU compiles go into an infinite loop (
232  // MergeConsecutiveStores() merges two stores; LegalizeStoreOps() un-merges;
233  // MergeConsecutiveStores() re-merges, etc. ) to warrant turning it off for
234  // now.
235  bool mergeStoresAfterLegalization(EVT) const override { return false; }
236 
237  bool isFsqrtCheap(SDValue Operand, SelectionDAG &DAG) const override {
238  return true;
239  }
241  int &RefinementSteps, bool &UseOneConstNR,
242  bool Reciprocal) const override;
244  int &RefinementSteps) const override;
245 
247  SelectionDAG &DAG) const = 0;
248 
249  /// Determine which of the bits specified in \p Mask are known to be
250  /// either zero or one and return them in the \p KnownZero and \p KnownOne
251  /// bitsets.
253  KnownBits &Known,
254  const APInt &DemandedElts,
255  const SelectionDAG &DAG,
256  unsigned Depth = 0) const override;
257 
258  unsigned ComputeNumSignBitsForTargetNode(SDValue Op, const APInt &DemandedElts,
259  const SelectionDAG &DAG,
260  unsigned Depth = 0) const override;
261 
263  Register R,
264  const APInt &DemandedElts,
265  const MachineRegisterInfo &MRI,
266  unsigned Depth = 0) const override;
267 
269  const SelectionDAG &DAG,
270  bool SNaN = false,
271  unsigned Depth = 0) const override;
272 
273  /// Helper function that adds Reg to the LiveIn list of the DAG's
274  /// MachineFunction.
275  ///
276  /// \returns a RegisterSDNode representing Reg if \p RawReg is true, otherwise
277  /// a copy from the register.
279  const TargetRegisterClass *RC,
280  Register Reg, EVT VT,
281  const SDLoc &SL,
282  bool RawReg = false) const;
284  const TargetRegisterClass *RC,
285  Register Reg, EVT VT) const {
286  return CreateLiveInRegister(DAG, RC, Reg, VT, SDLoc(DAG.getEntryNode()));
287  }
288 
289  // Returns the raw live in register rather than a copy from it.
291  const TargetRegisterClass *RC,
292  Register Reg, EVT VT) const {
293  return CreateLiveInRegister(DAG, RC, Reg, VT, SDLoc(DAG.getEntryNode()), true);
294  }
295 
296  /// Similar to CreateLiveInRegister, except value maybe loaded from a stack
297  /// slot rather than passed in a register.
299  EVT VT,
300  const SDLoc &SL,
301  int64_t Offset) const;
302 
304  const SDLoc &SL,
305  SDValue Chain,
306  SDValue ArgVal,
307  int64_t Offset) const;
308 
310  const TargetRegisterClass *RC,
311  EVT VT, const SDLoc &SL,
312  const ArgDescriptor &Arg) const;
313 
318  };
319 
320  /// Helper function that returns the byte offset of the given
321  /// type of implicit parameter.
323  const ImplicitParameter Param) const;
324 
325  MVT getFenceOperandTy(const DataLayout &DL) const override {
326  return MVT::i32;
327  }
328 
330 
331  bool isConstantUnsignedBitfieldExtactLegal(unsigned Opc, LLT Ty1,
332  LLT Ty2) const override;
333 };
334 
335 namespace AMDGPUISD {
336 
337 enum NodeType : unsigned {
338  // AMDIL ISD Opcodes
340  UMUL, // 32bit unsigned multiplication
342  // End AMDIL ISD Opcodes
343 
344  // Function call.
348 
349  // Masked control flow nodes.
350  IF,
353 
354  // A uniform kernel return that terminates the wavefront.
356 
357  // Return to a shader part's epilog code.
359 
360  // Return with values from a non-entry function.
362 
365 
366  /// CLAMP value between 0.0 and 1.0. NaN clamped to 0, following clamp output
367  /// modifier behavior with dx10_enable.
369 
370  // This is SETCC with the full mask result which is used for a compare with a
371  // result bit per item in the wavefront.
374 
376 
377  // FP ops with input and output chain.
380 
381  // SIN_HW, COS_HW - f32 for SI, 1 ULP max error, valid from -100 pi to 100 pi.
382  // Denormals handled on some parts.
387 
402  // For emitting ISD::FMAD when f32 denormals are enabled because mac/mad is
403  // treated as an illegal operation.
405 
406  // RCP, RSQ - For f32, 1 ULP max error, no denormal handling.
407  // For f64, max error 2^29 ULP, handles denormals.
419  BFE_U32, // Extract range of bits with zero extension to 32-bits.
420  BFE_I32, // Extract range of bits with sign extension to 32-bits.
421  BFI, // (src0 & src1) | (~src0 & src2)
422  BFM, // Insert a range of bits into a 32-bit word.
423  FFBH_U32, // ctlz with -1 if input is zero.
425  FFBL_B32, // cttz with -1 if input is zero.
444 
445  // These cvt_f32_ubyte* nodes need to remain consecutive and in order.
450 
451  // Convert two float 32 numbers into a single register holding two packed f16
452  // with round to zero.
458 
459  // Same as the standard node, except the high bits of the resulting integer
460  // are known 0.
462 
463  /// This node is for VLIW targets and it is used to represent a vector
464  /// that is stored in consecutive registers with the same channel.
465  /// For example:
466  /// |X |Y|Z|W|
467  /// T0|v.x| | | |
468  /// T1|v.y| | | |
469  /// T2|v.z| | | |
470  /// T3|v.w| | | |
472  /// Pointer to the start of the shader's constant data.
484 
527 
529 };
530 
531 
532 } // End namespace AMDGPUISD
533 
534 } // End namespace llvm
535 
536 #endif
llvm::AMDGPUISD::CLAMP
@ CLAMP
CLAMP value between 0.0 and 1.0.
Definition: AMDGPUISelLowering.h:368
llvm::AMDGPUTargetLowering::allUsesHaveSourceMods
static bool allUsesHaveSourceMods(const SDNode *N, unsigned CostThreshold=4)
Definition: AMDGPUISelLowering.cpp:707
llvm::AMDGPUISD::FFBL_B32
@ FFBL_B32
Definition: AMDGPUISelLowering.h:425
llvm::AMDGPUISD::SMIN3
@ SMIN3
Definition: AMDGPUISelLowering.h:392
llvm::AMDGPUTargetLowering::LowerFTRUNC
SDValue LowerFTRUNC(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2200
llvm::AMDGPUISD::STORE_MSKOR
@ STORE_MSKOR
Definition: AMDGPUISelLowering.h:485
llvm::AMDGPUISD::UMUL
@ UMUL
Definition: AMDGPUISelLowering.h:340
llvm::AMDGPUTargetLowering::LowerFRINT
SDValue LowerFRINT(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2246
llvm::AMDGPUISD::BUFFER_ATOMIC_SUB
@ BUFFER_ATOMIC_SUB
Definition: AMDGPUISelLowering.h:512
llvm::AMDGPUISD::PC_ADD_REL_OFFSET
@ PC_ADD_REL_OFFSET
Definition: AMDGPUISelLowering.h:474
Signed
@ Signed
Definition: NVPTXISelLowering.cpp:4636
llvm::AMDGPUTargetLowering::LowerDIVREM24
SDValue LowerDIVREM24(SDValue Op, SelectionDAG &DAG, bool sign) const
Definition: AMDGPUISelLowering.cpp:1704
llvm::AMDGPUTargetLowering::isNarrowingProfitable
bool isNarrowingProfitable(EVT VT1, EVT VT2) const override
Return true if it's profitable to narrow operations of type VT1 to VT2.
Definition: AMDGPUISelLowering.cpp:964
llvm::AMDGPUISD::FIRST_NUMBER
@ FIRST_NUMBER
Definition: AMDGPUISelLowering.h:339
llvm::AMDGPUISD::BUFFER_LOAD_BYTE
@ BUFFER_LOAD_BYTE
Definition: AMDGPUISelLowering.h:500
llvm::AMDGPUTargetLowering::getRecipEstimate
SDValue getRecipEstimate(SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps) const override
Return a reciprocal estimate value for the input operand.
Definition: AMDGPUISelLowering.cpp:4500
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
llvm::AMDGPUTargetLowering::isFsqrtCheap
bool isFsqrtCheap(SDValue Operand, SelectionDAG &DAG) const override
Return true if SQRT(X) shouldn't be replaced with X*RSQRT(X).
Definition: AMDGPUISelLowering.h:237
llvm::AMDGPUISD::DIV_SCALE
@ DIV_SCALE
Definition: AMDGPUISelLowering.h:399
llvm::SDLoc
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Definition: SelectionDAGNodes.h:1086
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:113
llvm::AMDGPUTargetLowering::splitVector
std::pair< SDValue, SDValue > splitVector(const SDValue &N, const SDLoc &DL, const EVT &LoVT, const EVT &HighVT, SelectionDAG &DAG) const
Split a vector value into two parts of types LoVT and HiVT.
Definition: AMDGPUISelLowering.cpp:1551
llvm::ISD::BITCAST
@ BITCAST
BITCAST - This operator converts between integer, vector and FP values, as if the value was stored to...
Definition: ISDOpcodes.h:848
llvm::AMDGPUTargetLowering::LowerCTLZ_CTTZ
SDValue LowerCTLZ_CTTZ(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2370
llvm::AMDGPUTargetLowering
Definition: AMDGPUISelLowering.h:27
llvm::AMDGPUISD::LAST_AMDGPU_ISD_NUMBER
@ LAST_AMDGPU_ISD_NUMBER
Definition: AMDGPUISelLowering.h:528
llvm::AMDGPUTargetLowering::performLoadCombine
SDValue performLoadCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:2970
llvm::CCState
CCState - This class holds information needed while lowering arguments and return values.
Definition: CallingConvLower.h:191
llvm::AMDGPUTargetLowering::performAssertSZExtCombine
SDValue performAssertSZExtCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3081
llvm::GISelKnownBits
Definition: GISelKnownBits.h:29
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition: MachineRegisterInfo.h:52
llvm::ArgDescriptor
Definition: AMDGPUArgumentUsageInfo.h:23
llvm::AMDGPUTargetLowering::isFNegFree
bool isFNegFree(EVT VT) const override
Return true if an fneg operation is free to the point where it is never worthwhile to replace it with...
Definition: AMDGPUISelLowering.cpp:892
llvm::AMDGPUISD::BUFFER_LOAD
@ BUFFER_LOAD
Definition: AMDGPUISelLowering.h:497
llvm::AMDGPUISD::UMAX3
@ UMAX3
Definition: AMDGPUISelLowering.h:390
llvm::AMDGPUTargetLowering::loadInputValue
SDValue loadInputValue(SelectionDAG &DAG, const TargetRegisterClass *RC, EVT VT, const SDLoc &SL, const ArgDescriptor &Arg) const
Definition: AMDGPUISelLowering.cpp:4291
llvm::AMDGPUISD::CONST_ADDRESS
@ CONST_ADDRESS
Definition: AMDGPUISelLowering.h:437
llvm::AMDGPUTargetLowering::performFAbsCombine
SDValue performFAbsCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3975
llvm::AMDGPUTargetLowering::LowerCONCAT_VECTORS
SDValue LowerCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1387
llvm::AMDGPUISD::ATOMIC_CMP_SWAP
@ ATOMIC_CMP_SWAP
Definition: AMDGPUISelLowering.h:492
llvm::AMDGPUISD::BUFFER_ATOMIC_FADD
@ BUFFER_ATOMIC_FADD
Definition: AMDGPUISelLowering.h:524
llvm::AMDGPUISD::CVT_PKNORM_I16_F32
@ CVT_PKNORM_I16_F32
Definition: AMDGPUISelLowering.h:454
llvm::AMDGPUISD::IF
@ IF
Definition: AMDGPUISelLowering.h:350
llvm::MachineSDNode
An SDNode that represents everything that will be needed to construct a MachineInstr.
Definition: SelectionDAGNodes.h:2746
llvm::AMDGPUISD::TBUFFER_LOAD_FORMAT_D16
@ TBUFFER_LOAD_FORMAT_D16
Definition: AMDGPUISelLowering.h:490
llvm::AMDGPUISD::FMUL_W_CHAIN
@ FMUL_W_CHAIN
Definition: AMDGPUISelLowering.h:379
llvm::AMDGPUTargetLowering::storeStackInputValue
SDValue storeStackInputValue(SelectionDAG &DAG, const SDLoc &SL, SDValue Chain, SDValue ArgVal, int64_t Offset) const
Definition: AMDGPUISelLowering.cpp:4272
llvm::AMDGPUISD::TC_RETURN
@ TC_RETURN
Definition: AMDGPUISelLowering.h:346
llvm::AMDGPUISD::SAMPLEB
@ SAMPLEB
Definition: AMDGPUISelLowering.h:441
llvm::AMDGPUISD::DIV_FIXUP
@ DIV_FIXUP
Definition: AMDGPUISelLowering.h:401
llvm::AMDGPUISD::LOAD_D16_HI_I8
@ LOAD_D16_HI_I8
Definition: AMDGPUISelLowering.h:480
llvm::AMDGPUISD::FIRST_MEM_OPCODE_NUMBER
@ FIRST_MEM_OPCODE_NUMBER
Definition: AMDGPUISelLowering.h:477
llvm::AMDGPUTargetLowering::LowerFCEIL
SDValue LowerFCEIL(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2160
llvm::AMDGPUTargetLowering::isZExtFree
bool isZExtFree(Type *Src, Type *Dest) const override
Return true if any actual instruction that defines a value of type FromTy implicitly zero-extends the...
Definition: AMDGPUISelLowering.cpp:938
llvm::AMDGPUTargetLowering::computeKnownBitsForTargetNode
void computeKnownBitsForTargetNode(const SDValue Op, KnownBits &Known, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth=0) const override
Determine which of the bits specified in Mask are known to be either zero or one and return them in t...
Definition: AMDGPUISelLowering.cpp:4521
llvm::AMDGPUISD::MAD_I24
@ MAD_I24
Definition: AMDGPUISelLowering.h:431
llvm::SDNode
Represents one node in the SelectionDAG.
Definition: SelectionDAGNodes.h:455
llvm::AMDGPUTargetLowering::computeNumSignBitsForTargetInstr
unsigned computeNumSignBitsForTargetInstr(GISelKnownBits &Analysis, Register R, const APInt &DemandedElts, const MachineRegisterInfo &MRI, unsigned Depth=0) const override
This method can be implemented by targets that want to expose additional information about sign bits ...
Definition: AMDGPUISelLowering.cpp:4704
llvm::Depth
@ Depth
Definition: SIMachineScheduler.h:36
llvm::SPII::Load
@ Load
Definition: SparcInstrInfo.h:32
llvm::AMDGPUISD::ELSE
@ ELSE
Definition: AMDGPUISelLowering.h:351
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::AMDGPUISD::MULHI_U24
@ MULHI_U24
Definition: AMDGPUISelLowering.h:428
llvm::MachineMemOperand
A description of a memory reference used in the backend.
Definition: MachineMemOperand.h:128
llvm::AMDGPUISD::BUFFER_ATOMIC_OR
@ BUFFER_ATOMIC_OR
Definition: AMDGPUISelLowering.h:518
llvm::AMDGPUISD::BUFFER_STORE_SHORT
@ BUFFER_STORE_SHORT
Definition: AMDGPUISelLowering.h:507
llvm::AMDGPUISD::CARRY
@ CARRY
Definition: AMDGPUISelLowering.h:417
AMDGPUSubtarget
#define AMDGPUSubtarget
Definition: AMDGPUInstructionSelector.cpp:41
llvm::AMDGPUTargetLowering::isTruncateFree
bool isTruncateFree(EVT Src, EVT Dest) const override
Definition: AMDGPUISelLowering.cpp:917
llvm::AMDGPUISD::CVT_F32_UBYTE2
@ CVT_F32_UBYTE2
Definition: AMDGPUISelLowering.h:448
llvm::AMDGPUTargetLowering::isConstantUnsignedBitfieldExtactLegal
bool isConstantUnsignedBitfieldExtactLegal(unsigned Opc, LLT Ty1, LLT Ty2) const override
Definition: AMDGPUISelLowering.cpp:4852
llvm::AMDGPUISD::SBUFFER_LOAD
@ SBUFFER_LOAD
Definition: AMDGPUISelLowering.h:504
llvm::AMDGPUISD::LOAD_CONSTANT
@ LOAD_CONSTANT
Definition: AMDGPUISelLowering.h:486
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::AMDGPUTargetLowering::LowerSIGN_EXTEND_INREG
SDValue LowerSIGN_EXTEND_INREG(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2851
Results
Function Alias Analysis Results
Definition: AliasAnalysis.cpp:847
llvm::AMDGPUISD::BUFFER_ATOMIC_SMAX
@ BUFFER_ATOMIC_SMAX
Definition: AMDGPUISelLowering.h:515
llvm::AMDGPUTargetLowering::ReplaceNodeResults
void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
This callback is invoked when a node result type is illegal for the target, and the operation was reg...
Definition: AMDGPUISelLowering.cpp:1318
llvm::AMDGPUTargetLowering::AMDGPUTargetLowering
AMDGPUTargetLowering(const TargetMachine &TM, const AMDGPUSubtarget &STI)
Definition: AMDGPUISelLowering.cpp:59
llvm::AMDGPUISD::BUFFER_ATOMIC_UMIN
@ BUFFER_ATOMIC_UMIN
Definition: AMDGPUISelLowering.h:514
llvm::AMDGPUTargetLowering::shouldExpandAtomicRMWInIR
AtomicExpansionKind shouldExpandAtomicRMWInIR(AtomicRMWInst *) const override
Returns how the IR-level AtomicExpand pass should expand the given AtomicRMW, if at all.
Definition: AMDGPUISelLowering.cpp:4841
llvm::AMDGPUTargetLowering::GRID_DIM
@ GRID_DIM
Definition: AMDGPUISelLowering.h:316
llvm::AMDGPUISD::SAMPLE
@ SAMPLE
Definition: AMDGPUISelLowering.h:440
llvm::AMDGPUISD::BUFFER_ATOMIC_SMIN
@ BUFFER_ATOMIC_SMIN
Definition: AMDGPUISelLowering.h:513
llvm::AMDGPUISD::SETREG
@ SETREG
Definition: AMDGPUISelLowering.h:373
llvm::AMDGPUISD::FMAX_LEGACY
@ FMAX_LEGACY
Definition: AMDGPUISelLowering.h:385
llvm::AMDGPUTargetLowering::LowerUINT_TO_FP
SDValue LowerUINT_TO_FP(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2567
llvm::AMDGPUTargetLowering::SplitVectorLoad
SDValue SplitVectorLoad(SDValue Op, SelectionDAG &DAG) const
Split a vector load into 2 loads of half the vector.
Definition: AMDGPUISelLowering.cpp:1566
llvm::AMDGPUTargetLowering::performTruncateCombine
SDValue performTruncateCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3301
llvm::AMDGPUISD::FMIN3
@ FMIN3
Definition: AMDGPUISelLowering.h:391
llvm::AMDGPUTargetLowering::LowerReturn
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, const SDLoc &DL, SelectionDAG &DAG) const override
This hook must be implemented to lower outgoing return values, described by the Outs array,...
Definition: AMDGPUISelLowering.cpp:1170
llvm::AMDGPUISD::CVT_F32_UBYTE1
@ CVT_F32_UBYTE1
Definition: AMDGPUISelLowering.h:447
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::AMDGPUISD::BUFFER_ATOMIC_INC
@ BUFFER_ATOMIC_INC
Definition: AMDGPUISelLowering.h:520
llvm::AMDGPUTargetLowering::LowerFREM
SDValue LowerFREM(SDValue Op, SelectionDAG &DAG) const
Split a vector store into multiple scalar stores.
Definition: AMDGPUISelLowering.cpp:2146
llvm::AMDGPUISD::BUFFER_ATOMIC_ADD
@ BUFFER_ATOMIC_ADD
Definition: AMDGPUISelLowering.h:511
Arg
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Definition: AMDGPULibCalls.cpp:206
llvm::AMDGPUTargetLowering::lowerUnhandledCall
SDValue lowerUnhandledCall(CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals, StringRef Reason) const
Definition: AMDGPUISelLowering.cpp:1233
llvm::ISD::LoadExtType
LoadExtType
LoadExtType enum - This enum defines the three variants of LOADEXT (load with extension).
Definition: ISDOpcodes.h:1341
llvm::AMDGPUTargetLowering::getTargetNodeName
const char * getTargetNodeName(unsigned Opcode) const override
This method returns the name of a target specific DAG node.
Definition: AMDGPUISelLowering.cpp:4332
TargetLowering.h
llvm::AMDGPUISD::SAMPLED
@ SAMPLED
Definition: AMDGPUISelLowering.h:442
llvm::AMDGPUISD::DIV_FMAS
@ DIV_FMAS
Definition: AMDGPUISelLowering.h:400
llvm::AMDGPUISD::REGISTER_LOAD
@ REGISTER_LOAD
Definition: AMDGPUISelLowering.h:438
llvm::AMDGPUTargetLowering::LowerINT_TO_FP64
SDValue LowerINT_TO_FP64(SDValue Op, SelectionDAG &DAG, bool Signed) const
Definition: AMDGPUISelLowering.cpp:2548
llvm::AMDGPUTargetLowering::performSelectCombine
SDValue performSelectCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3676
llvm::SelectionDAG
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Definition: SelectionDAG.h:216
llvm::AMDGPUTargetLowering::isFPImmLegal
bool isFPImmLegal(const APFloat &Imm, EVT VT, bool ForCodeSize) const override
Returns true if the target can instruction select the specified FP immediate natively.
Definition: AMDGPUISelLowering.cpp:752
llvm::AMDGPUISD::BUFFER_STORE_FORMAT_D16
@ BUFFER_STORE_FORMAT_D16
Definition: AMDGPUISelLowering.h:509
llvm::AMDGPUTargetLowering::numBitsUnsigned
static unsigned numBitsUnsigned(SDValue Op, SelectionDAG &DAG)
Definition: AMDGPUISelLowering.cpp:47
llvm::AMDGPUTargetLowering::CreateLiveInRegister
SDValue CreateLiveInRegister(SelectionDAG &DAG, const TargetRegisterClass *RC, Register Reg, EVT VT) const
Definition: AMDGPUISelLowering.h:283
llvm::AMDGPUTargetLowering::isConstantCostlierToNegate
bool isConstantCostlierToNegate(SDValue N) const
Definition: AMDGPUISelLowering.cpp:3734
llvm::AMDGPUISD::CVT_PKNORM_U16_F32
@ CVT_PKNORM_U16_F32
Definition: AMDGPUISelLowering.h:455
llvm::AMDGPUISD::R600_EXPORT
@ R600_EXPORT
Definition: AMDGPUISelLowering.h:436
llvm::AMDGPUISD::FMED3
@ FMED3
Definition: AMDGPUISelLowering.h:394
llvm::EVT
Extended Value Type.
Definition: ValueTypes.h:35
llvm::AMDGPUISD::PERM
@ PERM
Definition: AMDGPUISelLowering.h:434
llvm::AMDGPUISD::FDOT2
@ FDOT2
Definition: AMDGPUISelLowering.h:397
llvm::TargetLowering
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
Definition: TargetLowering.h:3187
llvm::AMDGPUISD::DS_ORDERED_COUNT
@ DS_ORDERED_COUNT
Definition: AMDGPUISelLowering.h:491
llvm::AMDGPUISD::LOAD_D16_LO_I8
@ LOAD_D16_LO_I8
Definition: AMDGPUISelLowering.h:482
llvm::TargetRegisterClass
Definition: TargetRegisterInfo.h:46
llvm::TargetLowering::DAGCombinerInfo
Definition: TargetLowering.h:3542
llvm::AMDGPUISD::BUFFER_ATOMIC_FMAX
@ BUFFER_ATOMIC_FMAX
Definition: AMDGPUISelLowering.h:526
llvm::AMDGPUTargetLowering::LowerFP_TO_INT64
SDValue LowerFP_TO_INT64(SDValue Op, SelectionDAG &DAG, bool Signed) const
Definition: AMDGPUISelLowering.cpp:2644
llvm::AMDGPUISD::ATOMIC_LOAD_FMAX
@ ATOMIC_LOAD_FMAX
Definition: AMDGPUISelLowering.h:496
llvm::AMDGPUISD::DOT4
@ DOT4
Definition: AMDGPUISelLowering.h:416
llvm::AMDGPUISD::NodeType
NodeType
Definition: AMDGPUISelLowering.h:337
llvm::ISD::NodeType
NodeType
ISD::NodeType enum - This enum defines the target-independent operators for a SelectionDAG.
Definition: ISDOpcodes.h:40
llvm::AMDGPUISD::SMAX3
@ SMAX3
Definition: AMDGPUISelLowering.h:389
llvm::AMDGPUTargetLowering::isSelectSupported
bool isSelectSupported(SelectSupportKind) const override
Definition: AMDGPUISelLowering.cpp:746
llvm::AMDGPUTargetLowering::performMulhuCombine
SDValue performMulhuCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3493
llvm::AMDGPUISD::UMED3
@ UMED3
Definition: AMDGPUISelLowering.h:396
llvm::AMDGPUISD::ENDPGM
@ ENDPGM
Definition: AMDGPUISelLowering.h:355
llvm::AMDGPUTargetLowering::LowerFLOG
SDValue LowerFLOG(SDValue Op, SelectionDAG &DAG, double Log2BaseInverted) const
Definition: AMDGPUISelLowering.cpp:2339
llvm::AMDGPUISD::BUFFER_STORE_FORMAT
@ BUFFER_STORE_FORMAT
Definition: AMDGPUISelLowering.h:508
llvm::AMDGPUTargetLowering::splitBinaryBitConstantOpImpl
SDValue splitBinaryBitConstantOpImpl(DAGCombinerInfo &DCI, const SDLoc &SL, unsigned Opc, SDValue LHS, uint32_t ValLo, uint32_t ValHi) const
Split the 64-bit value LHS into two 32-bit components, and perform the binary operation Opc to it wit...
Definition: AMDGPUISelLowering.cpp:3128
llvm::AMDGPUTargetLowering::getFenceOperandTy
MVT getFenceOperandTy(const DataLayout &DL) const override
Return the type for operands of fence.
Definition: AMDGPUISelLowering.h:325
llvm::AMDGPUISD::CVT_PK_U16_U32
@ CVT_PK_U16_U32
Definition: AMDGPUISelLowering.h:457
llvm::AMDGPUISD::SAMPLEL
@ SAMPLEL
Definition: AMDGPUISelLowering.h:443
llvm::AMDGPUTargetLowering::LowerFNEARBYINT
SDValue LowerFNEARBYINT(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2273
llvm::AMDGPUISD::LOOP
@ LOOP
Definition: AMDGPUISelLowering.h:352
llvm::AMDGPUISD::MUL_U24
@ MUL_U24
Definition: AMDGPUISelLowering.h:426
llvm::AMDGPUISD::SETCC
@ SETCC
Definition: AMDGPUISelLowering.h:372
llvm::AMDGPUTargetLowering::LowerGlobalAddress
virtual SDValue LowerGlobalAddress(AMDGPUMachineFunction *MFI, SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1343
llvm::AMDGPUISD::FMA_W_CHAIN
@ FMA_W_CHAIN
Definition: AMDGPUISelLowering.h:378
llvm::AMDGPUISD::FP_CLASS
@ FP_CLASS
Definition: AMDGPUISelLowering.h:415
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::AMDGPUTargetLowering::getTypeForExtReturn
EVT getTypeForExtReturn(LLVMContext &Context, EVT VT, ISD::NodeType ExtendKind) const override
Return the type that should be used to zero or sign extend a zeroext/signext integer return value.
Definition: AMDGPUISelLowering.cpp:731
llvm::AMDGPUTargetLowering::getHiHalf64
SDValue getHiHalf64(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1524
llvm::AMDGPUISD::BUFFER_ATOMIC_FMIN
@ BUFFER_ATOMIC_FMIN
Definition: AMDGPUISelLowering.h:525
llvm::AMDGPUTargetLowering::numBitsSigned
static unsigned numBitsSigned(SDValue Op, SelectionDAG &DAG)
Definition: AMDGPUISelLowering.cpp:51
llvm::CCAssignFn
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
CCAssignFn - This function assigns a location for Val, updating State to reflect the change.
Definition: CallingConvLower.h:177
llvm::AMDGPUISD::BUFFER_LOAD_SHORT
@ BUFFER_LOAD_SHORT
Definition: AMDGPUISelLowering.h:501
llvm::AMDGPUTargetLowering::mergeStoresAfterLegalization
bool mergeStoresAfterLegalization(EVT) const override
Allow store merging for the specified type after legalization in addition to before legalization.
Definition: AMDGPUISelLowering.h:235
llvm::AMDGPUTargetLowering::LowerFFLOOR
SDValue LowerFFLOOR(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2314
llvm::AMDGPUISD::BUFFER_LOAD_FORMAT
@ BUFFER_LOAD_FORMAT
Definition: AMDGPUISelLowering.h:502
llvm::AMDGPUTargetLowering::loadStackInputValue
SDValue loadStackInputValue(SelectionDAG &DAG, EVT VT, const SDLoc &SL, int64_t Offset) const
Similar to CreateLiveInRegister, except value maybe loaded from a stack slot rather than passed in a ...
Definition: AMDGPUISelLowering.cpp:4256
llvm::AMDGPUISD::BUILD_VERTICAL_VECTOR
@ BUILD_VERTICAL_VECTOR
This node is for VLIW targets and it is used to represent a vector that is stored in consecutive regi...
Definition: AMDGPUISelLowering.h:471
llvm::AMDGPUISD::RCP_LEGACY
@ RCP_LEGACY
Definition: AMDGPUISelLowering.h:410
llvm::APFloat
Definition: APFloat.h:701
llvm::AMDGPUTargetLowering::storeOfVectorConstantIsCheap
bool storeOfVectorConstantIsCheap(EVT MemVT, unsigned NumElem, unsigned AS) const override
Return true if it is expected to be cheaper to do a store of a non-zero vector constant with the give...
Definition: AMDGPUISelLowering.cpp:899
llvm::AMDGPUTargetLowering::LowerUDIVREM64
void LowerUDIVREM64(SDValue Op, SelectionDAG &DAG, SmallVectorImpl< SDValue > &Results) const
Definition: AMDGPUISelLowering.cpp:1815
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::AMDGPUSubtarget
Definition: AMDGPUSubtarget.h:29
llvm::AMDGPUISD::BUFFER_ATOMIC_SWAP
@ BUFFER_ATOMIC_SWAP
Definition: AMDGPUISelLowering.h:510
llvm::AMDGPUISD::SMED3
@ SMED3
Definition: AMDGPUISelLowering.h:395
llvm::AMDGPUISD::BUFFER_ATOMIC_DEC
@ BUFFER_ATOMIC_DEC
Definition: AMDGPUISelLowering.h:521
llvm::AMDGPUTargetLowering::LowerSDIVREM
SDValue LowerSDIVREM(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2085
llvm::AMDGPUISD::LDEXP
@ LDEXP
Definition: AMDGPUISelLowering.h:414
llvm::AMDGPUISD::BORROW
@ BORROW
Definition: AMDGPUISelLowering.h:418
CostThreshold
static cl::opt< unsigned > CostThreshold("dfa-cost-threshold", cl::desc("Maximum cost accepted for the transformation"), cl::Hidden, cl::init(50))
llvm::AMDGPUTargetLowering::performSrlCombine
SDValue performSrlCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3254
llvm::AMDGPUTargetLowering::CCAssignFnForReturn
static CCAssignFn * CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg)
Definition: AMDGPUISelLowering.cpp:1192
llvm::AMDGPUTargetLowering::addTokenForArgument
SDValue addTokenForArgument(SDValue Chain, SelectionDAG &DAG, MachineFrameInfo &MFI, int ClobberedFI) const
Definition: AMDGPUISelLowering.cpp:1197
llvm::AMDGPUISD::LOAD_D16_HI
@ LOAD_D16_HI
Definition: AMDGPUISelLowering.h:478
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:68
llvm::AMDGPUTargetLowering::LowerUDIVREM
SDValue LowerUDIVREM(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2030
llvm::AMDGPUISD::FMAD_FTZ
@ FMAD_FTZ
Definition: AMDGPUISelLowering.h:404
llvm::AMDGPUISD::ATOMIC_DEC
@ ATOMIC_DEC
Definition: AMDGPUISelLowering.h:494
llvm::AMDGPUISD::CVT_PK_I16_I32
@ CVT_PK_I16_I32
Definition: AMDGPUISelLowering.h:456
llvm::AMDGPUISD::BFE_I32
@ BFE_I32
Definition: AMDGPUISelLowering.h:420
llvm::AMDGPUISD::FP_TO_FP16
@ FP_TO_FP16
Definition: AMDGPUISelLowering.h:461
llvm::AMDGPUISD::URECIP
@ URECIP
Definition: AMDGPUISelLowering.h:398
llvm::AMDGPUISD::FFBH_I32
@ FFBH_I32
Definition: AMDGPUISelLowering.h:424
llvm::AMDGPUISD::LDS
@ LDS
Definition: AMDGPUISelLowering.h:475
llvm::TargetLoweringBase::NegatibleCost
NegatibleCost
Enum that specifies when a float negation is beneficial.
Definition: TargetLowering.h:268
llvm::AMDGPUTargetLowering::mayIgnoreSignedZero
bool mayIgnoreSignedZero(SDValue Op) const
Definition: AMDGPUISelLowering.cpp:613
llvm::AMDGPUTargetLowering::performMulCombine
SDValue performMulCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3406
llvm::AMDGPUTargetLowering::getNegatedExpression
SDValue getNegatedExpression(SDValue Op, SelectionDAG &DAG, bool LegalOperations, bool ForCodeSize, NegatibleCost &Cost, unsigned Depth) const override
Return the newly negated expression if the cost is not expensive and set the cost in Cost to indicate...
Definition: AMDGPUISelLowering.cpp:860
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:79
llvm::AMDGPUTargetLowering::isCheapToSpeculateCtlz
bool isCheapToSpeculateCtlz() const override
Return true if it is cheap to speculate a call to intrinsic ctlz.
Definition: AMDGPUISelLowering.cpp:833
llvm::AMDGPUISD::REGISTER_STORE
@ REGISTER_STORE
Definition: AMDGPUISelLowering.h:439
llvm::AMDGPUTargetLowering::LowerINT_TO_FP32
SDValue LowerINT_TO_FP32(SDValue Op, SelectionDAG &DAG, bool Signed) const
Definition: AMDGPUISelLowering.cpp:2422
llvm::AMDGPUTargetLowering::CreateLiveInRegister
SDValue CreateLiveInRegister(SelectionDAG &DAG, const TargetRegisterClass *RC, Register Reg, EVT VT, const SDLoc &SL, bool RawReg=false) const
Helper function that adds Reg to the LiveIn list of the DAG's MachineFunction.
Definition: AMDGPUISelLowering.cpp:4220
llvm::AMDGPUISD::SIN_HW
@ SIN_HW
Definition: AMDGPUISelLowering.h:384
llvm::AMDGPUTargetLowering::CCAssignFnForCall
static CCAssignFn * CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg)
Selects the correct CCAssignFn for a given CallingConvention value.
Definition: AMDGPUISelLowering.cpp:1187
llvm::AMDGPUTargetLowering::lowerFEXP
SDValue lowerFEXP(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2352
llvm::AMDGPUISD::TEXTURE_FETCH
@ TEXTURE_FETCH
Definition: AMDGPUISelLowering.h:435
llvm::AMDGPUISD::RSQ
@ RSQ
Definition: AMDGPUISelLowering.h:409
llvm::AMDGPUTargetLowering::GRID_OFFSET
@ GRID_OFFSET
Definition: AMDGPUISelLowering.h:317
llvm::MVT
Machine Value Type.
Definition: MachineValueType.h:31
llvm::AMDGPUTargetLowering::isKnownNeverNaNForTargetNode
bool isKnownNeverNaNForTargetNode(SDValue Op, const SelectionDAG &DAG, bool SNaN=false, unsigned Depth=0) const override
If SNaN is false,.
Definition: AMDGPUISelLowering.cpp:4727
llvm::AMDGPUISD::BUFFER_ATOMIC_CMPSWAP
@ BUFFER_ATOMIC_CMPSWAP
Definition: AMDGPUISelLowering.h:522
llvm::AMDGPUTargetLowering::performShlCombine
SDValue performShlCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3151
llvm::AMDGPUTargetLowering::combineFMinMaxLegacy
SDValue combineFMinMaxLegacy(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, SDValue True, SDValue False, SDValue CC, DAGCombinerInfo &DCI) const
Generate Min/Max node.
Definition: AMDGPUISelLowering.cpp:1428
llvm::AMDGPUISD::BUFFER_LOAD_USHORT
@ BUFFER_LOAD_USHORT
Definition: AMDGPUISelLowering.h:499
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::MachineFunction
Definition: MachineFunction.h:234
llvm::AMDGPUTargetLowering::getImplicitParameterOffset
uint32_t getImplicitParameterOffset(const MachineFunction &MF, const ImplicitParameter Param) const
Helper function that returns the byte offset of the given type of implicit parameter.
Definition: AMDGPUISelLowering.cpp:4312
llvm::AMDGPUTargetLowering::performSraCombine
SDValue performSraCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3219
llvm::AMDGPUTargetLowering::isSDNodeAlwaysUniform
bool isSDNodeAlwaysUniform(const SDNode *N) const override
Definition: AMDGPUISelLowering.cpp:837
Cond
SmallVector< MachineOperand, 4 > Cond
Definition: BasicBlockSections.cpp:179
llvm::AMDGPUISD::BUFFER_ATOMIC_UMAX
@ BUFFER_ATOMIC_UMAX
Definition: AMDGPUISelLowering.h:516
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::AMDGPUISD::LOAD_D16_LO_U8
@ LOAD_D16_LO_U8
Definition: AMDGPUISelLowering.h:483
uint32_t
llvm::AMDGPUTargetLowering::LowerOperation
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
This callback is invoked for operations that are unsupported by the target, which are registered to u...
Definition: AMDGPUISelLowering.cpp:1276
llvm::SDValue::getOperand
const SDValue & getOperand(unsigned i) const
Definition: SelectionDAGNodes.h:1129
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::AMDGPUISD::MULHI_I24
@ MULHI_I24
Definition: AMDGPUISelLowering.h:429
llvm::AMDGPUTargetLowering::performStoreCombine
SDValue performStoreCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3024
llvm::AMDGPUISD::CVT_F32_UBYTE0
@ CVT_F32_UBYTE0
Definition: AMDGPUISelLowering.h:446
llvm::ISD::BUILTIN_OP_END
@ BUILTIN_OP_END
BUILTIN_OP_END - This must be the last enum value in this list.
Definition: ISDOpcodes.h:1249
llvm::AMDGPUTargetLowering::LowerFP_TO_INT
SDValue LowerFP_TO_INT(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2816
llvm::AMDGPUTargetLowering::performRcpCombine
SDValue performRcpCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:4000
llvm::AMDGPUISD::BFI
@ BFI
Definition: AMDGPUISelLowering.h:421
llvm::AMDGPUTargetLowering::performFNegCombine
SDValue performFNegCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3765
llvm::AtomicRMWInst
an instruction that atomically reads a memory location, combines it with another value,...
Definition: Instructions.h:726
MRI
unsigned const MachineRegisterInfo * MRI
Definition: AArch64AdvSIMDScalarPass.cpp:105
llvm::AMDGPUISD::MAD_U24
@ MAD_U24
Definition: AMDGPUISelLowering.h:430
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::AMDGPUISD::FMIN_LEGACY
@ FMIN_LEGACY
Definition: AMDGPUISelLowering.h:386
llvm::AMDGPUTargetLowering::shouldReduceLoadWidth
bool shouldReduceLoadWidth(SDNode *Load, ISD::LoadExtType ExtType, EVT ExtVT) const override
Return true if it is profitable to reduce a load to a smaller type.
Definition: AMDGPUISelLowering.cpp:765
llvm::AMDGPUTargetLowering::CreateLiveInRegisterRaw
SDValue CreateLiveInRegisterRaw(SelectionDAG &DAG, const TargetRegisterClass *RC, Register Reg, EVT VT) const
Definition: AMDGPUISelLowering.h:290
llvm::AMDGPUTargetLowering::performCtlz_CttzCombine
SDValue performCtlz_CttzCombine(const SDLoc &SL, SDValue Cond, SDValue LHS, SDValue RHS, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3559
llvm::AMDGPUTargetLowering::LowerFP_TO_FP16
SDValue LowerFP_TO_FP16(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2717
llvm::AMDGPUTargetLowering::shouldCombineMemoryType
bool shouldCombineMemoryType(EVT VT) const
Definition: AMDGPUISelLowering.cpp:2949
llvm::AMDGPUISD::RCP
@ RCP
Definition: AMDGPUISelLowering.h:408
llvm::AMDGPUISD::TBUFFER_STORE_FORMAT
@ TBUFFER_STORE_FORMAT
Definition: AMDGPUISelLowering.h:487
llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute
void analyzeFormalArgumentsCompute(CCState &State, const SmallVectorImpl< ISD::InputArg > &Ins) const
The SelectionDAGBuilder will automatically promote function arguments with illegal types.
Definition: AMDGPUISelLowering.cpp:1053
llvm::KnownBits
Definition: KnownBits.h:23
llvm::AMDGPUISD::RSQ_CLAMP
@ RSQ_CLAMP
Definition: AMDGPUISelLowering.h:413
llvm::AMDGPUISD::TBUFFER_STORE_FORMAT_D16
@ TBUFFER_STORE_FORMAT_D16
Definition: AMDGPUISelLowering.h:488
llvm::AMDGPUISD::BFM
@ BFM
Definition: AMDGPUISelLowering.h:422
llvm::AMDGPUISD::LOAD_D16_HI_U8
@ LOAD_D16_HI_U8
Definition: AMDGPUISelLowering.h:481
llvm::TargetLoweringBase::AtomicExpansionKind
AtomicExpansionKind
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all.
Definition: TargetLowering.h:250
CallingConvLower.h
llvm::AMDGPUISD::MUL_I24
@ MUL_I24
Definition: AMDGPUISelLowering.h:427
llvm::AMDGPUISD::MAD_U64_U32
@ MAD_U64_U32
Definition: AMDGPUISelLowering.h:432
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:324
llvm::AMDGPUISD::ATOMIC_LOAD_FMIN
@ ATOMIC_LOAD_FMIN
Definition: AMDGPUISelLowering.h:495
llvm::SelectionDAG::getEntryNode
SDValue getEntryNode() const
Return the token chain corresponding to the entry of the function.
Definition: SelectionDAG.h:516
llvm::AMDGPUISD::BUFFER_ATOMIC_AND
@ BUFFER_ATOMIC_AND
Definition: AMDGPUISelLowering.h:517
llvm::MVT::i32
@ i32
Definition: MachineValueType.h:46
llvm::SDValue
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
Definition: SelectionDAGNodes.h:138
llvm::AMDGPUTargetLowering::performMulhsCombine
SDValue performMulhsCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3460
llvm::AMDGPUISD::BUFFER_ATOMIC_XOR
@ BUFFER_ATOMIC_XOR
Definition: AMDGPUISelLowering.h:519
llvm::AMDGPUTargetLowering::performIntrinsicWOChainCombine
SDValue performIntrinsicWOChainCombine(SDNode *N, DAGCombinerInfo &DCI) const
Definition: AMDGPUISelLowering.cpp:3104
llvm::AMDGPUISD::TBUFFER_LOAD_FORMAT
@ TBUFFER_LOAD_FORMAT
Definition: AMDGPUISelLowering.h:489
llvm::AMDGPUTargetLowering::LowerFROUND
SDValue LowerFROUND(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2285
llvm::AMDGPUISD::FMUL_LEGACY
@ FMUL_LEGACY
Definition: AMDGPUISelLowering.h:412
llvm::AMDGPUTargetLowering::getSplitDestVTs
std::pair< EVT, EVT > getSplitDestVTs(const EVT &VT, SelectionDAG &DAG) const
Split a vector type into two parts.
Definition: AMDGPUISelLowering.cpp:1536
llvm::AMDGPUISD::CVT_PKRTZ_F16_F32
@ CVT_PKRTZ_F16_F32
Definition: AMDGPUISelLowering.h:453
llvm::AMDGPUTargetLowering::ShouldShrinkFPConstant
bool ShouldShrinkFPConstant(EVT VT) const override
If true, then instruction selection should seek to shrink the FP constant of the specified type to a ...
Definition: AMDGPUISelLowering.cpp:760
llvm::AMDGPUISD::BRANCH_COND
@ BRANCH_COND
Definition: AMDGPUISelLowering.h:341
llvm::AMDGPUISD::UMIN3
@ UMIN3
Definition: AMDGPUISelLowering.h:393
llvm::AMDGPUTargetLowering::PerformDAGCombine
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override
This method will be invoked for all target nodes and for any target-independent nodes that the target...
Definition: AMDGPUISelLowering.cpp:4012
llvm::MachineFrameInfo
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
Definition: MachineFrameInfo.h:107
llvm::AMDGPUTargetLowering::LowerSINT_TO_FP
SDValue LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:2604
llvm::AMDGPUISD::BUFFER_LOAD_UBYTE
@ BUFFER_LOAD_UBYTE
Definition: AMDGPUISelLowering.h:498
llvm::AMDGPUISD::FRACT
@ FRACT
Definition: AMDGPUISelLowering.h:364
llvm::AMDGPUISD::FMAX3
@ FMAX3
Definition: AMDGPUISelLowering.h:388
llvm::AMDGPUISD::MAD_I64_I32
@ MAD_I64_I32
Definition: AMDGPUISelLowering.h:433
llvm::AMDGPUISD::BUFFER_LOAD_FORMAT_D16
@ BUFFER_LOAD_FORMAT_D16
Definition: AMDGPUISelLowering.h:503
llvm::AMDGPUTargetLowering::WidenOrSplitVectorLoad
SDValue WidenOrSplitVectorLoad(SDValue Op, SelectionDAG &DAG) const
Widen a suitably aligned v3 load.
Definition: AMDGPUISelLowering.cpp:1626
llvm::ISD::FIRST_TARGET_MEMORY_OPCODE
static const int FIRST_TARGET_MEMORY_OPCODE
FIRST_TARGET_MEMORY_OPCODE - Target-specific pre-isel operations which do not reference a specific me...
Definition: ISDOpcodes.h:1261
N
#define N
llvm::AMDGPUTargetLowering::aggressivelyPreferBuildVectorSources
bool aggressivelyPreferBuildVectorSources(EVT VecVT) const override
Definition: AMDGPUISelLowering.cpp:905
llvm::AMDGPUTargetLowering::getLoHalf64
SDValue getLoHalf64(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1516
llvm::AMDGPUTargetLowering::LowerCall
SDValue LowerCall(CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower calls into the specified DAG.
Definition: AMDGPUISelLowering.cpp:1260
llvm::AMDGPUTargetLowering::stripBitcast
static SDValue stripBitcast(SDValue Val)
Definition: AMDGPUISelLowering.h:147
llvm::AMDGPUISD::COS_HW
@ COS_HW
Definition: AMDGPUISelLowering.h:383
llvm::MipsISD::Ins
@ Ins
Definition: MipsISelLowering.h:157
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:43
llvm::AMDGPUISD::FFBH_U32
@ FFBH_U32
Definition: AMDGPUISelLowering.h:423
llvm::SDValue::getOpcode
unsigned getOpcode() const
Definition: SelectionDAGNodes.h:1117
llvm::AMDGPUTargetLowering::isLoadBitCastBeneficial
bool isLoadBitCastBeneficial(EVT, EVT, const SelectionDAG &DAG, const MachineMemOperand &MMO) const final
Return true if the following transform is beneficial: fold (conv (load x)) -> (load (conv*)x) On arch...
Definition: AMDGPUISelLowering.cpp:804
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::TargetLoweringBase::Enabled
@ Enabled
Definition: TargetLowering.h:491
llvm::AMDGPUISD::CALL
@ CALL
Definition: AMDGPUISelLowering.h:345
llvm::AMDGPUISD::BUFFER_STORE_BYTE
@ BUFFER_STORE_BYTE
Definition: AMDGPUISelLowering.h:506
llvm::AMDGPUTargetLowering::getSqrtEstimate
SDValue getSqrtEstimate(SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps, bool &UseOneConstNR, bool Reciprocal) const override
Hooks for building estimates in place of slower divisions and square roots.
Definition: AMDGPUISelLowering.cpp:4482
llvm::AMDGPUTargetLowering::LowerDYNAMIC_STACKALLOC
SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1265
llvm::AMDGPUTargetLowering::ComputeNumSignBitsForTargetNode
unsigned ComputeNumSignBitsForTargetNode(SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth=0) const override
This method can be implemented by targets that want to expose additional information about sign bits ...
Definition: AMDGPUISelLowering.cpp:4663
llvm::AMDGPUTargetLowering::SplitVectorStore
SDValue SplitVectorStore(SDValue Op, SelectionDAG &DAG) const
Split a vector store into 2 stores of half the vector.
Definition: AMDGPUISelLowering.cpp:1660
llvm::AMDGPUTargetLowering::LowerSTORE
SDValue LowerSTORE(SDValue Op, SelectionDAG &DAG) const
llvm::AMDGPUISD::BUFFER_STORE
@ BUFFER_STORE
Definition: AMDGPUISelLowering.h:505
llvm::AMDGPUISD::DWORDADDR
@ DWORDADDR
Definition: AMDGPUISelLowering.h:363
llvm::AMDGPUTargetLowering::getEquivalentMemType
static EVT getEquivalentMemType(LLVMContext &Context, EVT VT)
Definition: AMDGPUISelLowering.cpp:38
llvm::AMDGPUISD::DENORM_MODE
@ DENORM_MODE
Definition: AMDGPUISelLowering.h:375
llvm::AMDGPUTargetLowering::isFAbsFree
bool isFAbsFree(EVT VT) const override
Return true if an fabs operation is free to the point where it is never worthwhile to replace it with...
Definition: AMDGPUISelLowering.cpp:884
llvm::AMDGPUISD::RCP_IFLAG
@ RCP_IFLAG
Definition: AMDGPUISelLowering.h:411
llvm::AMDGPUISD::RETURN_TO_EPILOG
@ RETURN_TO_EPILOG
Definition: AMDGPUISelLowering.h:358
llvm::AMDGPUTargetLowering::ImplicitParameter
ImplicitParameter
Definition: AMDGPUISelLowering.h:314
llvm::AMDGPUISD::ATOMIC_INC
@ ATOMIC_INC
Definition: AMDGPUISelLowering.h:493
llvm::AMDGPUMachineFunction
Definition: AMDGPUMachineFunction.h:20
llvm::AMDGPUISD::BUFFER_ATOMIC_CSUB
@ BUFFER_ATOMIC_CSUB
Definition: AMDGPUISelLowering.h:523
llvm::AMDGPUISD::BFE_U32
@ BFE_U32
Definition: AMDGPUISelLowering.h:419
llvm::AMDGPUISD::CONST_DATA_PTR
@ CONST_DATA_PTR
Pointer to the start of the shader's constant data.
Definition: AMDGPUISelLowering.h:473
llvm::AMDGPUISD::TRAP
@ TRAP
Definition: AMDGPUISelLowering.h:347
llvm::TargetLoweringBase::SelectSupportKind
SelectSupportKind
Enum that describes what type of support for selects the target has.
Definition: TargetLowering.h:238
llvm::AMDGPUISD::RET_FLAG
@ RET_FLAG
Definition: AMDGPUISelLowering.h:361
llvm::AMDGPUTargetLowering::LowerEXTRACT_SUBVECTOR
SDValue LowerEXTRACT_SUBVECTOR(SDValue Op, SelectionDAG &DAG) const
Definition: AMDGPUISelLowering.cpp:1407
llvm::AMDGPUTargetLowering::getVectorIdxTy
MVT getVectorIdxTy(const DataLayout &) const override
Returns the type to be used for the index operand of: ISD::INSERT_VECTOR_ELT, ISD::EXTRACT_VECTOR_ELT...
Definition: AMDGPUISelLowering.cpp:742
llvm::AMDGPUISD::DUMMY_CHAIN
@ DUMMY_CHAIN
Definition: AMDGPUISelLowering.h:476
llvm::AMDGPUTargetLowering::split64BitValue
std::pair< SDValue, SDValue > split64BitValue(SDValue Op, SelectionDAG &DAG) const
Return 64-bit value Op as two 32-bit integers.
Definition: AMDGPUISelLowering.cpp:1502
llvm::AMDGPUISD::LOAD_D16_LO
@ LOAD_D16_LO
Definition: AMDGPUISelLowering.h:479
llvm::AMDGPUTargetLowering::hasDefinedInitializer
static bool hasDefinedInitializer(const GlobalValue *GV)
Definition: AMDGPUISelLowering.cpp:1335
llvm::AMDGPUTargetLowering::PostISelFolding
virtual SDNode * PostISelFolding(MachineSDNode *N, SelectionDAG &DAG) const =0
llvm::AMDGPUISD::CVT_F32_UBYTE3
@ CVT_F32_UBYTE3
Definition: AMDGPUISelLowering.h:449
llvm::AMDGPUTargetLowering::FIRST_IMPLICIT
@ FIRST_IMPLICIT
Definition: AMDGPUISelLowering.h:315
llvm::LLT
Definition: LowLevelTypeImpl.h:40
llvm::AMDGPUTargetLowering::isCheapToSpeculateCttz
bool isCheapToSpeculateCttz() const override
Return true if it is cheap to speculate a call to intrinsic cttz.
Definition: AMDGPUISelLowering.cpp:829