diff options
Diffstat (limited to 'mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp')
| -rw-r--r-- | mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp b/mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp index 54c5b93877ff..95aedef7764f 100644 --- a/mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp +++ b/mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp @@ -130,11 +130,10 @@ LogicalResult LLVM::detail::vectorOneToOneRewrite( auto callback = [op, targetOp, &rewriter](Type llvm1DVectorTy, ValueRange operands) { - OperationState state(op->getLoc(), targetOp); - state.addTypes(llvm1DVectorTy); - state.addOperands(operands); - state.addAttributes(op->getAttrs()); - return rewriter.createOperation(state)->getResult(0); + return rewriter + .create(op->getLoc(), rewriter.getStringAttr(targetOp), operands, + llvm1DVectorTy, op->getAttrs()) + ->getResult(0); }; return handleMultidimensionalVectors(op, operands, typeConverter, callback, |
