[Mlir-commits] [mlir] f718a53 - [mlir] Disallow certain transfer ops in VectorToSCF
Matthias Springer
llvmlistbot at llvm.org
Tue May 25 05:39:54 PDT 2021
Author: Matthias Springer
Date: 2021-05-25T21:39:43+09:00
New Revision: f718a53d7e13e7452a4bc9f265659bfb296cd4cc
URL: https://github.com/llvm/llvm-project/commit/f718a53d7e13e7452a4bc9f265659bfb296cd4cc
DIFF: https://github.com/llvm/llvm-project/commit/f718a53d7e13e7452a4bc9f265659bfb296cd4cc.diff
LOG: [mlir] Disallow certain transfer ops in VectorToSCF
Disallow transfer ops that change the element type of the transfer. Such transfers could be supported in the future, if needed.
Differential Revision: https://reviews.llvm.org/D102746
Added:
Modified:
mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
index bb0b5162cc0f..48a1b6b320a8 100644
--- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
+++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
@@ -487,6 +487,10 @@ LogicalResult checkPrepareXferOp(OpTy xferOp,
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
+ // Transfer ops that modify the element type are not supported atm.
+ if (xferOp.getVectorType().getElementType() !=
+ xferOp.getShapedType().getElementType())
+ return failure();
return success();
}
@@ -806,6 +810,10 @@ struct UnrollTransferReadConversion
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
+ // Transfer ops that modify the element type are not supported atm.
+ if (xferOp.getVectorType().getElementType() !=
+ xferOp.getShapedType().getElementType())
+ return failure();
auto insertOp = getInsertOp(xferOp);
auto vec = getResultVector(xferOp, rewriter);
@@ -924,6 +932,10 @@ struct UnrollTransferWriteConversion
return failure();
if (xferOp.getShapedType().template isa<RankedTensorType>())
return failure();
+ // Transfer ops that modify the element type are not supported atm.
+ if (xferOp.getVectorType().getElementType() !=
+ xferOp.getShapedType().getElementType())
+ return failure();
auto vec = getDataVector(xferOp);
auto xferVecType = xferOp.getVectorType();
More information about the Mlir-commits
mailing list