Skip to content

[RISCV] Change RISCVMCExpr::VK_RISCV_None to RISCVMCExpr::VK_None #131774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
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
12 changes: 6 additions & 6 deletions llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,12 +823,12 @@ struct RISCVOperand final : public MCParsedAsmOperand {
bool isSImm5NonZero() const {
if (!isImm())
return false;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_None;
int64_t Imm;
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
return IsConstantImm && Imm != 0 &&
isInt<5>(fixImmediateForRV32(Imm, isRV64Imm())) &&
VK == RISCVMCExpr::VK_RISCV_None;
VK == RISCVMCExpr::VK_None;
}

bool isSImm6() const {
Expand Down Expand Up @@ -1021,22 +1021,22 @@ struct RISCVOperand final : public MCParsedAsmOperand {
bool isSImm16NonZero() const {
if (!isImm())
return false;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_None;
int64_t Imm;
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
return IsConstantImm && Imm != 0 &&
isInt<16>(fixImmediateForRV32(Imm, isRV64Imm())) &&
VK == RISCVMCExpr::VK_RISCV_None;
VK == RISCVMCExpr::VK_None;
}

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

bool isUImm20LUI() const {
Expand Down
Loading