[libc-commits] [libc] [libc][math][c23] Add f16fmaf C23 math function (PR #95483)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 13 16:15:06 PDT 2024
================
@@ -272,10 +286,14 @@ class MPFRMatcher : public testing::Matcher<OutputType> {
// types.
template <Operation op, typename InputType, typename OutputType>
constexpr bool is_valid_operation() {
- constexpr bool IS_NARROWING_OP = op == Operation::Sqrt &&
- cpp::is_floating_point_v<InputType> &&
- cpp::is_floating_point_v<OutputType> &&
- sizeof(OutputType) <= sizeof(InputType);
+ constexpr bool IS_NARROWING_OP =
+ (op == Operation::Sqrt && cpp::is_floating_point_v<InputType> &&
+ cpp::is_floating_point_v<OutputType> &&
+ sizeof(OutputType) <= sizeof(InputType)) ||
+ (op == Operation::Fma && internal::IsTernaryInput<InputType>::VALUE &&
----------------
overmighty wrote:
Maybe we should just change this to check for operation ranges, like the code below does.
https://github.com/llvm/llvm-project/pull/95483
More information about the libc-commits
mailing list