Skip to content
Commit 1ef32e78 authored by Marius Hillenbrand's avatar Marius Hillenbrand Committed by Uday Bondhugula
Browse files

[mlir][Arithmetic] Fix printing larger integer attributes in arith.const

For arith.constant operations of integer type, the operation generates
result names that include the value of the constant (i.e., the
IntegerAttr that defines the constant's value). That code currently
assumes integer widths of 64 bits or less and hits an assert with wider
constants or would create truncated and potentially ambiguous names when
built with assertions disabled.

To enable printing arith.constant ops for arbitrarily wide integer
types, change to use the IntegerAttr's function getValue() when
generating result names.

Also, add a regression test.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D129930
parent 73c84f9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment