@@ -4771,7 +4771,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
47714771 if (!MRI.isSSA () && MI.isCopy ())
47724772 return verifyCopy (MI, MRI, ErrInfo);
47734773
4774- if (SIInstrInfo::isGenericOpcode (MI. getOpcode () ))
4774+ if (SIInstrInfo::isGenericOpcode (Opcode ))
47754775 return true ;
47764776
47774777 int Src0Idx = AMDGPU::getNamedOperandIdx (Opcode, AMDGPU::OpName::src0);
@@ -5037,14 +5037,13 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
50375037 }
50385038
50395039 // Verify MIMG / VIMAGE / VSAMPLE
5040- if (isImage (MI. getOpcode () ) && !MI.mayStore ()) {
5040+ if (isImage (Opcode ) && !MI.mayStore ()) {
50415041 // Ensure that the return type used is large enough for all the options
50425042 // being used TFE/LWE require an extra result register.
50435043 const MachineOperand *DMask = getNamedOperand (MI, AMDGPU::OpName::dmask);
50445044 if (DMask) {
50455045 uint64_t DMaskImm = DMask->getImm ();
5046- uint32_t RegCount =
5047- isGather4 (MI.getOpcode ()) ? 4 : llvm::popcount (DMaskImm);
5046+ uint32_t RegCount = isGather4 (Opcode) ? 4 : llvm::popcount (DMaskImm);
50485047 const MachineOperand *TFE = getNamedOperand (MI, AMDGPU::OpName::tfe);
50495048 const MachineOperand *LWE = getNamedOperand (MI, AMDGPU::OpName::lwe);
50505049 const MachineOperand *D16 = getNamedOperand (MI, AMDGPU::OpName::d16);
@@ -5058,7 +5057,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
50585057 RegCount += 1 ;
50595058
50605059 const uint32_t DstIdx =
5061- AMDGPU::getNamedOperandIdx (MI. getOpcode () , AMDGPU::OpName::vdata);
5060+ AMDGPU::getNamedOperandIdx (Opcode , AMDGPU::OpName::vdata);
50625061 const MachineOperand &Dst = MI.getOperand (DstIdx);
50635062 if (Dst.isReg ()) {
50645063 const TargetRegisterClass *DstRC = getOpRegClass (MI, DstIdx);
@@ -5463,9 +5462,8 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
54635462 !(RI.getChannelFromSubReg (Op->getSubReg ()) & 1 );
54645463 };
54655464
5466- if (MI.getOpcode () == AMDGPU::DS_GWS_INIT ||
5467- MI.getOpcode () == AMDGPU::DS_GWS_SEMA_BR ||
5468- MI.getOpcode () == AMDGPU::DS_GWS_BARRIER) {
5465+ if (Opcode == AMDGPU::DS_GWS_INIT || Opcode == AMDGPU::DS_GWS_SEMA_BR ||
5466+ Opcode == AMDGPU::DS_GWS_BARRIER) {
54695467
54705468 if (!isAlignedReg (AMDGPU::OpName::data0)) {
54715469 ErrInfo = " Subtarget requires even aligned vector registers "
@@ -5483,8 +5481,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
54835481 }
54845482 }
54855483
5486- if (MI.getOpcode () == AMDGPU::V_ACCVGPR_WRITE_B32_e64 &&
5487- !ST.hasGFX90AInsts ()) {
5484+ if (Opcode == AMDGPU::V_ACCVGPR_WRITE_B32_e64 && !ST.hasGFX90AInsts ()) {
54885485 const MachineOperand *Src = getNamedOperand (MI, AMDGPU::OpName::src0);
54895486 if (Src->isReg () && RI.isSGPRReg (MRI, Src->getReg ())) {
54905487 ErrInfo = " Invalid register class: "
0 commit comments