Skip to content

Commit 2914642

Browse files
authored
[AMDGPU] NFC: Add Opcode variants for TII->isMFMA* (#163874)
Adds a couple missing variants based on opcode.
1 parent d0cee69 commit 2914642

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,11 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
879879
MI.getOpcode() != AMDGPU::V_ACCVGPR_READ_B32_e64;
880880
}
881881

882+
bool isMFMA(uint16_t Opcode) const {
883+
return isMAI(Opcode) && Opcode != AMDGPU::V_ACCVGPR_WRITE_B32_e64 &&
884+
Opcode != AMDGPU::V_ACCVGPR_READ_B32_e64;
885+
}
886+
882887
static bool isDOT(const MachineInstr &MI) {
883888
return MI.getDesc().TSFlags & SIInstrFlags::IsDOT;
884889
}
@@ -895,6 +900,10 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
895900
return isMFMA(MI) || isWMMA(MI) || isSWMMAC(MI);
896901
}
897902

903+
bool isMFMAorWMMA(uint16_t Opcode) const {
904+
return isMFMA(Opcode) || isWMMA(Opcode) || isSWMMAC(Opcode);
905+
}
906+
898907
static bool isSWMMAC(const MachineInstr &MI) {
899908
return MI.getDesc().TSFlags & SIInstrFlags::IsSWMMAC;
900909
}

0 commit comments

Comments
 (0)