[MLIR][Tensor] Remove assert in PadOp builder
authorLorenzo Chelini <l.chelini@icloud.com>
Wed, 19 Oct 2022 15:31:22 +0000 (17:31 +0200)
committerLorenzo Chelini <l.chelini@icloud.com>
Wed, 19 Oct 2022 16:02:50 +0000 (18:02 +0200)
commit9bcac22be559842cf488db469964fce37c2035a3
tree9282f3f241f8bdfaa7cb701b3fa679bec5f25f4d
parentd146a5241c5039fd25e8bf5a4ae1200ad201d06c
[MLIR][Tensor] Remove assert in PadOp builder

The assert is misplaced as the result type is allowed to be null. A few
lines below the result type is inferred if it is passed a nullptr.
Besides, this behavior is described in the documentation of the builder.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D136262
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp