[llvm-branch-commits] [DirectX] Disentangle DXIL.td's op types from LLVMType. NFC (PR #104247)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Aug 14 14:28:32 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-directx
Author: Justin Bogner (bogner)
<details>
<summary>Changes</summary>
LLVMType is both too broad and too narrow for defining DXIL operations, in
different ways. It's too broad in the sense that we don't need the full set of
MVTs - the set of types DXIL operations work on is much smaller. It's too
narrow in the sense that it's difficult to use it for the various fixed
structure types in DXIL, like `%dx.types.Handle` or `%dx.Types.ResRet.f32`.
Replace the usage of LLVMType in DXIL.td with DXILOpParamType, a simple class
that we can define an enum of types from. Further, use this to replace the
"ParameterKind" enum in DXILABI.h that has nothing to do with DXIL's ABI.
---
Patch is 40.18 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/104247.diff
6 Files Affected:
- (modified) llvm/docs/DirectX/DXILOpTableGenDesign.rst (+12-16)
- (modified) llvm/include/llvm/Support/DXILABI.h (-17)
- (modified) llvm/lib/Target/DirectX/DXIL.td (+132-127)
- (modified) llvm/lib/Target/DirectX/DXILConstants.h (+5)
- (modified) llvm/lib/Target/DirectX/DXILOpBuilder.cpp (+35-35)
- (modified) llvm/utils/TableGen/DXILEmitter.cpp (+48-128)
``````````diff
diff --git a/llvm/docs/DirectX/DXILOpTableGenDesign.rst b/llvm/docs/DirectX/DXILOpTableGenDesign.rst
index 50d801bd05efdb..46106ee2a50f57 100644
--- a/llvm/docs/DirectX/DXILOpTableGenDesign.rst
+++ b/llvm/docs/DirectX/DXILOpTableGenDesign.rst
@@ -93,18 +93,14 @@ properties are specified as fields of the ``DXILOp`` class as described below.
class DXILOpClass;
Concrete operation records, such as ``unary`` are defined by inheriting from ``DXILOpClass``.
-6. Return type of the operation is represented as ``LLVMType``.
-7. Operation arguments are represented as a list of ``LLVMType`` with each type
- corresponding to the argument position. An overload type, if supported by the operation, is
- denoted as the positional type ``overloadTy`` in the argument or in the result, where
- ``overloadTy`` is defined to be synonymous to ``llvm_any_ty``.
-
- .. code-block::
-
- defvar overloadTy = llvm_any_ty
-
- Empty list, ``[]`` represents an operation with no arguments.
-
+6. A set of type names are defined that represent return and argument types,
+ which all inherit from ``DXILOpParamType``. These represent simple types
+ like ``int32Ty``, DXIL types like ``dx.types.Handle``, and a special
+ ``overloadTy`` which can be any type allowed by ``Overloads``, described
+ below.
+7. Operation return type is represented as a ``DXILOpParamType``, and arguments
+ are represented as a list of the same. An operation with no return value
+ shall specify ``VoidTy`` as its return.
8. Valid operation overload types predicated on DXIL version are specified as
a list of ``Overloads`` records. Representation of ``Overloads``
class is described in a later section.
@@ -145,10 +141,10 @@ TableGen representations of its properties described above.
Intrinsic LLVMIntrinsic = ?;
// Result type of the op.
- LLVMType result;
+ DXILOpParamType result;
// List of argument types of the op. Default to 0 arguments.
- list<LLVMType> arguments = [];
+ list<DXILOpParamType> arguments = [];
// List of valid overload types predicated by DXIL version
list<Overloads> overloads;
@@ -233,9 +229,9 @@ overloads predicated on DXIL version as list of records of the following class
.. code-block::
- class Overloads<Version minver, list<LLVMType> ols> {
+ class Overloads<Version minver, list<DXILOpParamType> ols> {
Version dxil_version = minver;
- list<LLVMType> overload_types = ols;
+ list<DXILOpParamType> overload_types = ols;
}
Following is an example specification of valid overload types for ``DXIL1_0`` and
diff --git a/llvm/include/llvm/Support/DXILABI.h b/llvm/include/llvm/Support/DXILABI.h
index a2222eec09ba85..cf2c42c689889d 100644
--- a/llvm/include/llvm/Support/DXILABI.h
+++ b/llvm/include/llvm/Support/DXILABI.h
@@ -22,23 +22,6 @@
namespace llvm {
namespace dxil {
-enum class ParameterKind : uint8_t {
- Invalid = 0,
- Void,
- Half,
- Float,
- Double,
- I1,
- I8,
- I16,
- I32,
- I64,
- Overload,
- CBufferRet,
- ResourceRet,
- DXILHandle,
-};
-
enum class ResourceClass : uint8_t {
SRV = 0,
UAV,
diff --git a/llvm/lib/Target/DirectX/DXIL.td b/llvm/lib/Target/DirectX/DXIL.td
index 60185c20606b22..34c7f84b1ca5b2 100644
--- a/llvm/lib/Target/DirectX/DXIL.td
+++ b/llvm/lib/Target/DirectX/DXIL.td
@@ -24,19 +24,24 @@ foreach i = 0...8 in {
def DXIL1_ #i : Version<1, i>;
}
-// Overload type alias of llvm_any_ty
-defvar overloadTy = llvm_any_ty;
-
-// Type aliases for DXIL Op types to LLVM Types.
-// TODO: Define DXIL Types independent of LLVM types
-defvar i1Ty = llvm_i1_ty;
-defvar i8Ty = llvm_i8_ty;
-defvar i16Ty = llvm_i16_ty;
-defvar i32Ty = llvm_i32_ty;
-defvar i64Ty = llvm_i64_ty;
-defvar halfTy = llvm_half_ty;
-defvar floatTy = llvm_float_ty;
-defvar doubleTy = llvm_double_ty;
+class DXILOpParamType {
+ int isOverload = 0;
+}
+
+let isOverload = 1 in {
+ def OverloadTy : DXILOpParamType;
+}
+def VoidTy : DXILOpParamType;
+def Int1Ty : DXILOpParamType;
+def Int8Ty : DXILOpParamType;
+def Int16Ty : DXILOpParamType;
+def Int32Ty : DXILOpParamType;
+def Int64Ty : DXILOpParamType;
+def HalfTy : DXILOpParamType;
+def FloatTy : DXILOpParamType;
+def DoubleTy : DXILOpParamType;
+def ResRetTy : DXILOpParamType;
+def HandleTy : DXILOpParamType;
class DXILOpClass;
@@ -268,9 +273,9 @@ def IsWave : DXILAttribute;
def NeedsUniformInputs : DXILAttribute;
def IsBarrier : DXILAttribute;
-class Overloads<Version ver, list<LLVMType> ols> {
+class Overloads<Version ver, list<DXILOpParamType> ols> {
Version dxil_version = ver;
- list<LLVMType> overload_types = ols;
+ list<DXILOpParamType> overload_types = ols;
}
class Stages<Version ver, list<DXILShaderStage> st> {
@@ -298,10 +303,10 @@ class DXILOp<int opcode, DXILOpClass opclass> {
Intrinsic LLVMIntrinsic = ?;
// Result type of the op
- LLVMType result;
+ DXILOpParamType result;
// List of argument types of the op. Default to 0 arguments.
- list<LLVMType> arguments = [];
+ list<DXILOpParamType> arguments = [];
// List of valid overload types predicated by DXIL version
list<Overloads> overloads = [];
@@ -318,9 +323,9 @@ class DXILOp<int opcode, DXILOpClass opclass> {
def Abs : DXILOp<6, unary> {
let Doc = "Returns the absolute value of the input.";
let LLVMIntrinsic = int_fabs;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy, doubleTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -328,9 +333,9 @@ def Abs : DXILOp<6, unary> {
def IsInf : DXILOp<9, isSpecialFloat> {
let Doc = "Determines if the specified value is infinite.";
let LLVMIntrinsic = int_dx_isinf;
- let arguments = [overloadTy];
- let result = i1Ty;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = Int1Ty;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -338,9 +343,9 @@ def IsInf : DXILOp<9, isSpecialFloat> {
def Cos : DXILOp<12, unary> {
let Doc = "Returns cosine(theta) for theta in radians.";
let LLVMIntrinsic = int_cos;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -348,9 +353,9 @@ def Cos : DXILOp<12, unary> {
def Sin : DXILOp<13, unary> {
let Doc = "Returns sine(theta) for theta in radians.";
let LLVMIntrinsic = int_sin;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -358,9 +363,9 @@ def Sin : DXILOp<13, unary> {
def Tan : DXILOp<14, unary> {
let Doc = "Returns tangent(theta) for theta in radians.";
let LLVMIntrinsic = int_tan;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -368,9 +373,9 @@ def Tan : DXILOp<14, unary> {
def ACos : DXILOp<15, unary> {
let Doc = "Returns the arccosine of the specified value.";
let LLVMIntrinsic = int_acos;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -378,9 +383,9 @@ def ACos : DXILOp<15, unary> {
def ASin : DXILOp<16, unary> {
let Doc = "Returns the arcsine of the specified value.";
let LLVMIntrinsic = int_asin;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -388,9 +393,9 @@ def ASin : DXILOp<16, unary> {
def ATan : DXILOp<17, unary> {
let Doc = "Returns the arctangent of the specified value.";
let LLVMIntrinsic = int_atan;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -398,9 +403,9 @@ def ATan : DXILOp<17, unary> {
def HCos : DXILOp<18, unary> {
let Doc = "Returns the hyperbolic cosine of the specified value.";
let LLVMIntrinsic = int_cosh;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -408,9 +413,9 @@ def HCos : DXILOp<18, unary> {
def HSin : DXILOp<19, unary> {
let Doc = "Returns the hyperbolic sine of the specified value.";
let LLVMIntrinsic = int_sinh;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -418,9 +423,9 @@ def HSin : DXILOp<19, unary> {
def HTan : DXILOp<20, unary> {
let Doc = "Returns the hyperbolic tan of the specified value.";
let LLVMIntrinsic = int_tanh;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -429,9 +434,9 @@ def Exp2 : DXILOp<21, unary> {
let Doc = "Returns the base 2 exponential, or 2**x, of the specified value. "
"exp2(x) = 2**x.";
let LLVMIntrinsic = int_exp2;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -440,9 +445,9 @@ def Frac : DXILOp<22, unary> {
let Doc = "Returns a fraction from 0 to 1 that represents the decimal part "
"of the input.";
let LLVMIntrinsic = int_dx_frac;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -450,9 +455,9 @@ def Frac : DXILOp<22, unary> {
def Log2 : DXILOp<23, unary> {
let Doc = "Returns the base-2 logarithm of the specified value.";
let LLVMIntrinsic = int_log2;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -461,9 +466,9 @@ def Sqrt : DXILOp<24, unary> {
let Doc = "Returns the square root of the specified floating-point value, "
"per component.";
let LLVMIntrinsic = int_sqrt;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -472,9 +477,9 @@ def RSqrt : DXILOp<25, unary> {
let Doc = "Returns the reciprocal of the square root of the specified value. "
"rsqrt(x) = 1 / sqrt(x).";
let LLVMIntrinsic = int_dx_rsqrt;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -483,9 +488,9 @@ def Round : DXILOp<26, unary> {
let Doc = "Returns the input rounded to the nearest integer within a "
"floating-point type.";
let LLVMIntrinsic = int_roundeven;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -494,9 +499,9 @@ def Floor : DXILOp<27, unary> {
let Doc =
"Returns the largest integer that is less than or equal to the input.";
let LLVMIntrinsic = int_floor;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -505,9 +510,9 @@ def Ceil : DXILOp<28, unary> {
let Doc = "Returns the smallest integer that is greater than or equal to the "
"input.";
let LLVMIntrinsic = int_ceil;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -515,9 +520,9 @@ def Ceil : DXILOp<28, unary> {
def Trunc : DXILOp<29, unary> {
let Doc = "Returns the specified value truncated to the integer component.";
let LLVMIntrinsic = int_trunc;
- let arguments = [overloadTy];
- let result = overloadTy;
- let overloads = [Overloads<DXIL1_0, [halfTy, floatTy]>];
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
+ let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -525,10 +530,10 @@ def Trunc : DXILOp<29, unary> {
def Rbits : DXILOp<30, unary> {
let Doc = "Returns the specified value with its bits reversed.";
let LLVMIntrinsic = int_bitreverse;
- let arguments = [overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [i16Ty, i32Ty, i64Ty]>];
+ [Overloads<DXIL1_0, [Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -536,10 +541,10 @@ def Rbits : DXILOp<30, unary> {
def FMax : DXILOp<35, binary> {
let Doc = "Float maximum. FMax(a,b) = a > b ? a : b";
let LLVMIntrinsic = int_maxnum;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [halfTy, floatTy, doubleTy]>];
+ [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -547,10 +552,10 @@ def FMax : DXILOp<35, binary> {
def FMin : DXILOp<36, binary> {
let Doc = "Float minimum. FMin(a,b) = a < b ? a : b";
let LLVMIntrinsic = int_minnum;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [halfTy, floatTy, doubleTy]>];
+ [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -558,10 +563,10 @@ def FMin : DXILOp<36, binary> {
def SMax : DXILOp<37, binary> {
let Doc = "Signed integer maximum. SMax(a,b) = a > b ? a : b";
let LLVMIntrinsic = int_smax;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [i16Ty, i32Ty, i64Ty]>];
+ [Overloads<DXIL1_0, [Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -569,10 +574,10 @@ def SMax : DXILOp<37, binary> {
def SMin : DXILOp<38, binary> {
let Doc = "Signed integer minimum. SMin(a,b) = a < b ? a : b";
let LLVMIntrinsic = int_smin;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [i16Ty, i32Ty, i64Ty]>];
+ [Overloads<DXIL1_0, [Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -580,10 +585,10 @@ def SMin : DXILOp<38, binary> {
def UMax : DXILOp<39, binary> {
let Doc = "Unsigned integer maximum. UMax(a,b) = a > b ? a : b";
let LLVMIntrinsic = int_umax;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [i16Ty, i32Ty, i64Ty]>];
+ [Overloads<DXIL1_0, [Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -591,10 +596,10 @@ def UMax : DXILOp<39, binary> {
def UMin : DXILOp<40, binary> {
let Doc = "Unsigned integer minimum. UMin(a,b) = a < b ? a : b";
let LLVMIntrinsic = int_umin;
- let arguments = [overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [i16Ty, i32Ty, i64Ty]>];
+ [Overloads<DXIL1_0, [Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
@@ -603,10 +608,10 @@ def FMad : DXILOp<46, tertiary> {
let Doc = "Floating point arithmetic multiply/add operation. fmad(m,a,b) = m "
"* a + b.";
let LLVMIntrinsic = int_fmuladd;
- let arguments = [overloadTy, overloadTy, overloadTy];
- let result = overloadTy;
+ let arguments = [OverloadTy, OverloadTy, OverloadTy];
+ let result = OverloadTy;
let overloads =
- [Overloads<DXIL1_0, [halfTy, floatTy, doubleTy]>];
+ [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let a...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/104247
More information about the llvm-branch-commits
mailing list