Skip to content

Commit 40327a6

Browse files
committed
Revert "[mlir][arith] Refine the verifier for arith.constant (#86178)"
This reverts commit 662c626. Broken both: * https://lab.llvm.org/buildbot/#/builders/61/builds/56565
1 parent bdf428a commit 40327a6

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

mlir/lib/Dialect/Arith/IR/ArithOps.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ LogicalResult arith::ConstantOp::verify() {
213213
return emitOpError(
214214
"value must be an integer, float, or elements attribute");
215215
}
216-
217-
auto vecType = dyn_cast<VectorType>(type);
218-
if (vecType && vecType.isScalable() && !isa<SplatElementsAttr>(getValue()))
219-
return emitOpError(
220-
"intializing scalable vectors with elements attribute is not supported"
221-
" unless it's a vector splat");
222216
return success();
223217
}
224218

mlir/test/Dialect/Arith/invalid.mlir

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ func.func @constant_out_of_range() {
6464

6565
// -----
6666

67-
func.func @constant_invalid_scalable_vec_initialization() {
68-
^bb0:
69-
// expected-error@+1 {{'arith.constant' op intializing scalable vectors with elements attribute is not supported unless it's a vector splat}}
70-
%c = arith.constant dense<[0, 1]> : vector<[2] x i32>
71-
return
72-
}
73-
74-
// -----
75-
7667
func.func @constant_wrong_type() {
7768
^bb:
7869
%x = "arith.constant"(){value = 10.} : () -> f32 // expected-error {{'arith.constant' op failed to verify that all of {value, result} have same type}}

0 commit comments

Comments
 (0)