[clang] d54ff4c - Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (#99691)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 6 05:30:05 PDT 2026
Author: hpkfft.com
Date: 2026-06-06T12:30:00Z
New Revision: d54ff4c9b91250b93cf6b05377246fbad9e028ce
URL: https://github.com/llvm/llvm-project/commit/d54ff4c9b91250b93cf6b05377246fbad9e028ce
DIFF: https://github.com/llvm/llvm-project/commit/d54ff4c9b91250b93cf6b05377246fbad9e028ce.diff
LOG: Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (#99691)
Intrinsics such as `_mm512_add_round_ps` take a rounding mode argument
to specify the floating point rounding mode. This, and similar
instructions, do NOT round their result to an integer. Thus it is
inappropriate for user code to specify the existing
`_MM_FROUND_TO_NEAREST_INT` when desiring to round to the nearest
floating point number. This commit adds a suitable macro definition.
Added:
Modified:
clang/lib/Headers/avx512fintrin.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/avx512fintrin.h b/clang/lib/Headers/avx512fintrin.h
index 698f869f4549e..2dfcb7fd159f8 100644
--- a/clang/lib/Headers/avx512fintrin.h
+++ b/clang/lib/Headers/avx512fintrin.h
@@ -42,11 +42,12 @@ typedef unsigned char __mmask8;
typedef unsigned short __mmask16;
/* Rounding mode macros. */
-#define _MM_FROUND_TO_NEAREST_INT 0x00
-#define _MM_FROUND_TO_NEG_INF 0x01
-#define _MM_FROUND_TO_POS_INF 0x02
-#define _MM_FROUND_TO_ZERO 0x03
-#define _MM_FROUND_CUR_DIRECTION 0x04
+#define _MM_FROUND_TO_NEAREST_INT 0x00
+#define _MM_FROUND_TO_NEAREST_TIES_EVEN 0x00
+#define _MM_FROUND_TO_NEG_INF 0x01
+#define _MM_FROUND_TO_POS_INF 0x02
+#define _MM_FROUND_TO_ZERO 0x03
+#define _MM_FROUND_CUR_DIRECTION 0x04
/* Constants for integer comparison predicates */
typedef enum {
More information about the cfe-commits
mailing list