[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 11:48:43 PDT 2024


================
@@ -88,4 +88,9 @@ def int_dx_rsqrt  : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]
 def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>;
 def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>;
 def int_dx_step : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, LLVMMatchType<0>], [IntrNoMem]>;
+
+def int_dx_splitdouble : DefaultAttrsIntrinsic<
+    [llvm_anyint_ty, LLVMMatchType<0>], 
----------------
farzonl wrote:

so why `llvm_anyint_ty` instead of a vector type? This means the the return type isn't preserving the vector length provided by  the double argument. I think this is part of why you are having to do your own custom scalarization. 

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


More information about the llvm-commits mailing list