@@ -51,8 +51,8 @@ class Arith_BinaryOp<string mnemonic, list<Trait> traits = []> :
51
51
class Arith_IntBinaryOp<string mnemonic, list<Trait> traits = []> :
52
52
Arith_BinaryOp<mnemonic, traits #
53
53
[DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>]>,
54
- Arguments<(ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs)>,
55
- Results<(outs SignlessIntegerLike :$result)>;
54
+ Arguments<(ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs)>,
55
+ Results<(outs SignlessIntegerOrIndexLike :$result)>;
56
56
57
57
// Base class for integer binary operations without undefined behavior.
58
58
class Arith_TotalIntBinaryOp<string mnemonic, list<Trait> traits = []> :
@@ -155,11 +155,11 @@ class Arith_IntBinaryOpWithOverflowFlags<string mnemonic, list<Trait> traits = [
155
155
Arith_BinaryOp<mnemonic, traits #
156
156
[Pure, DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>,
157
157
DeclareOpInterfaceMethods<ArithIntegerOverflowFlagsInterface>]>,
158
- Arguments<(ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs,
158
+ Arguments<(ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs,
159
159
DefaultValuedAttr<
160
160
Arith_IntegerOverflowAttr,
161
161
"::mlir::arith::IntegerOverflowFlags::none">:$overflowFlags)>,
162
- Results<(outs SignlessIntegerLike :$result)> {
162
+ Results<(outs SignlessIntegerOrIndexLike :$result)> {
163
163
164
164
let assemblyFormat = [{ $lhs `,` $rhs (`overflow` `` $overflowFlags^)?
165
165
attr-dict `:` type($result) }];
@@ -198,7 +198,7 @@ def Arith_ConstantOp : Op<Arith_Dialect, "constant",
198
198
// However, it is necessary to allow arith.constant to return vectors/tensors
199
199
// of strings and signed/unsigned integers (for now) as an artefact of
200
200
// splitting the Standard dialect.
201
- let results = (outs /*SignlessIntegerOrFloatLike */AnyType:$result);
201
+ let results = (outs /*SignlessIntegerOrIndexOrFloatLike */AnyType:$result);
202
202
203
203
let extraClassDeclaration = [{
204
204
/// Whether the constant op can be constructed with a particular value and
@@ -288,8 +288,8 @@ def Arith_AddUIExtendedOp : Arith_Op<"addui_extended", [Pure, Commutative,
288
288
```
289
289
}];
290
290
291
- let arguments = (ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs);
292
- let results = (outs SignlessIntegerLike :$sum, BoolLike:$overflow);
291
+ let arguments = (ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs);
292
+ let results = (outs SignlessIntegerOrIndexLike :$sum, BoolLike:$overflow);
293
293
let assemblyFormat = [{
294
294
$lhs `,` $rhs attr-dict `:` type($sum) `,` type($overflow)
295
295
}];
@@ -429,8 +429,8 @@ def Arith_MulSIExtendedOp : Arith_Op<"mulsi_extended", [Pure, Commutative,
429
429
```
430
430
}];
431
431
432
- let arguments = (ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs);
433
- let results = (outs SignlessIntegerLike :$low, SignlessIntegerLike :$high);
432
+ let arguments = (ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs);
433
+ let results = (outs SignlessIntegerOrIndexLike :$low, SignlessIntegerOrIndexLike :$high);
434
434
435
435
let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($lhs)";
436
436
@@ -472,8 +472,8 @@ def Arith_MulUIExtendedOp : Arith_Op<"mului_extended", [Pure, Commutative,
472
472
```
473
473
}];
474
474
475
- let arguments = (ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs);
476
- let results = (outs SignlessIntegerLike :$low, SignlessIntegerLike :$high);
475
+ let arguments = (ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs);
476
+ let results = (outs SignlessIntegerOrIndexLike :$low, SignlessIntegerOrIndexLike :$high);
477
477
478
478
let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($lhs)";
479
479
@@ -1350,7 +1350,7 @@ def Arith_FPToSIOp : Arith_FToICastOp<"fptosi"> {
1350
1350
1351
1351
// Index cast can convert between memrefs of signless integers and indices too.
1352
1352
def IndexCastTypeConstraint : TypeConstraint<Or<[
1353
- SignlessIntegerLike .predicate,
1353
+ SignlessIntegerOrIndexLike .predicate,
1354
1354
MemRefOf<[AnySignlessInteger, Index]>.predicate]>,
1355
1355
"signless-integer-like or memref of signless-integer">;
1356
1356
@@ -1394,7 +1394,7 @@ def Arith_IndexCastUIOp
1394
1394
1395
1395
// Bitcast can convert between memrefs of signless integers and floats.
1396
1396
def BitcastTypeConstraint : TypeConstraint<Or<[
1397
- SignlessInteger.predicate, FloatLike .predicate,
1397
+ SignlessIntegerOrFloatLike .predicate,
1398
1398
MemRefOf<[AnySignlessInteger, AnyFloat]>.predicate]>,
1399
1399
"signless-integer-or-float-like or memref of signless-integer or float">;
1400
1400
@@ -1495,8 +1495,8 @@ def Arith_CmpIOp
1495
1495
}];
1496
1496
1497
1497
let arguments = (ins Arith_CmpIPredicateAttr:$predicate,
1498
- SignlessIntegerLikeOfAnyRank :$lhs,
1499
- SignlessIntegerLikeOfAnyRank :$rhs);
1498
+ SignlessIntegerOrIndexLikeOfAnyRank :$lhs,
1499
+ SignlessIntegerOrIndexLikeOfAnyRank :$rhs);
1500
1500
1501
1501
let hasFolder = 1;
1502
1502
let hasCanonicalizer = 1;
0 commit comments