[clang] [llvm] [HLSL] Implement isfinite() intrinsic (PR #225947)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 09:55:36 PDT 2026


================
@@ -1085,6 +1085,21 @@ call.
   let IsConvergent = 1;
 }
 
+// Determines if the specified value x is finite.
+def hlsl_isfinite : HLSLOneArgBuiltin<"isfinite", "__builtin_hlsl_elementwise_isfinite"> {
+  let Doc = [{
+\fn T isfinite(T x)
+\brief Determines if the specified value \a x  is finite.
+\param x The specified input value.
+
+Returns a value of the same size as the input, with a value set
+to False if the x parameter is +INF, -INF, NaN, or QNaN. Otherwise, True.
+}];
+  let ReturnType = VaryingShape<BoolTy>;
+  let VaryingTypes = [HalfTy, FloatTy];
+  let VaryingLongVector = 1;
----------------
farzonl wrote:

What about the matrix work?

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


More information about the cfe-commits mailing list