[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 10:51:45 PDT 2025
================
@@ -130,6 +130,8 @@ def int_dx_degrees : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty
def int_dx_isinf : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
[llvm_anyfloat_ty], [IntrNoMem]>;
+def int_dx_isnan : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
----------------
farzonl wrote:
Two issues
1. you are doing spirv lowering of the intrinsic but no lowering of the intrinsic to a DXIL OP.
2. you need to handle the emulation of isNaN for the fp16 cases in SM 6.8 and lower
https://github.com/llvm/llvm-project/pull/157733
More information about the llvm-commits
mailing list