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;
162 std::pair<Register, unsigned> selectVOP3ModsImpl(
Register Src,
163 bool IsCanonicalizing =
true,
164 bool AllowAbs =
true,
165 bool OpSel =
false)
const;
169 bool ForceVGPR =
false)
const;
192 std::pair<Register, unsigned>
194 bool IsDOT =
false)
const;
196 selectVOP3PRetHelper(
MachineOperand &Root,
bool IsDOT =
false)
const;
231 bool IsSigned)
const;
233 int64_t *
Offset,
bool *ScaleOffset)
const;
243 std::pair<Register, int> selectFlatOffsetImpl(
MachineOperand &Root,
255 bool NeedIOffset =
true)
const;
282 bool isDSOffset2Legal(
Register Base, int64_t Offset0, int64_t Offset1,
283 unsigned Size)
const;
284 bool isFlatScratchBaseLegal(
Register Addr)
const;
285 bool isFlatScratchBaseLegalSV(
Register Addr)
const;
286 bool isFlatScratchBaseLegalSVImm(
Register Addr)
const;
288 std::pair<Register, unsigned>
299 std::pair<Register, unsigned> selectDSReadWrite2Impl(
MachineOperand &Root,
300 unsigned size)
const;
304 std::tuple<Register, int64_t, bool>
305 getPtrBaseWithConstantOffset(
Register Root,
311 struct MUBUFAddressData {
316 bool shouldUseAddr64(MUBUFAddressData AddrData)
const;
318 void splitIllegalMUBUFOffset(MachineIRBuilder &
B,
319 Register &SOffset, int64_t &ImmOffset)
const;
321 MUBUFAddressData parseMUBUFAddress(
Register Src)
const;
323 bool selectMUBUFAddr64Impl(MachineOperand &Root,
Register &VAddr,
327 bool selectMUBUFOffsetImpl(MachineOperand &Root,
Register &RSrcReg,
331 selectBUFSOffset(MachineOperand &Root)
const;
334 selectMUBUFAddr64(MachineOperand &Root)
const;
337 selectMUBUFOffset(MachineOperand &Root)
const;
343 std::pair<Register, unsigned> selectVOP3PMadMixModsImpl(MachineOperand &Root,
344 bool &Matched)
const;
348 void renderTruncImm32(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
349 int OpIdx = -1)
const;
351 void renderTruncTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
353 void renderZextBoolTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
356 void renderOpSelTImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
359 void renderSrcAndDstSelToOpSelXForm_0_0(MachineInstrBuilder &MIB,
360 const MachineInstr &
MI,
363 void renderSrcAndDstSelToOpSelXForm_0_1(MachineInstrBuilder &MIB,
364 const MachineInstr &
MI,
367 void renderSrcAndDstSelToOpSelXForm_1_0(MachineInstrBuilder &MIB,
368 const MachineInstr &
MI,
371 void renderSrcAndDstSelToOpSelXForm_1_1(MachineInstrBuilder &MIB,
372 const MachineInstr &
MI,
375 void renderDstSelToOpSelXForm(MachineInstrBuilder &MIB,
376 const MachineInstr &
MI,
int OpIdx)
const;
378 void renderSrcSelToOpSelXForm(MachineInstrBuilder &MIB,
379 const MachineInstr &
MI,
int OpIdx)
const;
381 void renderSrcAndDstSelToOpSelXForm_2_0(MachineInstrBuilder &MIB,
382 const MachineInstr &
MI,
385 void renderDstSelToOpSel3XFormXForm(MachineInstrBuilder &MIB,
386 const MachineInstr &
MI,
int OpIdx)
const;
388 void renderNegateImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
391 void renderBitcastFPImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
394 void renderBitcastFPImm32(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
396 renderBitcastFPImm(MIB,
MI,
OpIdx);
398 void renderBitcastFPImm64(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
400 renderBitcastFPImm(MIB,
MI,
OpIdx);
403 void renderPopcntImm(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
405 void renderExtractCPol(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
407 void renderExtractSWZ(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
409 void renderExtractCpolSetGLC(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
412 void renderFrameIndex(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
415 void renderFPPow2ToExponent(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
418 void renderRoundMode(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
421 void renderVOP3PModsNeg(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
423 void renderVOP3PModsNegs(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
425 void renderVOP3PModsNegAbs(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
428 void renderPrefetchLoc(MachineInstrBuilder &MIB,
const MachineInstr &
MI,
431 void renderScaledMAIIntrinsicOperand(MachineInstrBuilder &MIB,
432 const MachineInstr &
MI,
int OpIdx)
const;
434 bool isInlineImmediate(
const APInt &Imm)
const;
435 bool isInlineImmediate(
const APFloat &Imm)
const;
439 bool isUnneededShiftMask(
const MachineInstr &
MI,
unsigned ShAmtBits)
const;
457 const SIInstrInfo &TII;
458 const SIRegisterInfo &TRI;
459 const AMDGPURegisterBankInfo &RBI;
460 const AMDGPUTargetMachine &TM;
461 const GCNSubtarget &STI;
462#define GET_GLOBALISEL_PREDICATES_DECL
463#define AMDGPUSubtarget GCNSubtarget
464#include "AMDGPUGenGlobalISel.inc"
465#undef GET_GLOBALISEL_PREDICATES_DECL
466#undef AMDGPUSubtarget
468#define GET_GLOBALISEL_TEMPORARIES_DECL
469#include "AMDGPUGenGlobalISel.inc"
470#undef GET_GLOBALISEL_TEMPORARIES_DECL