[clang] 51679dc - [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

Freddy Ye via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 18:40:56 PST 2022


Author: Freddy Ye
Date: 2022-11-30T10:40:42+08:00
New Revision: 51679dc1c9d52ca906a739bafdd7be0041d7b3ce

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

LOG: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

Reviewed By: LuoYuanke, pengfei

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

Added: 
    

Modified: 
    clang/lib/Headers/cmpccxaddintrin.h
    clang/lib/Headers/immintrin.h
    clang/lib/Headers/x86gprintrin.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/cmpccxaddintrin.h b/clang/lib/Headers/cmpccxaddintrin.h
index 709fdb0d0e15..093ca1f64e66 100644
--- a/clang/lib/Headers/cmpccxaddintrin.h
+++ b/clang/lib/Headers/cmpccxaddintrin.h
@@ -7,9 +7,10 @@
  *
  *===-----------------------------------------------------------------------===
  */
-#ifndef __IMMINTRIN_H
-#error "Never use <cmpccxaddintrin.h> directly; include <immintrin.h> instead."
-#endif // __IMMINTRIN_H
+#ifndef __X86GPRINTRIN_H
+#error                                                                         \
+    "Never use <cmpccxaddintrin.h> directly; include <x86gprintrin.h> instead."
+#endif // __X86GPRINTRIN_H
 
 #ifndef __CMPCCXADDINTRIN_H
 #define __CMPCCXADDINTRIN_H

diff  --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h
index 9d87dd780b65..6967b46fdb24 100644
--- a/clang/lib/Headers/immintrin.h
+++ b/clang/lib/Headers/immintrin.h
@@ -528,11 +528,6 @@ _storebe_i64(void * __P, long long __D) {
 #include <amxfp16intrin.h>
 #endif
 
-#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
-    defined(__CMPCCXADD__)
-#include <cmpccxaddintrin.h>
-#endif
-
 #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
     defined(__KL__) || defined(__WIDEKL__)
 #include <keylockerintrin.h>

diff  --git a/clang/lib/Headers/x86gprintrin.h b/clang/lib/Headers/x86gprintrin.h
index b7e762668ecb..f9a765be4322 100644
--- a/clang/lib/Headers/x86gprintrin.h
+++ b/clang/lib/Headers/x86gprintrin.h
@@ -35,6 +35,11 @@
 #include <raointintrin.h>
 #endif
 
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
+    defined(__CMPCCXADD__)
+#include <cmpccxaddintrin.h>
+#endif
+
 #if defined(__i386__)
 #define __SAVE_GPRBX "mov {%%ebx, %%eax |eax, ebx};"
 #define __RESTORE_GPRBX "mov {%%eax, %%ebx |ebx, eax};"


        


More information about the cfe-commits mailing list