Index: llvm/docs/LangRef.rst =================================================================== --- llvm/docs/LangRef.rst +++ llvm/docs/LangRef.rst @@ -17805,6 +17805,70 @@ """""""""" The argument to this intrinsic must be a vector of floating-point values. +.. _int_vector_reduce_fmaximum: + +'``llvm.vector.reduce.fmaximum.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" +This is an overloaded intrinsic. + +:: + + declare float @llvm.vector.reduce.fmaximum.v4f32(<4 x float> %a) + declare double @llvm.vector.reduce.fmaximum.v2f64(<2 x double> %a) + +Overview: +""""""""" + +The '``llvm.vector.reduce.fmaximum.*``' intrinsics do a floating-point +``MAX`` reduction of a vector, returning the result as a scalar. The return type +matches the element-type of the vector input. + +This instruction has the same comparison semantics as the '``llvm.maximum.*``' +intrinsic. That is, this intrinsic propagates NaNs and +0.0 is considered +greater than -0.0. If any element of the vector is a NaN, the result is NaN. + +If the intrinsic call has the ``nnan`` fast-math flag, then the operation can +assume that NaNs are not present in the input vector. + +Arguments: +"""""""""" +The argument to this intrinsic must be a vector of floating-point values. + +.. _int_vector_reduce_fminimum: + +'``llvm.vector.reduce.fminimum.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" +This is an overloaded intrinsic. + +:: + + declare float @llvm.vector.reduce.fminimum.v4f32(<4 x float> %a) + declare double @llvm.vector.reduce.fminimum.v2f64(<2 x double> %a) + +Overview: +""""""""" + +The '``llvm.vector.reduce.fminimum.*``' intrinsics do a floating-point +``MIN`` reduction of a vector, returning the result as a scalar. The return type +matches the element-type of the vector input. + +This instruction has the same comparison semantics as the '``llvm.minimum.*``' +intrinsic. That is, this intrinsic propagates NaNs and -0.0 is considered less +than +0.0. If any element of the vector is a NaN, the result is NaN. + +If the intrinsic call has the ``nnan`` fast-math flag, then the operation can +assume that NaNs are not present in the input vector. + +Arguments: +"""""""""" +The argument to this intrinsic must be a vector of floating-point values. + '``llvm.vector.insert``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Index: llvm/include/llvm/IR/Intrinsics.td =================================================================== --- llvm/include/llvm/IR/Intrinsics.td +++ llvm/include/llvm/IR/Intrinsics.td @@ -2305,6 +2305,10 @@ [llvm_anyvector_ty]>; def int_vector_reduce_fmin : DefaultAttrsIntrinsic<[LLVMVectorElementType<0>], [llvm_anyvector_ty]>; + def int_vector_reduce_fminimum: DefaultAttrsIntrinsic<[LLVMVectorElementType<0>], + [llvm_anyvector_ty]>; + def int_vector_reduce_fmaximum: DefaultAttrsIntrinsic<[LLVMVectorElementType<0>], + [llvm_anyvector_ty]>; } //===----- Matrix intrinsics ---------------------------------------------===//