[clang] [llvm] [HLSL] Implement `rsqrt` intrinsic (PR #84820)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 16:21:17 PDT 2024


================
@@ -1153,6 +1153,38 @@ double3 rcp(double3);
 _HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
 double4 rcp(double4);
 
+//===----------------------------------------------------------------------===//
+// rsqrt builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn T rsqrt(T x)
+/// \brief RReturns the reciprocal of the square root of the specified value \a
----------------
damyanp wrote:

Comparing this with the doc for rcp above, wonder if it should be more like:

`Returns the reciprocal of the square root of the specified value.  ie 1 / sqrt(\a x).`



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


More information about the cfe-commits mailing list