Skip to content

[RISCV] Fix FP64 DinX R Regclass #116688

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 2 commits into from
Nov 19, 2024
Merged

Conversation

lenary
Copy link
Member

@lenary lenary commented Nov 18, 2024

This was a typo in #112983 that didn't cause build failures but is still wrong.


I have half a PR to merge the GPR and GPRF64 classes, but this should go in before that (rebasing that PR is how I noticed this problem)

This was a typo in llvm#112983 that didn't cause build
failures but is still wrong.
@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2024

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

Author: Sam Elliott (lenary)

Changes

This was a typo in llvm/llvm-project#112983 that didn't cause build failures but is still wrong.


I have half a PR to merge the GPR and GPRF64 classes, but this should go in before that (rebasing that PR is how I noticed this problem)


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

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+1-1)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 35040734d71dfa..556b337da4d68f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -20531,7 +20531,7 @@ RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
       break;
     case 'R':
       if (VT == MVT::f64 && !Subtarget.is64Bit() && Subtarget.hasStdExtZdinx())
-        return std::make_pair(0U, &RISCV::GPRF64PairCRegClass);
+        return std::make_pair(0U, &RISCV::GPRF64PairNoX0RegClass);
       return std::make_pair(0U, &RISCV::GPRPairNoX0RegClass);
     default:
       break;

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

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

LGTM

@lenary
Copy link
Member Author

lenary commented Nov 19, 2024

I missed that this changed the allocation in the test. I'm going to merge with the test I just fixed.

@lenary lenary merged commit c4030c8 into llvm:main Nov 19, 2024
5 of 6 checks passed
@lenary lenary deleted the pr/fix-fp64-dinx-pair-regclass branch November 19, 2024 12:44
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.

3 participants