Skip to content

Commit 4149ec9

Browse files
committed
[MLIR] Remove redundant verifier code in arith::ConstantOp
This is already checked by the `AllTypesMatch` traits defined in ODS.
1 parent 7670af5 commit 4149ec9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,6 @@ void arith::ConstantOp::getAsmResultNames(
207207
/// or float like.
208208
LogicalResult arith::ConstantOp::verify() {
209209
auto type = getType();
210-
// The value's type must match the return type.
211-
if (getValue().getType() != type) {
212-
return emitOpError() << "value type " << getValue().getType()
213-
<< " must match return type: " << type;
214-
}
215210
// Integer values must be signless.
216211
if (llvm::isa<IntegerType>(type) &&
217212
!llvm::cast<IntegerType>(type).isSignless())

0 commit comments

Comments
 (0)