[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
Tue May 5 20:06:56 PDT 2026


================
@@ -0,0 +1,45 @@
+#include "ubsan_minimal_common.h"
+
+using uint3 = unsigned __attribute__((ext_vector_type(3)));
----------------
vmustya wrote:

I believe, that the group ID and local ID info of the error should be useful for the GPU targets. Here is the OpenCL `printf` used. It supports vector printing -- the `%v3u` in the format string. Such parameters should be passed as vectors.

Reference: https://registry.khronos.org/OpenCL/specs/unified/html/OpenCL_C.html#printf-format-string

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


More information about the llvm-commits mailing list