[clang] [llvm] Adding splitdouble HLSL function (PR #109331)
Chris B via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 28 10:25:17 PDT 2024
================
@@ -422,6 +422,55 @@ template <typename T> constexpr uint asuint(T F) {
return __detail::bit_cast<uint, T>(F);
}
+//===----------------------------------------------------------------------===//
+// asuint splitdouble builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn void asuint(double D, out uint lowbits, out int highbits)
+/// \brief Split and interprets the lowbits and highbits of double D into uints.
+/// \param D The input double.
+/// \param lowbits The output lowbits of D.
+/// \param highbits The highbits lowbits D.
+#if __is_target_arch(dxil)
----------------
llvm-beanz wrote:
>From @joaosaffran's comment on that test (https://github.com/llvm/llvm-project/pull/109331#discussion_r1779366157), it seems like the SPIR-V implementation fails to codegen through the SPIR-V backend. It has nothing to do with the preprocessor. The `clang` commands complete the codegen pipeline unless an error is encountered.
There are two concerns that brings up to me:
1) Why is an unused function being generated?
2) Why is it failing?
https://github.com/llvm/llvm-project/pull/109331
More information about the llvm-commits
mailing list