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

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Mar 1 08:54:37 PST 2024


================
@@ -1,18 +0,0 @@
-//===-- Implementation of the GPU llround function ------------------------===//
-//
-// 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/llround.h"
-#include "src/__support/common.h"
-
-namespace LIBC_NAMESPACE {
-
-LLVM_LIBC_FUNCTION(long long, llround, (double x)) {
-  return __builtin_llround(x);
----------------
jhuber6 wrote:

@lntue is this strictly true? `round` returns a double, which I'm unsure if that correctly converts to a `long long int` when casted. I would guess not because there would be gaps at the extreme ends.

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


More information about the libc-commits mailing list