From 8fb4897934dc054974083ebc82b849fba08a4af7 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Fri, 21 May 2021 22:44:45 +0900 Subject: [PATCH] [mlir] Disallow tensor types in VectorToSCF Support for tensor types can be added if needed. Differential Revision: https://reviews.llvm.org/D102749 --- mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp index bef847c1ffac..ee439c00b9b2 100644 --- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp +++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp @@ -485,6 +485,8 @@ LogicalResult checkPrepareXferOp(OpTy xferOp, return failure(); if (xferOp.getVectorType().getRank() <= options.targetRank) return failure(); + if (xferOp.getShapedType().template isa()) + 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()) + 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()) + return failure(); auto vec = getDataVector(xferOp); auto xferVecType = xferOp.getVectorType();