Currently SPIRVLowerLLVMIntrinsic.cpp maps llvm.sadd.with.overflow for scalar types i8/i16/i32/i64 only (the i8 entry was added by #3673).
Vector variants are entirely absent from the map, so any LLVM IR using e.g. llvm.sadd.with.overflow.v2i32 fails to translate.
SPIR-V supports integer vectors of 2, 3, 4, 8, and 16 components, leaving 20 vector variants uncovered: v{2,3,4,8,16}i{8,16,32,64}.
The proper fix, as noted in the review of #3673, is to replace the hand-authored IR strings in LLVMSaddWithOverflow.h with a programmatic IR expansion pass that generates the lowering for every valid type at translation time.
Currently
SPIRVLowerLLVMIntrinsic.cppmapsllvm.sadd.with.overflowfor scalar typesi8/i16/i32/i64only (thei8entry was added by #3673).Vector variants are entirely absent from the map, so any LLVM IR using e.g.
llvm.sadd.with.overflow.v2i32fails to translate.SPIR-V supports integer vectors of 2, 3, 4, 8, and 16 components, leaving 20 vector variants uncovered:
v{2,3,4,8,16}i{8,16,32,64}.The proper fix, as noted in the review of #3673, is to replace the hand-authored IR strings in
LLVMSaddWithOverflow.hwith a programmatic IR expansion pass that generates the lowering for every valid type at translation time.