llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-backend-x86

Author: hpkfft.com (hpkfft)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/99691.diff


1 Files Affected:

- (modified) clang/lib/Headers/avx512fintrin.h (+1) 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/99691
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to