From 9f235a88f171b4ae6bcb9b45f5639c3810d5bf20 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 27 Apr 2022 16:07:21 -0700 Subject: [PATCH] [mlir][msan] Don't access destroyed node --- mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp index bf028c3..6e633cf 100644 --- a/mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp +++ b/mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp @@ -1949,8 +1949,9 @@ public: // edges, and it does not write to a memref which escapes the // function. if (mdg->getOutEdgeCount(sibNode->id) == 0) { + Operation *op = sibNode->op; mdg->removeNode(sibNode->id); - sibNode->op->erase(); + op->erase(); } } -- 2.7.4