[libc-commits] [libc] [libc] Fix incorrectly enabled GPU math functions (PR #83594)

via libc-commits libc-commits at lists.llvm.org
Fri Mar 1 10:05:54 PST 2024


================
@@ -12,7 +12,7 @@
 namespace LIBC_NAMESPACE {
 
 LLVM_LIBC_FUNCTION(long long, llround, (double x)) {
-  return __builtin_llround(x);
+  return static_cast<long long>(__builtin_round(x));
----------------
lntue wrote:

Does the generic implementation work for GPU?
https://github.com/llvm/llvm-project/blob/main/libc/src/math/generic/llround.cpp#L16

https://github.com/llvm/llvm-project/pull/83594


More information about the libc-commits mailing list