diff --git a/mlir/include/mlir/IR/BuiltinTypes.h b/mlir/include/mlir/IR/BuiltinTypes.h --- a/mlir/include/mlir/IR/BuiltinTypes.h +++ b/mlir/include/mlir/IR/BuiltinTypes.h @@ -139,7 +139,7 @@ IntegerType scaleElementBitwidth(unsigned scale); /// Integer representation maximal bitwidth. - static constexpr unsigned kMaxWidth = 4096; + static constexpr unsigned kMaxWidth = (1 << 24) - 1; // Aligned with LLVM }; //===----------------------------------------------------------------------===// diff --git a/mlir/test/IR/invalid-ops.mlir b/mlir/test/IR/invalid-ops.mlir --- a/mlir/test/IR/invalid-ops.mlir +++ b/mlir/test/IR/invalid-ops.mlir @@ -135,8 +135,8 @@ func @intlimit2() { ^bb: - %0 = "std.constant"() {value = 0} : () -> i4096 - %1 = "std.constant"() {value = 1} : () -> i4097 // expected-error {{integer bitwidth is limited to 4096 bits}} + %0 = "std.constant"() {value = 0} : () -> i16777215 + %1 = "std.constant"() {value = 1} : () -> i16777216 // expected-error {{integer bitwidth is limited to 16777215 bits}} return }