[llvm] [DirectX][DXIL] Distinguish return type for overload type resolution. (PR #85646)
S. Bharadwaj Yadavalli via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 11:45:00 PDT 2024
================
@@ -255,6 +255,9 @@ class DXILOpMapping<int opCode, DXILOpClass opClass,
}
// Concrete definition of DXIL Operation mapping to corresponding LLVM intrinsic
+def IsInf : DXILOpMapping<9, isSpecialFloat, int_dx_isinf,
+ "Determines if the specified value is infinite.",
+ [llvm_i1_ty, llvm_halforfloat_ty]>;
----------------
bharadwajy wrote:
> Is it ok that these are scalar types? isInf returns a bool vector if the input is a float or half vector. Will we eventually have to expand type here to indicate we may be a scalar or vector?
Per my reading of [`hctdb.py`](https://github.com/microsoft/DirectXShaderCompiler/blob/6f4f758e9b3be1991956f99600982755596e29dc/utils/hct/hctdb.py#L1341), the DXIL Op `Isinf` is a scalar operation with `half` and `float` as scalar overloads. Accordingly, this record fully specifies the op.
That said, I am working with a principle and design wherein the properties of HLSL intrinsic to which this DXIL Op maps (upon elementwise expansion) will be represented as TableGen `Attr` records.
https://github.com/llvm/llvm-project/pull/85646
More information about the llvm-commits
mailing list