[llvm] [RISCV][GISel] Legalize G_IS_FPCLASS for fp128 (PR #195738)

Gábor Spaits via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 12:49:24 PDT 2026


================

----------------
spaits wrote:

I think yes, they do.

It is good to see what is what stages responsibility and how does that stage fulfill that. For example here it is good to see that during legalization `G_IS_FPCLASS` with the `s128` parameter goes away and gets replaced with other instructions. If in the future the lowering of this OP is broken, it will exactly show that it is a legalization issue. The developer won't have to check the end-to-end test and find out what stage brakes what. Or if something is broken in a later stage, we can see that legalization is still intact, the issue is not in the lowering.

At the company I work at we only use GlobalISel for our downstream targets and we write tests for each stage (or step?) of GlobalISel. We love this extra traceability. It is an important selling point of GISel for us.

(Personally, I only have meaningful experience with GlobalISel. I looked a bit more into SelectionDAG the last week, to test my quad-precision float ABI patch, I was surprised that all the test were end-to-end. There is no way to verify intermediate results after the stages. For that reason I also couldn't really test that patch for SelectionDAG, since the end-to-end tests there would require other legalization and inst. selection changes, that are kind of irrelevant just from the ABI standpoint.)

So as a summary I think both per-stage and end-to-end tests make sense. And these per-stage tests are a really nice feature of GlobalISel we should live with.

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


More information about the llvm-commits mailing list