@@ -533,13 +533,13 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
533533 return get (Opcode).TSFlags & SIInstrFlags::VOP2;
534534 }
535535
536- static bool isVOP3 (const MachineInstr &MI ) {
537- return MI. getDesc () .TSFlags & SIInstrFlags::VOP3;
536+ static bool isVOP3 (const MCInstrDesc &Desc ) {
537+ return Desc .TSFlags & SIInstrFlags::VOP3;
538538 }
539539
540- bool isVOP3 (uint16_t Opcode) const {
541- return get (Opcode). TSFlags & SIInstrFlags::VOP3;
542- }
540+ static bool isVOP3 (const MachineInstr &MI) { return isVOP3 (MI. getDesc ()); }
541+
542+ bool isVOP3 ( uint16_t Opcode) const { return isVOP3 ( get (Opcode)); }
543543
544544 static bool isSDWA (const MachineInstr &MI) {
545545 return MI.getDesc ().TSFlags & SIInstrFlags::SDWA;
@@ -841,13 +841,13 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
841841 return get (Opcode).TSFlags & SIInstrFlags::VINTRP;
842842 }
843843
844- static bool isMAI (const MachineInstr &MI ) {
845- return MI. getDesc () .TSFlags & SIInstrFlags::IsMAI;
844+ static bool isMAI (const MCInstrDesc &Desc ) {
845+ return Desc .TSFlags & SIInstrFlags::IsMAI;
846846 }
847847
848- bool isMAI (uint16_t Opcode) const {
849- return get (Opcode). TSFlags & SIInstrFlags::IsMAI;
850- }
848+ static bool isMAI (const MachineInstr &MI) { return isMAI (MI. getDesc ()); }
849+
850+ bool isMAI ( uint16_t Opcode) const { return isMAI ( get (Opcode)); }
851851
852852 static bool isMFMA (const MachineInstr &MI) {
853853 return isMAI (MI) && MI.getOpcode () != AMDGPU::V_ACCVGPR_WRITE_B32_e64 &&
@@ -1174,9 +1174,14 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
11741174 return isInlineConstant (*MO.getParent (), MO.getOperandNo ());
11751175 }
11761176
1177- bool isImmOperandLegal (const MachineInstr &MI , unsigned OpNo,
1177+ bool isImmOperandLegal (const MCInstrDesc &InstDesc , unsigned OpNo,
11781178 const MachineOperand &MO) const ;
11791179
1180+ bool isImmOperandLegal (const MachineInstr &MI, unsigned OpNo,
1181+ const MachineOperand &MO) const {
1182+ return isImmOperandLegal (MI.getDesc (), OpNo, MO);
1183+ }
1184+
11801185 // / Check if this immediate value can be used for AV_MOV_B64_IMM_PSEUDO.
11811186 bool isLegalAV64PseudoImm (uint64_t Imm) const ;
11821187
0 commit comments