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

Conversation

hchandel
Copy link
Contributor

Fix RISCVMCExpr::VK_RISCV_None which were added in #130779

which were added in llvm#130779

Change-Id: I80b8d74e1a862b482bd72cd4cd5eb4433bae8d92
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-backend-risc-v

Author: quic_hchandel (hchandel)

Changes

Fix RISCVMCExpr::VK_RISCV_None which were added in #130779


Full diff: https://github.com/llvm/llvm-project/pull/131774.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp (+6-6)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index 267d8bb1d67ba..5ac7779240148 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -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 {
@@ -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 {

Copy link
Member

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - please either get this committed asap or revert #130779 as you are breaking most buildbots at the moment

@hchandel
Copy link
Contributor Author

hchandel commented Mar 18, 2025

LGTM - please either get this committed asap or revert #130779 as you are breaking most buildbots at the moment

@RKSimon I am waiting for the checks to pass. Only one check is remaining. Should I merge this without waiting for that check?

@RKSimon
Copy link
Collaborator

RKSimon commented Mar 18, 2025

If either of the windows or linux build has already passed, a fixup like this should be good to go.

@hchandel hchandel merged commit 5d53a88 into llvm:main Mar 18, 2025
10 of 12 checks passed
@hchandel
Copy link
Contributor Author

If either of the windows or linux build has already passed, a fixup like this should be good to go.

I didn't know that. Thanks for the clarification.

@hchandel hchandel deleted the xqcibi_fix branch March 18, 2025 11:15
@RKSimon
Copy link
Collaborator

RKSimon commented Mar 18, 2025

If either of the windows or linux build has already passed, a fixup like this should be good to go.

I didn't know that. Thanks for the clarification.

Its not ideal, but either you get a minimal fix in or you should revert and start again when everything is green again. The CI checks on the original PR should have caught all of this though, which is strange.

@hchandel
Copy link
Contributor Author

Yeah, That's what I am also thinking about. #131489 which does this change landed before my PR #130779. CI checks should have caught this, but all those checks passed and I merged after approvals. Maybe my branch didn't have #131489 which somehow led to passing checks. I am not sure though.

@david-arm
Copy link
Contributor

@hchandel I have observed the same problem before. The checks run in github do not necessarily reflect reality because they are based on whatever commit your PR is based on. To work around this I normally rebase the PR downstream and run "make check-all" locally as I do not trust the github results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants