[Mlir-commits] [mlir] [MLIR] Fix parsed integers exceeding the expected bitwidth (PR #119971)
William Moses
llvmlistbot at llvm.org
Sat Dec 14 07:28:42 PST 2024
================
@@ -83,7 +83,7 @@ parseMonomial(AsmParser &parser, Monomial &monomial, llvm::StringRef &variable,
// If there's a **, then the integer exponent is required.
APInt parsedExponent(apintBitWidth, 0);
- if (failed(parser.parseInteger(parsedExponent))) {
+ if (failed(parser.parseInteger(parsedExponent, apintBitWidth, true))) {
----------------
wsmoses wrote:
this probably ought be signless (cc @j2kun) can you make apSignless a constexpr variable like https://github.com/llvm/llvm-project/blob/c3276a96d909233b836e839a23a7ad510fae407a/mlir/include/mlir/Dialect/Polynomial/IR/Polynomial.h#L30
https://github.com/llvm/llvm-project/pull/119971
More information about the Mlir-commits
mailing list