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

Freddy, Ye via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 18:41:08 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG51679dc1c9d5: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h (authored by FreddyYe).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138900/new/

https://reviews.llvm.org/D138900

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


Index: clang/lib/Headers/x86gprintrin.h
===================================================================
--- clang/lib/Headers/x86gprintrin.h
+++ 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};"
Index: clang/lib/Headers/immintrin.h
===================================================================
--- clang/lib/Headers/immintrin.h
+++ clang/lib/Headers/immintrin.h
@@ -528,11 +528,6 @@
 #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>
Index: clang/lib/Headers/cmpccxaddintrin.h
===================================================================
--- clang/lib/Headers/cmpccxaddintrin.h
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138900.478782.patch
Type: text/x-patch
Size: 1764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221130/19c24d75/attachment.bin>


More information about the cfe-commits mailing list