@@ -4771,7 +4771,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
4771
4771
if (!MRI.isSSA () && MI.isCopy ())
4772
4772
return verifyCopy (MI, MRI, ErrInfo);
4773
4773
4774
- if (SIInstrInfo::isGenericOpcode (MI. getOpcode () ))
4774
+ if (SIInstrInfo::isGenericOpcode (Opcode ))
4775
4775
return true ;
4776
4776
4777
4777
int Src0Idx = AMDGPU::getNamedOperandIdx (Opcode, AMDGPU::OpName::src0);
@@ -5037,14 +5037,13 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
5037
5037
}
5038
5038
5039
5039
// Verify MIMG / VIMAGE / VSAMPLE
5040
- if (isImage (MI. getOpcode () ) && !MI.mayStore ()) {
5040
+ if (isImage (Opcode ) && !MI.mayStore ()) {
5041
5041
// Ensure that the return type used is large enough for all the options
5042
5042
// being used TFE/LWE require an extra result register.
5043
5043
const MachineOperand *DMask = getNamedOperand (MI, AMDGPU::OpName::dmask);
5044
5044
if (DMask) {
5045
5045
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);
5048
5047
const MachineOperand *TFE = getNamedOperand (MI, AMDGPU::OpName::tfe);
5049
5048
const MachineOperand *LWE = getNamedOperand (MI, AMDGPU::OpName::lwe);
5050
5049
const MachineOperand *D16 = getNamedOperand (MI, AMDGPU::OpName::d16);
@@ -5058,7 +5057,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
5058
5057
RegCount += 1 ;
5059
5058
5060
5059
const uint32_t DstIdx =
5061
- AMDGPU::getNamedOperandIdx (MI. getOpcode () , AMDGPU::OpName::vdata);
5060
+ AMDGPU::getNamedOperandIdx (Opcode , AMDGPU::OpName::vdata);
5062
5061
const MachineOperand &Dst = MI.getOperand (DstIdx);
5063
5062
if (Dst.isReg ()) {
5064
5063
const TargetRegisterClass *DstRC = getOpRegClass (MI, DstIdx);
@@ -5463,9 +5462,8 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
5463
5462
!(RI.getChannelFromSubReg (Op->getSubReg ()) & 1 );
5464
5463
};
5465
5464
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) {
5469
5467
5470
5468
if (!isAlignedReg (AMDGPU::OpName::data0)) {
5471
5469
ErrInfo = " Subtarget requires even aligned vector registers "
@@ -5483,8 +5481,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
5483
5481
}
5484
5482
}
5485
5483
5486
- if (MI.getOpcode () == AMDGPU::V_ACCVGPR_WRITE_B32_e64 &&
5487
- !ST.hasGFX90AInsts ()) {
5484
+ if (Opcode == AMDGPU::V_ACCVGPR_WRITE_B32_e64 && !ST.hasGFX90AInsts ()) {
5488
5485
const MachineOperand *Src = getNamedOperand (MI, AMDGPU::OpName::src0);
5489
5486
if (Src->isReg () && RI.isSGPRReg (MRI, Src->getReg ())) {
5490
5487
ErrInfo = " Invalid register class: "
0 commit comments