[llvm] [RISCV] Use correct register class for Z[df]inx inline asm (PR #71872)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 06:47:44 PST 2023


================
@@ -18370,6 +18370,10 @@ RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
       // TODO: Support fixed vectors up to XLen for P extension?
       if (VT.isVector())
         break;
+      if (VT == MVT::f32 && Subtarget.hasStdExtZfinx())
----------------
nemanjai wrote:

The simple test case for f16 and f32 doesn't cause problems because the necessary physreg copies exist, but I think it's still useful to use the right register class for the respective value.

https://github.com/llvm/llvm-project/pull/71872


More information about the llvm-commits mailing list