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

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 18:10:53 PST 2024


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

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.

>From af5c89555de956f930da1e9c1682a06a830e566b Mon Sep 17 00:00:00 2001
From: YunQiang Su <yunqiang at isrc.iscas.ac.cn>
Date: Thu, 5 Dec 2024 10:00:15 +0800
Subject: [PATCH] LangRef: Claim llvm.{vp.,}vector.reduce.f{min,max} as
 deprecated

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.
---
 llvm/docs/LangRef.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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:
 """""""""
 



More information about the llvm-commits mailing list