[llvm] [SPIR-V] Lower llvm.x.with.overflow intrinsics (PR #95012)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 12:14:45 PDT 2024


efriedma-quic wrote:

> Unfortunately, the problem is not as simple to solve, this patch simply extends the existing expansion we had for umul for the remaining operations.

I'd prefer to solve this sooner rather than later.  I'm not so much worried about the size of this particular patch, but this seems like it's going to be a continual maintenance burden for target-independent changes.

> We generate InsertValue instructions which we directly replace in the SPIRVEmitIntrinsics. We want all of these to "survive" IRTranslation.

Probably the SPIRV backend should be doing calling convention lowering inside GlobalISel, instead of trying to do it as a pre-pass.  Calling convention lowering is all target-specific anyway, so you can generate whatever you need.

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


More information about the llvm-commits mailing list