forked from OSchip/llvm-project
[spirv] NFC: rename SPV_ArithmeticOp to SPV_ArithmeticBinaryOp
Also rename SPV_UnaryArithmeticOp to SPV_ArithmeticUnaryOp to be consistent. PiperOrigin-RevId: 272173974
This commit is contained in:
parent
1129931a62
commit
f8ae739613
|
@ -29,14 +29,14 @@
|
|||
include "mlir/SPIRV/SPIRVBase.td"
|
||||
#endif // SPIRV_BASE
|
||||
|
||||
class SPV_ArithmeticOp<string mnemonic, Type type,
|
||||
class SPV_ArithmeticBinaryOp<string mnemonic, Type type,
|
||||
list<OpTrait> traits = []> :
|
||||
// Operands type same as result type.
|
||||
SPV_BinaryOp<mnemonic, type, type,
|
||||
!listconcat(traits,
|
||||
[NoSideEffect, SameOperandsAndResultType])>;
|
||||
|
||||
class SPV_UnaryArithmeticOp<string mnemonic, Type type,
|
||||
class SPV_ArithmeticUnaryOp<string mnemonic, Type type,
|
||||
list<OpTrait> traits = []> :
|
||||
// Operand type same as result type.
|
||||
SPV_UnaryOp<mnemonic, type, type,
|
||||
|
@ -45,7 +45,7 @@ class SPV_UnaryArithmeticOp<string mnemonic, Type type,
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FAddOp : SPV_ArithmeticOp<"FAdd", SPV_Float, [Commutative]> {
|
||||
def SPV_FAddOp : SPV_ArithmeticBinaryOp<"FAdd", SPV_Float, [Commutative]> {
|
||||
let summary = "Floating-point addition of Operand 1 and Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -74,7 +74,7 @@ def SPV_FAddOp : SPV_ArithmeticOp<"FAdd", SPV_Float, [Commutative]> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FDivOp : SPV_ArithmeticOp<"FDiv", SPV_Float, []> {
|
||||
def SPV_FDivOp : SPV_ArithmeticBinaryOp<"FDiv", SPV_Float, []> {
|
||||
let summary = "Floating-point division of Operand 1 divided by Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -105,7 +105,7 @@ def SPV_FDivOp : SPV_ArithmeticOp<"FDiv", SPV_Float, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FModOp : SPV_ArithmeticOp<"FMod", SPV_Float, []> {
|
||||
def SPV_FModOp : SPV_ArithmeticBinaryOp<"FMod", SPV_Float, []> {
|
||||
let summary = [{
|
||||
The floating-point remainder whose sign matches the sign of Operand 2.
|
||||
}];
|
||||
|
@ -139,7 +139,7 @@ def SPV_FModOp : SPV_ArithmeticOp<"FMod", SPV_Float, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FMulOp : SPV_ArithmeticOp<"FMul", SPV_Float, [Commutative]> {
|
||||
def SPV_FMulOp : SPV_ArithmeticBinaryOp<"FMul", SPV_Float, [Commutative]> {
|
||||
let summary = "Floating-point multiplication of Operand 1 and Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -170,7 +170,7 @@ def SPV_FMulOp : SPV_ArithmeticOp<"FMul", SPV_Float, [Commutative]> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FNegateOp : SPV_UnaryArithmeticOp<"FNegate", SPV_Float, []> {
|
||||
def SPV_FNegateOp : SPV_ArithmeticUnaryOp<"FNegate", SPV_Float, []> {
|
||||
let summary = "Floating-point subtract of Operand from zero.";
|
||||
|
||||
let description = [{
|
||||
|
@ -199,7 +199,7 @@ def SPV_FNegateOp : SPV_UnaryArithmeticOp<"FNegate", SPV_Float, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FRemOp : SPV_ArithmeticOp<"FRem", SPV_Float, []> {
|
||||
def SPV_FRemOp : SPV_ArithmeticBinaryOp<"FRem", SPV_Float, []> {
|
||||
let summary = [{
|
||||
The floating-point remainder whose sign matches the sign of Operand 1.
|
||||
}];
|
||||
|
@ -234,7 +234,7 @@ def SPV_FRemOp : SPV_ArithmeticOp<"FRem", SPV_Float, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_FSubOp : SPV_ArithmeticOp<"FSub", SPV_Float, []> {
|
||||
def SPV_FSubOp : SPV_ArithmeticBinaryOp<"FSub", SPV_Float, []> {
|
||||
let summary = "Floating-point subtraction of Operand 2 from Operand 1.";
|
||||
|
||||
let description = [{
|
||||
|
@ -264,7 +264,7 @@ def SPV_FSubOp : SPV_ArithmeticOp<"FSub", SPV_Float, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_IAddOp : SPV_ArithmeticOp<"IAdd", SPV_Integer, [Commutative]> {
|
||||
def SPV_IAddOp : SPV_ArithmeticBinaryOp<"IAdd", SPV_Integer, [Commutative]> {
|
||||
let summary = "Integer addition of Operand 1 and Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -300,7 +300,7 @@ def SPV_IAddOp : SPV_ArithmeticOp<"IAdd", SPV_Integer, [Commutative]> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_IMulOp : SPV_ArithmeticOp<"IMul", SPV_Integer, [Commutative]> {
|
||||
def SPV_IMulOp : SPV_ArithmeticBinaryOp<"IMul", SPV_Integer, [Commutative]> {
|
||||
let summary = "Integer multiplication of Operand 1 and Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -336,7 +336,7 @@ def SPV_IMulOp : SPV_ArithmeticOp<"IMul", SPV_Integer, [Commutative]> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_ISubOp : SPV_ArithmeticOp<"ISub", SPV_Integer, []> {
|
||||
def SPV_ISubOp : SPV_ArithmeticBinaryOp<"ISub", SPV_Integer, []> {
|
||||
let summary = "Integer subtraction of Operand 2 from Operand 1.";
|
||||
|
||||
let description = [{
|
||||
|
@ -372,7 +372,7 @@ def SPV_ISubOp : SPV_ArithmeticOp<"ISub", SPV_Integer, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_SDivOp : SPV_ArithmeticOp<"SDiv", SPV_Integer, []> {
|
||||
def SPV_SDivOp : SPV_ArithmeticBinaryOp<"SDiv", SPV_Integer, []> {
|
||||
let summary = "Signed-integer division of Operand 1 divided by Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -405,7 +405,7 @@ def SPV_SDivOp : SPV_ArithmeticOp<"SDiv", SPV_Integer, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_SModOp : SPV_ArithmeticOp<"SMod", SPV_Integer, []> {
|
||||
def SPV_SModOp : SPV_ArithmeticBinaryOp<"SMod", SPV_Integer, []> {
|
||||
let summary = [{
|
||||
Signed remainder operation for the remainder whose sign matches the sign
|
||||
of Operand 2.
|
||||
|
@ -442,7 +442,7 @@ def SPV_SModOp : SPV_ArithmeticOp<"SMod", SPV_Integer, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_SRemOp : SPV_ArithmeticOp<"SRem", SPV_Integer, []> {
|
||||
def SPV_SRemOp : SPV_ArithmeticBinaryOp<"SRem", SPV_Integer, []> {
|
||||
let summary = [{
|
||||
Signed remainder operation for the remainder whose sign matches the sign
|
||||
of Operand 1.
|
||||
|
@ -479,7 +479,7 @@ def SPV_SRemOp : SPV_ArithmeticOp<"SRem", SPV_Integer, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_UDivOp : SPV_ArithmeticOp<"UDiv", SPV_Integer, []> {
|
||||
def SPV_UDivOp : SPV_ArithmeticBinaryOp<"UDiv", SPV_Integer, []> {
|
||||
let summary = "Unsigned-integer division of Operand 1 divided by Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
@ -511,7 +511,7 @@ def SPV_UDivOp : SPV_ArithmeticOp<"UDiv", SPV_Integer, []> {
|
|||
|
||||
// -----
|
||||
|
||||
def SPV_UModOp : SPV_ArithmeticOp<"UMod", SPV_Integer> {
|
||||
def SPV_UModOp : SPV_ArithmeticBinaryOp<"UMod", SPV_Integer> {
|
||||
let summary = "Unsigned modulo operation of Operand 1 modulo Operand 2.";
|
||||
|
||||
let description = [{
|
||||
|
|
Loading…
Reference in New Issue