[libc] Fix math failures for fmod on NVPTX (#213168)
Summary: Fixes some failing tests. Fmod's builtin has improper handling in the NVPTX instruction so we should just use the generic version for now. The Float128 implementation seems to have had some undefined behavior for out of range behavior that only showed up now. Hopefully someone can tell me if this is fixed correctly.
This commit is contained in:
parent
1fe55891a7
commit
b232d110b0
3 changed files with 0 additions and 54 deletions
|
|
@ -110,22 +110,6 @@ add_entrypoint_object(
|
|||
../fminf.h
|
||||
)
|
||||
|
||||
add_entrypoint_object(
|
||||
fmod
|
||||
SRCS
|
||||
fmod.cpp
|
||||
HDRS
|
||||
../fmod.h
|
||||
)
|
||||
|
||||
add_entrypoint_object(
|
||||
fmodf
|
||||
SRCS
|
||||
fmodf.cpp
|
||||
HDRS
|
||||
../fmodf.h
|
||||
)
|
||||
|
||||
add_entrypoint_object(
|
||||
nearbyint
|
||||
SRCS
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
//===-- Implementation of the fmod function for GPU -----------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/math/fmod.h"
|
||||
#include "src/__support/common.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
LLVM_LIBC_FUNCTION(double, fmod, (double x, double y)) {
|
||||
return __builtin_fmod(x, y);
|
||||
}
|
||||
|
||||
} // namespace LIBC_NAMESPACE_DECL
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
//===-- Implementation of the fmodf function for GPU ----------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/math/fmodf.h"
|
||||
#include "src/__support/common.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
LLVM_LIBC_FUNCTION(float, fmodf, (float x, float y)) {
|
||||
return __builtin_fmodf(x, y);
|
||||
}
|
||||
|
||||
} // namespace LIBC_NAMESPACE_DECL
|
||||
Loading…
Reference in a new issue