[PATCH] D120130: [RISCV] Fix zfinx test error in rust

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 07:26:45 PST 2022


jrtc27 added a comment.

I'm unconvinced this is quite the right fix for the bug. I agree we need this code, but I disagree that this code should be needed when Zfinx isn't in use. Without Zfinx, we should never have GFPR* be legal in the first place, surely?



================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:260
                                  MCRegister SrcReg, bool KillSrc) const {
   if (RISCV::GPRRegClass.contains(DstReg, SrcReg)) {
     BuildMI(MBB, MBBI, DL, get(RISCV::ADDI), DstReg)
----------------
Surely for floats in GPRs we should just use a GPR move? It'll compress better and avoids unnecessary FPU usage.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120130/new/

https://reviews.llvm.org/D120130



More information about the llvm-commits mailing list