[llvm] LangRef: Claim llvm.{vp.,}vector.reduce.f{min,max} as deprecated (PR #118730)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 18:11:24 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: YunQiang Su (wzssyqa)

<details>
<summary>Changes</summary>

The semantics about sNaN of these instructions are not clear enough. If there is a sNaN in the vector, the result may differs due to the position of the sNaN value.

Since then, it is difficult to optimize with Vector or SIMD extensions.

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


1 Files Affected:

- (modified) llvm/docs/LangRef.rst (+16) 


``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index abfd2fdfb9de71..8abfed275110b7 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -19524,6 +19524,10 @@ containing both +0.0 and -0.0 elements, the sign of the result is unspecified.
 If the intrinsic call has the ``nnan`` fast-math flag, then the operation can
 assume that NaNs are not present in the input vector.
 
+It is deprecated, since the different order of inputs may produce different
+outputs, and it is hard to optimize with Vector or SIMD extensions.
+Use '``llvm.vector.reduce.fmaximum``' or '``llvm.vector.reduce.fmaximumnum``' instead.
+
 Arguments:
 """"""""""
 The argument to this intrinsic must be a vector of floating-point values.
@@ -19557,6 +19561,10 @@ containing both +0.0 and -0.0 elements, the sign of the result is unspecified.
 If the intrinsic call has the ``nnan`` fast-math flag, then the operation can
 assume that NaNs are not present in the input vector.
 
+It is deprecated, since the different order of inputs may produce different
+outputs, and it is hard to optimize with Vector or SIMD extensions.
+Use '``llvm.vector.reduce.fminimum``' or '``llvm.vector.reduce.fminimumnum``' instead.
+
 Arguments:
 """"""""""
 The argument to this intrinsic must be a vector of floating-point values.
@@ -23176,6 +23184,10 @@ vector with maximum element magnitude ``0.0`` and containing both ``+0.0`` and
 
 To ignore the start value, the neutral value can be used.
 
+It is deprecated, since the different order of inputs may produce different
+outputs, and it is hard to optimize with Vector or SIMD extensions.
+Use '``llvm.vp.vector.reduce.fmaximum``' or '``llvm.vp.vector.reduce.fmaximumnum``' instead.
+
 Examples:
 """""""""
 
@@ -23246,6 +23258,10 @@ vector with maximum element magnitude ``0.0`` and containing both ``+0.0`` and
 
 To ignore the start value, the neutral value can be used.
 
+It is deprecated, since the different order of inputs may produce different
+outputs, and it is hard to optimize with Vector or SIMD extensions.
+Use '``llvm.vp.vector.reduce.fminimum``' or '``llvm.vp.vector.reduce.fminimumnum``' instead.
+
 Examples:
 """""""""
 

``````````

</details>


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


More information about the llvm-commits mailing list