[Mlir-commits] [mlir] [MLIR][Arith] Ensure ConstantOp validates signless integers for vectors (PR #177857)
Miloš Poletanović
llvmlistbot at llvm.org
Sun Jan 25 11:15:56 PST 2026
================
@@ -232,9 +232,11 @@ bool arith::ConstantOp::isBuildableWith(Attribute value, Type type) {
if (!typedAttr || typedAttr.getType() != type)
return false;
// Integer values must be signless.
- if (llvm::isa<IntegerType>(type) &&
- !llvm::cast<IntegerType>(type).isSignless())
- return false;
+ auto elemType = getElementTypeOrSelf(type);
+ if (auto intType = dyn_cast<IntegerType>(elemType)) {
----------------
milos1397 wrote:
Done.
https://github.com/llvm/llvm-project/pull/177857
More information about the Mlir-commits
mailing list