[clang] [llvm] [RISCV] Add support for quadruple-precision floating point ABIs (PR #195166)

Gábor Spaits via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 04:08:21 PDT 2026


================
@@ -143,6 +151,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
     addRegisterClass(MVT::f32, &RISCV::FPR32RegClass);
   if (Subtarget.hasStdExtD())
     addRegisterClass(MVT::f64, &RISCV::FPR64RegClass);
+  if (Subtarget.hasStdExtQ())
----------------
spaits wrote:

I have simplified your code to this:
```
long double foo(long double a) {
  return a + a;
}
```
Since I don't have a complete RISC-V toolchain at the moment, and the point of the test doesn't seem to be the `typedef` in the beginning, but rather the `foo` function.

It fails with SelectionDAG, but work with GlobalISel.

`convertLocVTToValVT` asserts: `Unexpected Custom handling.` It is weird for me that we call this function even without quad-precision ABI.

I will check why is this happening.

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


More information about the cfe-commits mailing list