https://github.com/hpkfft created 
https://github.com/llvm/llvm-project/pull/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.

>From b4fcf05f7df9365cd8289a20badad6ff485ecbd5 Mon Sep 17 00:00:00 2001
From: "hpkfft.com" <p...@hpkfft.com>
Date: Fri, 19 Jul 2024 12:35:33 -0700
Subject: [PATCH] Add _MM_FROUND_TIES_TO_EVEN to avx512fintrin.h

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.
---
 clang/lib/Headers/avx512fintrin.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/lib/Headers/avx512fintrin.h 
b/clang/lib/Headers/avx512fintrin.h
index 4f172c74b31cb..2d7b5c534e554 100644
--- a/clang/lib/Headers/avx512fintrin.h
+++ b/clang/lib/Headers/avx512fintrin.h
@@ -43,6 +43,7 @@ typedef unsigned short __mmask16;
 
 /* Rounding mode macros.  */
 #define _MM_FROUND_TO_NEAREST_INT   0x00
+#define _MM_FROUND_TIES_TO_EVEN     0x00
 #define _MM_FROUND_TO_NEG_INF       0x01
 #define _MM_FROUND_TO_POS_INF       0x02
 #define _MM_FROUND_TO_ZERO          0x03

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to