[libclc] [libclc] Replace NVPTX libdevice calls with clang builtins for sqrt, rsqrt, isinf (PR #205709)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 19:05:49 PDT 2026


================
@@ -8,15 +8,16 @@
 
 #include "clc/math/clc_rsqrt.h"
 
-float __nv_rsqrtf(float);
-double __nv_rsqrt(double);
-
-_CLC_OVERLOAD _CLC_DEF float __clc_rsqrt(float x) { return __nv_rsqrtf(x); }
+_CLC_OVERLOAD _CLC_DEF float __clc_rsqrt(float x) {
----------------
jhuber6 wrote:

Yeah, wasn't sure. This is the same thing the libdevice function lowers to as far as I am aware. I didn't know if it would change results so I was playing it a bit safe.

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


More information about the cfe-commits mailing list