@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> {
let OnlyBuiltinPrefixedAliasIsConstexpr = 1;
}
+def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> {
wzssyqa wrote:
Yes. They are in C23: https://libc.llvm.org/c23.html
@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> {
let OnlyBuiltinPrefixedAliasIsConstexpr = 1;
}
+def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> {
philnik777 wrote:
In that case this should probably be a `GNULibBuiltin`. Or
https://github.com/wzssyqa updated
https://github.com/llvm/llvm-project/pull/96281
>From 1f357abed9d9e304b12ddd05a525557a8b0082c6 Mon Sep 17 00:00:00 2001
From: YunQiang Su
Date: Fri, 21 Jun 2024 14:28:42 +0800
Subject: [PATCH 1/2] Clang: Support minimumnum and maximumnum intrinsics
We just
@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> {
let OnlyBuiltinPrefixedAliasIsConstexpr = 1;
}
+def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> {
wzssyqa wrote:
Oh, newer libc does have this function:
@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> {
let OnlyBuiltinPrefixedAliasIsConstexpr = 1;
}
+def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> {
philnik777 wrote:
Why is this a libbuiltin? IIUC this is only supposed to be
@@ -215,6 +215,18 @@ def FminF16F128 : Builtin, F16F128MathTemplate {
let Prototype = "T(T, T)";
}
+def FmaximumNumF16F128 : Builtin, F16F128MathTemplate {
+ let Spellings = ["__builtin_fmaximum_num"];
+ let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Const,
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: YunQiang Su (wzssyqa)
Changes
We just introduce llvm.minimumnum and llvm.maximumnum intrinsics support to
llvm. Let's support them in Clang.
See: #93033
---
Full diff: https://github.com/llvm/llvm-project/pull/96281.diff
6 Files
https://github.com/wzssyqa created
https://github.com/llvm/llvm-project/pull/96281
We just introduce llvm.minimumnum and llvm.maximumnum intrinsics support to
llvm. Let's support them in Clang.
See: #93033
>From 5605426ee61ec58cad701103a43922b67792ccaf Mon Sep 17 00:00:00 2001
From: YunQiang