[llvm] [RISCV][GISel] Add support for G_IS_FPCLASS in F and D extensions (PR #72000)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 14:58:14 PST 2023


mshockwave wrote:

Now the legalizer generates a `RISCV::G_FCLASS` instruction that will reuse the codegen patterns from `RISCVISD::FPCLASS`. 

Note that RISCV's GISel currently lacks patterns to optimize the cases shown in the `is_fpclass_f*_onehot` and `is_fpclass_f*_one` functions. Namely, cases where FCLASS mask only has a single bit and FCLASS mask == 1.
But I still keep those cases in the test files so that it will be more obvious when those optimizations are landed in the future. 

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


More information about the llvm-commits mailing list