Using fastcc with ZFINX

I have a C file, much reduced from a newlib source file, for which Clang generates fastcc calls.

Code generation crashes using the ZFINX extension with -Os (clang -Os -march=rv32im_zfinx).

RISCVISelLowering.cpp RISCV::CC_RISCV_FastCC allocates an F register for an argument. The F registers do not exist under ZFINX. Then copyPhysReg reaches its llvm_unreachable().

ABI is ILP32.

I can’t find an open github issue or patch. Is this a work in progress, or a bug?

I think its a bug. Please file.

Thanks, created Extension zfinx does not work with fastcc · Issue #63917 · llvm/llvm-project · GitHub.