Author: Simon Pilgrim
Date: 2025-11-05T09:56:20Z
New Revision: 0314b939d69597e16e08bb31587fa53c1bea75cb

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

LOG: [Headers][X86] avx ifma - move constexpr to the end of the function 
attribute lists. NFC. (#166523)

Makes it easier to compare constexpr/non-constexpr attribute defines

Allows clang-format to pack the attributes more efficiently

Added: 
    

Modified: 
    clang/lib/Headers/avx512ifmaintrin.h
    clang/lib/Headers/avx512ifmavlintrin.h
    clang/lib/Headers/avxifmaintrin.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/avx512ifmaintrin.h 
b/clang/lib/Headers/avx512ifmaintrin.h
index 625a8ff66dc60..f73b607df797f 100644
--- a/clang/lib/Headers/avx512ifmaintrin.h
+++ b/clang/lib/Headers/avx512ifmaintrin.h
@@ -17,9 +17,8 @@
 /* Define the default attributes for the functions in this file. */
 #if defined(__cplusplus) && (__cplusplus >= 201103L)
 #define __DEFAULT_FN_ATTRS                                                     
\
-  constexpr                                                                    
\
-      __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), 
\
-                     __min_vector_width__(512)))
+  __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"),     
\
+                 __min_vector_width__(512))) constexpr
 #else
 #define __DEFAULT_FN_ATTRS                                                     
\
   __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"),     
\

diff  --git a/clang/lib/Headers/avx512ifmavlintrin.h 
b/clang/lib/Headers/avx512ifmavlintrin.h
index b377c17166ffb..51d5210e5aa5d 100644
--- a/clang/lib/Headers/avx512ifmavlintrin.h
+++ b/clang/lib/Headers/avx512ifmavlintrin.h
@@ -18,13 +18,13 @@
 /* Define the default attributes for the functions in this file. */
 #if defined(__cplusplus) && (__cplusplus >= 201103L)
 #define __DEFAULT_FN_ATTRS128                                                  
\
-  constexpr __attribute__((__always_inline__, __nodebug__,                     
\
-                           __target__("avx512ifma,avx512vl"),                  
\
-                           __min_vector_width__(128)))
+  __attribute__((__always_inline__, __nodebug__,                               
\
+                 __target__("avx512ifma,avx512vl"),                            
\
+                 __min_vector_width__(128))) constexpr
 #define __DEFAULT_FN_ATTRS256                                                  
\
-  constexpr __attribute__((__always_inline__, __nodebug__,                     
\
-                           __target__("avx512ifma,avx512vl"),                  
\
-                           __min_vector_width__(256)))
+  __attribute__((__always_inline__, __nodebug__,                               
\
+                 __target__("avx512ifma,avx512vl"),                            
\
+                 __min_vector_width__(256))) constexpr
 #else
 #define __DEFAULT_FN_ATTRS128                                                  
\
   __attribute__((__always_inline__, __nodebug__,                               
\
@@ -34,7 +34,6 @@
   __attribute__((__always_inline__, __nodebug__,                               
\
                  __target__("avx512ifma,avx512vl"),                            
\
                  __min_vector_width__(256)))
-
 #endif
 
 #if !(defined(__AVXIFMA__) || defined(__AVX512IFMA__))

diff  --git a/clang/lib/Headers/avxifmaintrin.h 
b/clang/lib/Headers/avxifmaintrin.h
index e452d5f0920e9..30df01caed6cf 100644
--- a/clang/lib/Headers/avxifmaintrin.h
+++ b/clang/lib/Headers/avxifmaintrin.h
@@ -17,11 +17,11 @@
 /* Define the default attributes for the functions in this file. */
 #if defined(__cplusplus) && (__cplusplus >= 201103L)
 #define __DEFAULT_FN_ATTRS128                                                  
\
-  constexpr __attribute__((__always_inline__, __nodebug__,                     
\
-                           __target__("avxifma"), __min_vector_width__(128)))
+  __attribute__((__always_inline__, __nodebug__, __target__("avxifma"),        
\
+                 __min_vector_width__(128))) constexpr
 #define __DEFAULT_FN_ATTRS256                                                  
\
-  constexpr __attribute__((__always_inline__, __nodebug__,                     
\
-                           __target__("avxifma"), __min_vector_width__(256)))
+  __attribute__((__always_inline__, __nodebug__, __target__("avxifma"),        
\
+                 __min_vector_width__(256))) constexpr
 #else
 #define __DEFAULT_FN_ATTRS128                                                  
\
   __attribute__((__always_inline__, __nodebug__, __target__("avxifma"),        
\


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to