[Mlir-commits] [mlir] [mlir][arith.constant]Fix element type of the dense attributes in target attributes to be consistent with result type in LLVM::detail::oneToOneRewrite() (PR #149787)

Tobias Gysi llvmlistbot at llvm.org
Mon Jul 21 11:46:50 PDT 2025


gysit wrote:

> Are there scenarios where the attribute-return type mismatch is needed? Is this something that was needed in the past but it's no longer needed?

There are cases where there is not really a matching attribute type for the result type of a constant. For example, a constant that defines an llvm.array uses an attribute of tensor type. For the 8-bit floats the mismatch with the i8 result type is intended. In many other cases there may not be a specific reason and the verifier could possibly be further strengthened. @newling landed an improvement today (https://github.com/llvm/llvm-project/pull/148975). 

https://github.com/llvm/llvm-project/pull/149787


More information about the Mlir-commits mailing list