diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp --- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp +++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp @@ -487,6 +487,10 @@ return failure(); if (xferOp.getShapedType().template isa()) 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 @@ return failure(); if (xferOp.getShapedType().template isa()) 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 @@ return failure(); if (xferOp.getShapedType().template isa()) 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();