[mlir][arith] Fix canon pattern for large ints in chained arith (#68900)
The logic for chained basic arithmetic operations in the `arith` dialect was using `getInt()` on `IntegerAttr`. This is a problem for very large integers. Specifically, in https://github.com/llvm/llvm-project/issues/64774 the following assertion failed: ``` Assertion failed: (getSignificantBits() <= 64 && "Too many bits for int64_t"), function getSExtValue, file APInt.h, line 1510. ``` According to a comment on `getInt()`, calls to `getInt()` should be replaced by `getValue()`: https://github.com/llvm/llvm-project/blob/ab6a66dbec61654d0962f6abf6d6c5b776937584/mlir/include/mlir/IR/BuiltinAttributes.td#L707-L708 This patch fixes https://github.com/llvm/llvm-project/issues/64774 by doing such a replacement. --------- Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
Loading
Please sign in to comment