Update the maximum integer bitwidth in MLIR.

Large integers are generated in Circt commonly which exceed 4kbits.  This aligns the maximum bitwidth in MLIR and LLVM.

Reviewed By: rriddle, lattner, mehdi_amini

Differential Revision: https://reviews.llvm.org/D94116
This commit is contained in:
Andrew Lenharth 2021-01-05 15:15:45 -06:00
parent 2bf6e443e5
commit bc8acf2ce8
2 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ public:
IntegerType scaleElementBitwidth(unsigned scale);
/// Integer representation maximal bitwidth.
static constexpr unsigned kMaxWidth = 4096;
static constexpr unsigned kMaxWidth = (1 << 24) - 1; // Aligned with LLVM
};
//===----------------------------------------------------------------------===//

View File

@ -135,8 +135,8 @@ func @test_alloc_memref_map_rank_mismatch() {
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
}