[libc] [llvm] [OpenMP] Build OpenMP DeviceRTL on SPIR-V (PR #121600)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 07:10:48 PST 2025


================
@@ -157,7 +157,7 @@ RPC_ATTRS void sleep_briefly() {
     asm("nanosleep.u32 64;" ::: "memory");
 #elif defined(__AMDGPU__) && defined(RPC_TARGET_IS_GPU)
   __builtin_amdgcn_s_sleep(2);
-#elif __has_builtin(__builtin_ia32_pause)
+#elif __has_builtin(__builtin_ia32_pause) && !defined(__SPIRV__)
----------------
sarnex wrote:

I debugging into it quickly and found the problem was that it seems there's some map in the preprocessor between builtins and features those builtints require, and that feature map was empty and when it's empty `__has_builtin` returns `true`, but I don't actually know what that feature map repesents or why it's empty, will do a real investigation on this which I should have done to begin with :P

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


More information about the llvm-commits mailing list