From 8813bbdf6c668721c485362d22a332d93154b104 Mon Sep 17 00:00:00 2001 From: Groverkss Date: Wed, 23 Aug 2023 02:43:08 +0530 Subject: [PATCH] Fix bug --- .../compiler/Dialect/Flow/Transforms/RaiseSpecialOps.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/RaiseSpecialOps.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/RaiseSpecialOps.cpp index 6041412dfd53..02e2b8c931f2 100644 --- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/RaiseSpecialOps.cpp +++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/RaiseSpecialOps.cpp @@ -286,17 +286,16 @@ struct RaiseSpecialOpsPass : public RaiseSpecialOpsBase { IRRewriter rewriter(&getContext()); getOperation()->walk([&](linalg::GenericOp op) { - rewriter.setInsertionPoint(op); - // Try raising to tensor.export. + rewriter.setInsertionPoint(op); FailureOr maybeNewOp = raiseTensorExtractToInput(op, rewriter); - // Update op if we succeeded. if (succeeded(maybeNewOp)) { - op = maybeNewOp.value(); + op = *maybeNewOp; } // Try raising to a view-like operation. + rewriter.setInsertionPoint(op); (void)tryRaiseToView(op, rewriter); });