[llvm] [WebAssembly][GlobalISel] Add legalization & selection of most integer ops (PR #190234)

Demetrius Kanios via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 21:02:28 PDT 2026


QuantumSegfault wrote:

> I’m not very familiar with GlobalISel yet, but I’d still be happy to help if there’s a useful way I can contribute. Is there anything in particular I could review or look into?

Cool.

Well, it all depends where you want to focus your efforts. If you just want to review, then your role would be mainly verifying the tests and results, rather (which requires some GISel knowledge, but not terribly much). You'll note the massive size of this PR in particular: nearly all TESTS. Most of is mechnical, tedious tests trying to test every instruction at every stage fairly thoroughly. Would not be surprised if I made a mistake somewhere. Eyes there would be appreciated, but I don't think reading them will be any more engaging then writing them was :/

However, if you are interested in contributing/writing, I would suggest familiarizing yourself with #157161, which is my (at the time) working draft. Also, compare it to other implementations, AArch, MIPS, RISCV (others?). Compare and contrast to get a feel for how it (GISel) works. I suppose https://llvm.org/docs/GlobalISel/index.html is also a good starting point to get a feel for it compared to ISelDAG and FastISel.

>From there it depends on what you want to focus on. I think one high value area you could contribute to is vectors/SIMD. My knowledge in the area isn't good. While I focus on the basics and scalars, you could start working in vectors (both scalarization and actual SIMD128 support). Since that's it's own crazy little world.

Alternatively, more immediately, one of us can start work on memory (G_GLOBAL_VALUE, G_LOAD, G_STORE, G_FRAME_INDEX) while the other deals with (loosely) control flow related instructions (G_PHI, G_SELECT, G_JUMP_TABLE, G_BRJT, G_ICMP). I'd say floating point ops, but I'm holding out for #188502 in hopes it can simplify that matter.

--------

I think SIMD is the best use of your time. Something I'm not already familiar with and basically just have to copy over (+ tests -_-).

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


More information about the llvm-commits mailing list