[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - Allow AVX512 VPSHUFBITQMB intrinsics to be used in constexpr (PR #168100)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 05:43:39 PST 2025


================
@@ -15,6 +15,16 @@
 #define __AVX512VLBITALGINTRIN_H
 
 /* 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__("avx512vl,avx512bitalg"),                \
+                           __min_vector_width__(128)))
+#define __DEFAULT_FN_ATTRS256                                                  \
+  constexpr __attribute__((__always_inline__, __nodebug__,                     \
+                           __target__("avx512vl,avx512bitalg"),                \
+                           __min_vector_width__(256)))
----------------
RKSimon wrote:

(style) put the constexpr at the end of the attribute list and reformat

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


More information about the cfe-commits mailing list