[mlir] Change verification order to prevent null dereference

Differential Revision: https://reviews.llvm.org/D100390
This commit is contained in:
Tres Popp 2021-04-13 17:31:41 +02:00
parent 096857426e
commit d80178f7c1
1 changed files with 3 additions and 3 deletions

View File

@ -2556,13 +2556,13 @@ LogicalResult mlir::vector::splitFullAndPartialTransfer(
"Expected splitFullAndPartialTransferPrecondition to hold");
auto xferReadOp = dyn_cast<vector::TransferReadOp>(xferOp.getOperation());
if (xferReadOp.mask())
return failure();
// TODO: add support for write case.
if (!xferReadOp)
return failure();
if (xferReadOp.mask())
return failure();
OpBuilder::InsertionGuard guard(b);
if (Operation *sourceOp = xferOp.source().getDefiningOp())
b.setInsertionPointAfter(sourceOp);