================
@@ -0,0 +1,1067 @@
+/*===------------ avx10_2_v2auxintrin.h - AVX10_2_V2AUX -------------------===
+ *
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+ * See https://llvm.org/LICENSE.txt for license information.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ *
+ *===-----------------------------------------------------------------------===
+ */
+#ifndef __IMMINTRIN_H
+#error                                                                         
\
+    "Never use <avx10_2_v2auxintrin.h> directly; include <immintrin.h> 
instead."
+#endif // __IMMINTRIN_H
+
+#ifdef __SSE2__
+
+#ifndef __AVX10_2_V2AUXINTRIN_H
+#define __AVX10_2_V2AUXINTRIN_H
+
+/* Define the default attributes for the functions in this file. */
+#define __DEFAULT_FN_ATTRS128                                                  
\
+  __attribute__((__always_inline__, __nodebug__, __target__("avx10-v2-aux"),   
\
+                 __min_vector_width__(128)))
+#define __DEFAULT_FN_ATTRS256                                                  
\
+  __attribute__((__always_inline__, __nodebug__, __target__("avx10-v2-aux"),   
\
+                 __min_vector_width__(256)))
+#define __DEFAULT_FN_ATTRS512                                                  
\
+  __attribute__((__always_inline__, __nodebug__, __target__("avx10-v2-aux"),   
\
+                 __min_vector_width__(512)))
+
+// clang-format off
+
+//===----------------------------------------------------------------------===//
+// Group A: VCVTPS2BF8 / VCVTPS2BF8S / VCVTPS2HF8 / VCVTPS2HF8S /
+//          VCVTROPS2HF8 / VCVTROPS2HF8S
+// Convert packed single-precision to FP8. Output is always __m128i.
+//===----------------------------------------------------------------------===//
+
+// VCVTPS2BF8 - 128-bit
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS128
+_mm_cvtps_bf8(__m128 __A) {
+  return (__m128i)__builtin_ia32_vcvtps2bf8_128_mask(
----------------
mahesh-attarde wrote:

Last year when avx10.2  cvt was published, we encountered suboptimal code 
sequence due to "mask" parameter being part of intrinsic argument. In later 
attempt we removed that with use of select built-in. 
Although few of cvt are still using it, It is worth paying attention too to 
avoid "same problems-debug-fix"

Example Filed issue: https://github.com/llvm/llvm-project/issues/180695 

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

Reply via email to