@@ -51,8 +51,8 @@ class Arith_BinaryOp<string mnemonic, list<Trait> traits = []> :
5151class Arith_IntBinaryOp<string mnemonic, list<Trait> traits = []> :
5252 Arith_BinaryOp<mnemonic, traits #
5353 [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)>;
5656
5757// Base class for integer binary operations without undefined behavior.
5858class Arith_TotalIntBinaryOp<string mnemonic, list<Trait> traits = []> :
@@ -155,11 +155,11 @@ class Arith_IntBinaryOpWithOverflowFlags<string mnemonic, list<Trait> traits = [
155155 Arith_BinaryOp<mnemonic, traits #
156156 [Pure, DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>,
157157 DeclareOpInterfaceMethods<ArithIntegerOverflowFlagsInterface>]>,
158- Arguments<(ins SignlessIntegerLike :$lhs, SignlessIntegerLike :$rhs,
158+ Arguments<(ins SignlessIntegerOrIndexLike :$lhs, SignlessIntegerOrIndexLike :$rhs,
159159 DefaultValuedAttr<
160160 Arith_IntegerOverflowAttr,
161161 "::mlir::arith::IntegerOverflowFlags::none">:$overflowFlags)>,
162- Results<(outs SignlessIntegerLike :$result)> {
162+ Results<(outs SignlessIntegerOrIndexLike :$result)> {
163163
164164 let assemblyFormat = [{ $lhs `,` $rhs (`overflow` `` $overflowFlags^)?
165165 attr-dict `:` type($result) }];
@@ -198,7 +198,7 @@ def Arith_ConstantOp : Op<Arith_Dialect, "constant",
198198 // However, it is necessary to allow arith.constant to return vectors/tensors
199199 // of strings and signed/unsigned integers (for now) as an artefact of
200200 // splitting the Standard dialect.
201- let results = (outs /*SignlessIntegerOrFloatLike */AnyType:$result);
201+ let results = (outs /*SignlessIntegerOrIndexOrFloatLike */AnyType:$result);
202202
203203 let extraClassDeclaration = [{
204204 /// 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,
288288 ```
289289 }];
290290
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);
293293 let assemblyFormat = [{
294294 $lhs `,` $rhs attr-dict `:` type($sum) `,` type($overflow)
295295 }];
@@ -429,8 +429,8 @@ def Arith_MulSIExtendedOp : Arith_Op<"mulsi_extended", [Pure, Commutative,
429429 ```
430430 }];
431431
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);
434434
435435 let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($lhs)";
436436
@@ -472,8 +472,8 @@ def Arith_MulUIExtendedOp : Arith_Op<"mului_extended", [Pure, Commutative,
472472 ```
473473 }];
474474
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);
477477
478478 let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($lhs)";
479479
@@ -1350,7 +1350,7 @@ def Arith_FPToSIOp : Arith_FToICastOp<"fptosi"> {
13501350
13511351// Index cast can convert between memrefs of signless integers and indices too.
13521352def IndexCastTypeConstraint : TypeConstraint<Or<[
1353- SignlessIntegerLike .predicate,
1353+ SignlessIntegerOrIndexLike .predicate,
13541354 MemRefOf<[AnySignlessInteger, Index]>.predicate]>,
13551355 "signless-integer-like or memref of signless-integer">;
13561356
@@ -1394,7 +1394,7 @@ def Arith_IndexCastUIOp
13941394
13951395// Bitcast can convert between memrefs of signless integers and floats.
13961396def BitcastTypeConstraint : TypeConstraint<Or<[
1397- SignlessInteger.predicate, FloatLike .predicate,
1397+ SignlessIntegerOrFloatLike .predicate,
13981398 MemRefOf<[AnySignlessInteger, AnyFloat]>.predicate]>,
13991399 "signless-integer-or-float-like or memref of signless-integer or float">;
14001400
@@ -1495,8 +1495,8 @@ def Arith_CmpIOp
14951495 }];
14961496
14971497 let arguments = (ins Arith_CmpIPredicateAttr:$predicate,
1498- SignlessIntegerLikeOfAnyRank :$lhs,
1499- SignlessIntegerLikeOfAnyRank :$rhs);
1498+ SignlessIntegerOrIndexLikeOfAnyRank :$lhs,
1499+ SignlessIntegerOrIndexLikeOfAnyRank :$rhs);
15001500
15011501 let hasFolder = 1;
15021502 let hasCanonicalizer = 1;
0 commit comments