Enhance the type system to support arbitrary precision integers, which are
important for low-bitwidth inference cases and hardware synthesis targets.

Rename 'int' to 'affineint' to avoid confusion between "the integers" and "the int
type".

PiperOrigin-RevId: 202751508
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index 408fe13..fb4c2cc 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -6,7 +6,7 @@
 ; Check different error cases.
 ; -----
 
-extfunc @illegaltype(i42) ; expected-error {{expected type}}
+extfunc @illegaltype(i) ; expected-error {{expected type}}
 
 ; -----
 
@@ -19,7 +19,7 @@
 
 ; -----
 
-extfunc missingsigil() -> (i1, int, f32) ; expected-error {{expected a function identifier like}}
+extfunc missingsigil() -> (i1, affineint, f32) ; expected-error {{expected a function identifier like}}
 
 
 ; -----
@@ -75,3 +75,9 @@
   ""()   ; expected-error {{empty operation name is invalid}}
   return
 }
+
+; -----
+
+extfunc @illegaltype(i0) ; expected-error {{invalid integer width}}
+
+
diff --git a/test/IR/parser.mlir b/test/IR/parser.mlir
index d69192d..1b9d9cb 100644
--- a/test/IR/parser.mlir
+++ b/test/IR/parser.mlir
@@ -10,25 +10,28 @@
 ; CHECK: extfunc @bar()
 extfunc @bar() -> ()
 
-; CHECK: extfunc @baz() -> (i1, int, f32)
-extfunc @baz() -> (i1, int, f32)
+; CHECK: extfunc @baz() -> (i1, affineint, f32)
+extfunc @baz() -> (i1, affineint, f32)
 
 ; CHECK: extfunc @missingReturn()
 extfunc @missingReturn()
 
+; CHECK: extfunc @int_types(i1, i2, i4, i7, i87) -> (i1, affineint, i19)
+extfunc @int_types(i1, i2, i4, i7, i87) -> (i1, affineint, i19)
+
 
 ; CHECK: extfunc @vectors(vector<1xf32>, vector<2x4xf32>)
 extfunc @vectors(vector<1 x f32>, vector<2x4xf32>)
 
-; CHECK: extfunc @tensors(tensor<??f32>, tensor<??vector<2x4xf32>>, tensor<1x?x4x?x?xint>, tensor<i8>)
+; CHECK: extfunc @tensors(tensor<??f32>, tensor<??vector<2x4xf32>>, tensor<1x?x4x?x?xaffineint>, tensor<i8>)
 extfunc @tensors(tensor<?? f32>, tensor<?? vector<2x4xf32>>,
-                 tensor<1x?x4x?x?xint>, tensor<i8>)
+                 tensor<1x?x4x?x?xaffineint>, tensor<i8>)
 
 ; CHECK: extfunc @memrefs(i1, i1)
-extfunc @memrefs(memref<1x?x4x?x?xint>, memref<i8>)
+extfunc @memrefs(memref<1x?x4x?x?xaffineint>, memref<i8>)
 
 ; CHECK: extfunc @functions((i1, i1) -> (), () -> ())
-extfunc @functions((memref<1x?x4x?x?xint>, memref<i8>) -> (), ()->())
+extfunc @functions((memref<1x?x4x?x?xaffineint>, memref<i8>) -> (), ()->())
 
 
 ; CHECK-LABEL: cfgfunc @simpleCFG() {