Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ class AMDGPUAsmParser : public MCTargetAsmParser {
unsigned getConstantBusLimit(unsigned Opcode) const;
bool usesConstantBus(const MCInst &Inst, unsigned OpIdx);
bool isInlineConstant(const MCInst &Inst, unsigned OpIdx) const;
unsigned findImplicitSGPRReadInVOP(const MCInst &Inst) const;
MCRegister findImplicitSGPRReadInVOP(const MCInst &Inst) const;

bool isSupportedMnemo(StringRef Mnemo,
const FeatureBitset &FBS);
Expand Down Expand Up @@ -3665,7 +3665,8 @@ StringRef AMDGPUAsmParser::getMatchedVariantName() const {
return "";
}

unsigned AMDGPUAsmParser::findImplicitSGPRReadInVOP(const MCInst &Inst) const {
MCRegister
AMDGPUAsmParser::findImplicitSGPRReadInVOP(const MCInst &Inst) const {
const MCInstrDesc &Desc = MII.get(Inst.getOpcode());
for (MCPhysReg Reg : Desc.implicit_uses()) {
switch (Reg) {
Expand All @@ -3679,7 +3680,7 @@ unsigned AMDGPUAsmParser::findImplicitSGPRReadInVOP(const MCInst &Inst) const {
break;
}
}
return AMDGPU::NoRegister;
return MCRegister();
}

// NB: This code is correct only when used to check constant
Expand Down Expand Up @@ -3854,9 +3855,9 @@ bool AMDGPUAsmParser::validateConstantBusLimitations(
LiteralSize = 4;
}

SmallDenseSet<unsigned> SGPRsUsed;
unsigned SGPRUsed = findImplicitSGPRReadInVOP(Inst);
if (SGPRUsed != AMDGPU::NoRegister) {
SmallDenseSet<MCRegister> SGPRsUsed;
MCRegister SGPRUsed = findImplicitSGPRReadInVOP(Inst);
if (SGPRUsed) {
SGPRsUsed.insert(SGPRUsed);
++ConstantBusUseCount;
}
Expand Down
Loading