diff options
author | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2024-04-08 14:38:54 +0100 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2024-04-08 14:39:20 +0100 |
commit | 40327a628ace90870c7caa0db448a0f2d9863df0 (patch) | |
tree | 16b1d152e6a77b767d36f29745d5442174361435 | |
parent | bdf428af9825e684d9ed22d0137a456c131389f7 (diff) | |
download | llvm-40327a628ace90870c7caa0db448a0f2d9863df0.zip llvm-40327a628ace90870c7caa0db448a0f2d9863df0.tar.gz llvm-40327a628ace90870c7caa0db448a0f2d9863df0.tar.bz2 |
Revert "[mlir][arith] Refine the verifier for arith.constant (#86178)"
This reverts commit 662c62609e8ee2dc996da69e11c0d594e799c299.
Broken both:
* https://lab.llvm.org/buildbot/#/builders/61/builds/56565
-rw-r--r-- | mlir/lib/Dialect/Arith/IR/ArithOps.cpp | 6 | ||||
-rw-r--r-- | mlir/test/Dialect/Arith/invalid.mlir | 9 |
2 files changed, 0 insertions, 15 deletions
diff --git a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp index efc4bfe..1d68a4f 100644 --- a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp +++ b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp @@ -213,12 +213,6 @@ LogicalResult arith::ConstantOp::verify() { return emitOpError( "value must be an integer, float, or elements attribute"); } - - auto vecType = dyn_cast<VectorType>(type); - if (vecType && vecType.isScalable() && !isa<SplatElementsAttr>(getValue())) - return emitOpError( - "intializing scalable vectors with elements attribute is not supported" - " unless it's a vector splat"); return success(); } diff --git a/mlir/test/Dialect/Arith/invalid.mlir b/mlir/test/Dialect/Arith/invalid.mlir index fdc907a..6d8ac0a 100644 --- a/mlir/test/Dialect/Arith/invalid.mlir +++ b/mlir/test/Dialect/Arith/invalid.mlir @@ -64,15 +64,6 @@ func.func @constant_out_of_range() { // ----- -func.func @constant_invalid_scalable_vec_initialization() { -^bb0: - // expected-error@+1 {{'arith.constant' op intializing scalable vectors with elements attribute is not supported unless it's a vector splat}} - %c = arith.constant dense<[0, 1]> : vector<[2] x i32> - return -} - -// ----- - func.func @constant_wrong_type() { ^bb: %x = "arith.constant"(){value = 10.} : () -> f32 // expected-error {{'arith.constant' op failed to verify that all of {value, result} have same type}} |