@@ -28,7 +28,7 @@ macro_rules! infer_return_ty_for_unary_op {
28
28
/// Increment
29
29
#[ operation (
30
30
dialect = ArithDialect ,
31
- traits( UnaryOp , SameOperandsAndResultType ) ,
31
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
32
32
implements( InferTypeOpInterface , MemoryEffectOpInterface )
33
33
) ]
34
34
pub struct Incr {
@@ -44,7 +44,7 @@ has_no_effects!(Incr);
44
44
/// Negation
45
45
#[ operation (
46
46
dialect = ArithDialect ,
47
- traits( UnaryOp , SameOperandsAndResultType ) ,
47
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
48
48
implements( InferTypeOpInterface , MemoryEffectOpInterface )
49
49
) ]
50
50
pub struct Neg {
@@ -60,7 +60,7 @@ has_no_effects!(Neg);
60
60
/// Modular inverse
61
61
#[ operation (
62
62
dialect = ArithDialect ,
63
- traits( UnaryOp , SameOperandsAndResultType ) ,
63
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
64
64
implements( InferTypeOpInterface , MemoryEffectOpInterface )
65
65
) ]
66
66
pub struct Inv {
@@ -76,7 +76,7 @@ has_no_effects!(Inv);
76
76
/// log2(operand)
77
77
#[ operation (
78
78
dialect = ArithDialect ,
79
- traits( UnaryOp , SameOperandsAndResultType ) ,
79
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
80
80
implements( InferTypeOpInterface , MemoryEffectOpInterface )
81
81
) ]
82
82
pub struct Ilog2 {
@@ -92,7 +92,7 @@ has_no_effects!(Ilog2);
92
92
/// pow2(operand)
93
93
#[ operation (
94
94
dialect = ArithDialect ,
95
- traits( UnaryOp , SameOperandsAndResultType ) ,
95
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
96
96
implements( InferTypeOpInterface , MemoryEffectOpInterface )
97
97
) ]
98
98
pub struct Pow2 {
@@ -108,7 +108,7 @@ has_no_effects!(Pow2);
108
108
/// Logical NOT
109
109
#[ operation (
110
110
dialect = ArithDialect ,
111
- traits( UnaryOp , SameOperandsAndResultType ) ,
111
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
112
112
implements( InferTypeOpInterface , MemoryEffectOpInterface )
113
113
114
114
) ]
@@ -125,7 +125,7 @@ has_no_effects!(Not);
125
125
/// Bitwise NOT
126
126
#[ operation (
127
127
dialect = ArithDialect ,
128
- traits( UnaryOp , SameOperandsAndResultType ) ,
128
+ traits( UnaryOp , SameTypeOperands , SameOperandsAndResultType ) ,
129
129
implements( InferTypeOpInterface , MemoryEffectOpInterface )
130
130
) ]
131
131
pub struct Bnot {
0 commit comments