Issue 128315
Summary [MLIR]`-test-transform-dialect-erase-schedule` triggers LLVM ERROR: operation destroyed but still has uses
Labels mlir
Assignees
Reporter xisang0
    Test on commit: https://github.com/llvm/llvm-project/commit/a9882bda96228ca23e166a817f93a7dbc99763cb
steps to reproduce:
```
mlir-opt test.mlir -test-transform-dialect-erase-schedule
```
test case:
```
module {
 func.func @transform_main(%arg0: !transform.any_op) {
    %matched = transform.structured.match interface{TilingInterface} in %arg0 : (!transform.any_op) -> !transform.any_op
    transform.debug.emit_remark_at %matched, "tileable" : !transform.any_op
    return
  }
}
```
crash trace:
```
LLVM ERROR: operation destroyed but still has uses
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: ./mlir-opt /home/workdir/test.mlir -test-transform-dialect-erase-schedule
 #0 0x00005e15cae21998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x108a998)
 #1 0x00005e15cae1f4be llvm::sys::RunSignalHandlers() (./mlir-opt+0x10884be)
 #2 0x00005e15cae223a8 SignalHandler(int) Signals.cpp:0:0
 #3 0x0000716abecfd520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000716abed519fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x0000716abecfd476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x0000716abece37f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00005e15cae4191c llvm::report_fatal_error(llvm::Twine const&, bool) (./mlir-opt+0x10aa91c)
 #8 0x00005e15cae41766 (./mlir-opt+0x10aa766)
 #9 0x00005e15ce29082d mlir::Operation::~Operation() (./mlir-opt+0x44f982d)
#10 0x00005e15ce298902 llvm::iplist_impl<llvm::simple_ilist<mlir::Operation>, llvm::ilist_traits<mlir::Operation>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, false, false>) (./mlir-opt+0x4501902)
#11 0x00005e15ce087a49 mlir::WalkResult llvm::function_ref<mlir::WalkResult (mlir::Operation*)>::callback_fn<(anonymous namespace)::TestTransformDialectEraseSchedulePass::runOnOperation()::'lambda'(mlir::Operation*)>(long, mlir::Operation*) TestTransformDialectInterpreter.cpp:0:0
#12 0x00005e15caf48fc8 mlir::WalkResult mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (./mlir-opt+0x11b1fc8)
#13 0x00005e15caf48f77 mlir::WalkResult mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (./mlir-opt+0x11b1f77)
#14 0x00005e15caf48f77 mlir::WalkResult mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) (./mlir-opt+0x11b1f77)
#15 0x00005e15ce08794c (anonymous namespace)::TestTransformDialectEraseSchedulePass::runOnOperation() TestTransformDialectInterpreter.cpp:0:0
#16 0x00005e15ce0f23bf mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x435b3bf)
#17 0x00005e15ce0f2ba2 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x435bba2)
#18 0x00005e15ce0f534e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x435e34e)
#19 0x00005e15ce0ede6b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#20 0x00005e15ce0edacb llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#21 0x00005e15ce196df5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./mlir-opt+0x43ffdf5)
#22 0x00005e15ce0e89b2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x43519b2)
#23 0x00005e15ce0e8c63 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4351c63)
#24 0x00005e15ce0e8e72 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4351e72)
#25 0x00005e15cae00c27 main (./mlir-opt+0x1069c27)
#26 0x0000716abece4d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#27 0x0000716abece4e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#28 0x00005e15cae00795 _start (./mlir-opt+0x1069795)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to