michalpaszkowski wrote: This PR fixes the undefined behavior issues discovered by buildbots after adding SPIRV to LLVM_ALL_TARGETS in https://github.com/llvm/llvm-project/pull/119653 https://github.com/llvm/llvm-project/pull/123625