[compiler-rt] [compiler-rt] Add SPIR-V target support for UBSan Minimal Runtime (PR #195979)

Victor Mustya via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 09:56:43 PDT 2026


vmustya wrote:

> What is the main delta between the old code? Like like to avoid this new indirection if possible. Both should just have access to `printf`, right? If you want to print the grid dimensions that's just some extra arguments to the existing case. I'm personally not sure we gain too much from knowing which thread hits the UB

The existing code tries to format the error message on a stack buffer and then print it. That's what we can't support for GPU in common case. The SPIR-V target, the `printf` requires all the string operands to be literals, or to be resolved to literals.

Also, the old code uses the `abort()` function from the libc, that is not available for the SPIR-V target.

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


More information about the llvm-commits mailing list