[mlir] Disallow tensor types in VectorToSCF

Support for tensor types can be added if needed.

Differential Revision: https://reviews.llvm.org/D102749
This commit is contained in:
Matthias Springer 2021-05-21 22:44:45 +09:00
parent 884a6291f0
commit 8fb4897934
1 changed files with 6 additions and 0 deletions

View File

@ -485,6 +485,8 @@ LogicalResult checkPrepareXferOp(OpTy xferOp,
return failure();
if (xferOp.getVectorType().getRank() <= options.targetRank)
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
return success();
}
@ -802,6 +804,8 @@ struct UnrollTransferReadConversion
PatternRewriter &rewriter) const override {
if (xferOp.getVectorType().getRank() <= options.targetRank)
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
auto insertOp = getInsertOp(xferOp);
auto vec = getResultVector(xferOp, rewriter);
@ -918,6 +922,8 @@ struct UnrollTransferWriteConversion
PatternRewriter &rewriter) const override {
if (xferOp.getVectorType().getRank() <= options.targetRank)
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
auto vec = getDataVector(xferOp);
auto xferVecType = xferOp.getVectorType();