Skip to content

Commit

Permalink
[RISCV] Remove unused method isUImm5NonZero() from RISCVAsmParser.cpp…
Browse files Browse the repository at this point in the history
…. NFC

The operand predicate that used this has been gone for a while.
  • Loading branch information
topperc committed Jan 4, 2021
1 parent 09b3f3f commit 94257d1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Expand Up @@ -514,16 +514,6 @@ struct RISCVOperand : public MCParsedAsmOperand {
return IsConstantImm && isUInt<5>(Imm) && VK == RISCVMCExpr::VK_RISCV_None;
}

bool isUImm5NonZero() const {
int64_t Imm;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
if (!isImm())
return false;
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
return IsConstantImm && isUInt<5>(Imm) && (Imm != 0) &&
VK == RISCVMCExpr::VK_RISCV_None;
}

bool isSImm5() const {
if (!isImm())
return false;
Expand All @@ -540,7 +530,7 @@ struct RISCVOperand : public MCParsedAsmOperand {
int64_t Imm;
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
return IsConstantImm && isInt<6>(Imm) &&
VK == RISCVMCExpr::VK_RISCV_None;
VK == RISCVMCExpr::VK_RISCV_None;
}

bool isSImm6NonZero() const {
Expand Down

0 comments on commit 94257d1

Please sign in to comment.