86 unsigned SubIdx)
const;
88 bool constrainCopyLikeIntrin(
MachineInstr &
MI,
unsigned NewOpc)
const;
125 bool selectDSAppendConsume(
MachineInstr &
MI,
bool IsAppend)
const;
131 bool selectG_INTRINSIC_W_SIDE_EFFECTS(
MachineInstr &
I)
const;
163 std::pair<Register, unsigned> selectVOP3ModsImpl(
Register Src,
164 bool IsCanonicalizing =
true,
165 bool AllowAbs =
true,
166 bool OpSel =
false)
const;
167 std::pair<Register, unsigned> selectVOP3PModsF32Impl(
Register Src)
const;
171 bool ForceVGPR =
false)
const;
197 std::pair<Register, unsigned>
199 bool IsDOT =
false,
bool NoOpSel0 =
false)
const;
202 bool NoOpSel0 =
false)
const;
247 bool IsSMEM =
false)
const;
249 int64_t *
Offset,
bool *ScaleOffset)
const;
259 std::pair<Register, int64_t>
272 bool NeedIOffset =
true)
const;
299 bool isDSOffset2Legal(
Register Base, int64_t Offset0, int64_t Offset1,
300 unsigned Size)
const;
301 bool isFlatScratchBaseLegal(
Register Addr)
const;
302 bool isFlatScratchBaseLegalSV(
Register Addr)
const;
303 bool isFlatScratchBaseLegalSVImm(
Register Addr)
const;
305 std::pair<Register, int64_t>
316 std::pair<Register, int64_t> selectDSReadWrite2Impl(
MachineOperand &Root,
317 unsigned size)
const;
321 std::tuple<Register, int64_t, bool>
322 getPtrBaseWithConstantOffset(
Register Root,
328 struct MUBUFAddressData {
333 bool shouldUseAddr64(MUBUFAddressData AddrData)
const;
335 void splitIllegalMUBUFOffset(MachineIRBuilder &
B,
336 Register &SOffset, int64_t &ImmOffset)
const;
338 MUBUFAddressData parseMUBUFAddress(
Register Src)
const;
340 bool selectMUBUFAddr64Impl(MachineOperand &Root,
Register &VAddr,
344 bool selectMUBUFOffsetImpl(MachineOperand &Root,
Register &RSrcReg,
348 selectBUFSOffset(MachineOperand &Root)
const;
351 selectMUBUFAddr64(MachineOperand &Root)
const;
354 selectMUBUFOffset(MachineOperand &Root)
const;
360 std::pair<Register, unsigned> selectVOP3PMadMixModsImpl(MachineOperand &Root,
361 bool &Matched)
const;
367 void renderTruncTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
369 void renderPrefetchLen(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
371 void renderZextBoolTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
374 void renderOpSelTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
377 void renderSrcAndDstSelToOpSelXForm_0_0(MachineInstrBuilder &MIB,
378 const MachineInstr &
MI,
381 void renderSrcAndDstSelToOpSelXForm_0_1(MachineInstrBuilder &MIB,
382 const MachineInstr &
MI,
385 void renderSrcAndDstSelToOpSelXForm_1_0(MachineInstrBuilder &MIB,
386 const MachineInstr &
MI,
389 void renderSrcAndDstSelToOpSelXForm_1_1(MachineInstrBuilder &MIB,
390 const MachineInstr &
MI,
393 void renderDstSelToOpSelXForm(MachineInstrBuilder &MIB,
394 const MachineInstr &
MI,
int OpIdx)
const;
396 void renderSrcSelToOpSelXForm(MachineInstrBuilder &MIB,
397 const MachineInstr &
MI,
int OpIdx)
const;
399 void renderSrcAndDstSelToOpSelXForm_2_0(MachineInstrBuilder &MIB,
400 const MachineInstr &
MI,
403 void renderDstSelToOpSel3XFormXForm(MachineInstrBuilder &MIB,
404 const MachineInstr &
MI,
int OpIdx)
const;
406 void renderNegateImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
409 void renderBitcastFPImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
412 void renderBitcastFPImm32(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
414 renderBitcastFPImm(MIB,
MI, OpIdx);
416 void renderBitcastFPImm64(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
418 renderBitcastFPImm(MIB,
MI, OpIdx);
421 void renderCountTrailingOnesImm(MachineInstrBuilder &MIB,
422 const MachineInstr &
MI,
int OpIdx)
const;
423 void renderExtractCPol(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
425 void renderExtractSWZ(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
427 void renderExtractCpolSetGLC(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
430 void renderFPPow2ToExponent(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
433 void renderRoundMode(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
436 void renderVOP3PModsNeg(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
438 void renderVOP3PModsNegs(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
440 void renderVOP3PModsNegAbs(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
443 void renderPrefetchLoc(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
446 void renderScaledMAIIntrinsicOperand(MachineInstrBuilder &MIB,
447 const MachineInstr &
MI,
int OpIdx)
const;
449 bool isInlineImmediate(
const APInt &
Imm)
const;
450 bool isInlineImmediate(
const APFloat &
Imm)
const;
454 bool isUnneededShiftMask(
const MachineInstr &
MI,
unsigned ShAmtBits)
const;
472 const SIInstrInfo &TII;
473 const SIRegisterInfo &TRI;
474 const AMDGPURegisterBankInfo &RBI;
475 const GCNSubtarget &STI;
476#define GET_GLOBALISEL_PREDICATES_DECL
477#define AMDGPUSubtarget GCNSubtarget
478#include "AMDGPUGenGlobalISel.inc"
479#undef GET_GLOBALISEL_PREDICATES_DECL
480#undef AMDGPUSubtarget
482#define GET_GLOBALISEL_TEMPORARIES_DECL
483#include "AMDGPUGenGlobalISel.inc"
484#undef GET_GLOBALISEL_TEMPORARIES_DECL