[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

Sarah Spall via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 17:40:19 PDT 2025


================
@@ -303,6 +303,48 @@ fmod(__detail::HLSL_FIXED_VECTOR<float, N> X,
   return __detail::fmod_vec_impl(X, Y);
 }
 
+//===----------------------------------------------------------------------===//
+// ldexp builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn T ldexp(T X, T Exp)
+/// \brief Returns the result of multiplying the specified value by two, raised
----------------
spall wrote:

I think the comma after two changes the meaning of this. To me this reads as (X * 2) ^ exp. 
I would remove the comma.

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


More information about the cfe-commits mailing list