[Mlir-commits] [mlir] e858275 - [mlir][arith] `traits` need to be passed to parent op

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Oct 31 22:12:51 PDT 2021


Author: Mogball
Date: 2021-11-01T05:12:47Z
New Revision: e85827532b956bcd7ae6cdf7285416ca7e2cb59f

URL: https://github.com/llvm/llvm-project/commit/e85827532b956bcd7ae6cdf7285416ca7e2cb59f
DIFF: https://github.com/llvm/llvm-project/commit/e85827532b956bcd7ae6cdf7285416ca7e2cb59f.diff

LOG: [mlir][arith] `traits` need to be passed to parent op

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D112828

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td b/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td
index b3ef7ed02b038..4ec51079322ae 100644
--- a/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td
+++ b/mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td
@@ -92,16 +92,16 @@ def SignlessFixedWidthIntegerLike : TypeConstraint<Or<[
 // Cast from an integer type to another integer type.
 class Arith_IToICastOp<string mnemonic, list<OpTrait> traits = []> :
     Arith_CastOp<mnemonic, SignlessFixedWidthIntegerLike,
-                           SignlessFixedWidthIntegerLike>;
+                           SignlessFixedWidthIntegerLike, traits>;
 // Cast from an integer type to a floating point type.
 class Arith_IToFCastOp<string mnemonic, list<OpTrait> traits = []> :
-    Arith_CastOp<mnemonic, SignlessFixedWidthIntegerLike, FloatLike>;
+    Arith_CastOp<mnemonic, SignlessFixedWidthIntegerLike, FloatLike, traits>;
 // Cast from a floating point type to an integer type.
 class Arith_FToICastOp<string mnemonic, list<OpTrait> traits = []> :
-    Arith_CastOp<mnemonic, FloatLike, SignlessFixedWidthIntegerLike>;
+    Arith_CastOp<mnemonic, FloatLike, SignlessFixedWidthIntegerLike, traits>;
 // Cast from a floating point type to another floating point type.
 class Arith_FToFCastOp<string mnemonic, list<OpTrait> traits = []> :
-    Arith_CastOp<mnemonic, FloatLike, FloatLike>;
+    Arith_CastOp<mnemonic, FloatLike, FloatLike, traits>;
 
 // Base class for compare operations. Requires two operands of the same type
 // and returns a single `BoolLike` result. If the operand type is a vector or


        


More information about the Mlir-commits mailing list