[Mlir-commits] [mlir] [mlir][arith] Refine the verifier for arith.constant (PR #86178)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Mar 25 10:38:14 PDT 2024
================
@@ -190,6 +190,14 @@ LogicalResult arith::ConstantOp::verify() {
return emitOpError(
"value must be an integer, float, or elements attribute");
}
+
+ // Intializing scalable vectors with elements attribute is not supported
+ // unless it's a vector splot.
+ auto vecType = dyn_cast<VectorType>(type);
+ auto val = dyn_cast<DenseElementsAttr>(getValue());
+ if ((vecType && val) && vecType.isScalable() && !val.isSplat())
----------------
banach-space wrote:
I've not tried it yet, but intend to do so this week.
One worry that I have is naming - we may want to keep `ScalableVectorType` for when we _do_ update the hierarchy. This is worth trying nonetheless!
https://github.com/llvm/llvm-project/pull/86178
More information about the Mlir-commits
mailing list