diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -4049,8 +4049,8 @@ unsigned Sub = MRI->getSubReg(Op.getReg(), AMDGPU::sub0); auto Reg = Sub ? Sub : Op.getReg(); - const MCRegisterClass &AGRP32 = MRI->getRegClass(AMDGPU::AGPR_32RegClassID); - return AGRP32.contains(Reg) ? 1 : 0; + const MCRegisterClass &AGPR32 = MRI->getRegClass(AMDGPU::AGPR_32RegClassID); + return AGPR32.contains(Reg) ? 1 : 0; } bool AMDGPUAsmParser::validateAGPRLdSt(const MCInst &Inst) const { @@ -4089,8 +4089,8 @@ return true; const MCRegisterInfo *MRI = getMRI(); - const MCRegisterClass &VGRP32 = MRI->getRegClass(AMDGPU::VGPR_32RegClassID); - const MCRegisterClass &AGRP32 = MRI->getRegClass(AMDGPU::AGPR_32RegClassID); + const MCRegisterClass &VGPR32 = MRI->getRegClass(AMDGPU::VGPR_32RegClassID); + const MCRegisterClass &AGPR32 = MRI->getRegClass(AMDGPU::AGPR_32RegClassID); for (unsigned I = 0, E = Inst.getNumOperands(); I != E; ++I) { const MCOperand &Op = Inst.getOperand(I); if (!Op.isReg()) @@ -4100,9 +4100,9 @@ if (!Sub) continue; - if (VGRP32.contains(Sub) && ((Sub - AMDGPU::VGPR0) & 1)) + if (VGPR32.contains(Sub) && ((Sub - AMDGPU::VGPR0) & 1)) return false; - if (AGRP32.contains(Sub) && ((Sub - AMDGPU::AGPR0) & 1)) + if (AGPR32.contains(Sub) && ((Sub - AMDGPU::AGPR0) & 1)) return false; } @@ -4122,12 +4122,12 @@ return true; const MCRegisterInfo *MRI = getMRI(); - const MCRegisterClass &VGRP32 = MRI->getRegClass(AMDGPU::VGPR_32RegClassID); + const MCRegisterClass &VGPR32 = MRI->getRegClass(AMDGPU::VGPR_32RegClassID); int Data0Pos = AMDGPU::getNamedOperandIdx(Inst.getOpcode(), AMDGPU::OpName::data0); assert(Data0Pos != -1); auto Reg = Inst.getOperand(Data0Pos).getReg(); - auto RegIdx = Reg - (VGRP32.contains(Reg) ? AMDGPU::VGPR0 : AMDGPU::AGPR0); + auto RegIdx = Reg - (VGPR32.contains(Reg) ? AMDGPU::VGPR0 : AMDGPU::AGPR0); if (RegIdx & 1) { SMLoc RegLoc = getRegLoc(Reg, Operands); Error(RegLoc, "vgpr must be even aligned");