[Openmp-commits] [openmp] db6406a - [openmp] Use GCC style intrinsics for atomics on Clang-cl on aarch64 too

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 28 12:40:46 PST 2022


Author: Martin Storsjö
Date: 2022-11-28T22:40:01+02:00
New Revision: db6406acec7b70c39970f888617884e684b3ca9e

URL: https://github.com/llvm/llvm-project/commit/db6406acec7b70c39970f888617884e684b3ca9e
DIFF: https://github.com/llvm/llvm-project/commit/db6406acec7b70c39970f888617884e684b3ca9e.diff

LOG: [openmp] Use GCC style intrinsics for atomics on Clang-cl on aarch64 too

This fixes compilation in the Clang-cl configuration on aarch64;
Clang doesn't implement all the aarch64 MSVC atomic intrinsics yet.

Differential Revision: https://reviews.llvm.org/D138737

Added: 
    

Modified: 
    openmp/runtime/src/kmp_os.h

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h
index 7972a12bc30da..76fcbb841b94f 100644
--- a/openmp/runtime/src/kmp_os.h
+++ b/openmp/runtime/src/kmp_os.h
@@ -456,7 +456,7 @@ enum kmp_mem_fence_type {
 
 // Synchronization primitives
 
-#if KMP_ASM_INTRINS && KMP_OS_WINDOWS && !((KMP_ARCH_AARCH64 || KMP_ARCH_ARM) && defined(__GNUC__))
+#if KMP_ASM_INTRINS && KMP_OS_WINDOWS && !((KMP_ARCH_AARCH64 || KMP_ARCH_ARM) && (KMP_COMPILER_CLANG || KMP_COMPILER_GCC))
 
 #if KMP_MSVC_COMPAT && !KMP_COMPILER_CLANG
 #pragma intrinsic(InterlockedExchangeAdd)


        


More information about the Openmp-commits mailing list