Issue 204295
Summary [mlir](generate-runtime-verification) mlir-opt crashes with generate-runtime-verification
Labels mlir
Assignees
Reporter Aran-414
    git version: bf8b7787f96a9e6d42c5fc4f49c25352b81e90cb

MLIR Program:
```mlir
module {
  func.func @fold_store_keep_nontemporal(%arg0: memref<12x32xf32>, %arg1: index, %arg2: index, %arg3: index, %arg4: index, %arg5: f32) {
    %subview = memref.subview %arg0[%arg1, %arg2] [4, 4] [2, 3] : memref<12x32xf32> to memref<4x4xf32, strided<[64, 3], offset: ?>>
 return
  }
}
```

Reproduce Command: `mlir-opt -generate-runtime-verification a.mlir`

StackTrace:
```
LLVM ERROR: scf.yield created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR tool used.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /data2/dependency/dev/llvm-project/build/bin/mlir-opt -generate-runtime-verification a.mlir
 #0 0x000056342d541fff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x25b8fff)
 #1 0x000056342d53e7cc llvm::sys::RunSignalHandlers() (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x25b57cc)
 #2 0x000056342d53e967 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007fe989db8420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007fe9898a300b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007fe989882859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x000056342d466705 (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x24dd705)
 #7 0x00005634366993e9 mlir::Operation::Operation(mlir::Location, mlir::OperationName, unsigned int, unsigned int, unsigned int, int, mlir::DictionaryAttr, mlir::PropertyRef, bool) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb7103e9)
 #8 0x0000563436699bba mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::PropertyRef, mlir::BlockRange, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb710bba)
 #9 0x000056343669a34a mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::PropertyRef, mlir::BlockRange, mlir::RegionRange) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb71134a)
#10 0x000056343669abb8 mlir::Operation::create(mlir::OperationState const&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb711bb8)
#11 0x00005634365d4d93 mlir::OpBuilder::create(mlir::OperationState const&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb64bd93)
#12 0x0000563435d81fdd mlir::scf::YieldOp::create(mlir::OpBuilder&, mlir::Location, mlir::ValueRange) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xadf8fdd)
#13 0x0000563434822f47 void llvm::function_ref<void (mlir::OpBuilder&, mlir::Location)>::callback_fn<mlir::memref::(anonymous namespace)::SubViewOpInterface::generateRuntimeVerification(mlir::Operation*, mlir::OpBuilder&, mlir::Location, llvm::function_ref<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> (mlir::Operation*, llvm::StringRef)>) const::'lambda'(mlir::OpBuilder&, mlir::Location)>(long, mlir::OpBuilder&, mlir::Location) RuntimeOpVerification.cpp:0:0
#14 0x0000563435d81423 mlir::scf::IfOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::Value, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location)>, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location)>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xadf8423)
#15 0x0000563435d8921b mlir::scf::IfOp::create(mlir::OpBuilder&, mlir::Location, mlir::Value, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location)>, llvm::function_ref<void (mlir::OpBuilder&, mlir::Location)>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xae0021b)
#16 0x0000563434827f48 mlir::memref::(anonymous namespace)::SubViewOpInterface::generateRuntimeVerification(mlir::Operation*, mlir::OpBuilder&, mlir::Location, llvm::function_ref<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> (mlir::Operation*, llvm::StringRef)>) const (.isra.0) RuntimeOpVerification.cpp:0:0
#17 0x00005634361d8b08 (anonymous namespace)::GenerateRuntimeVerificationPass::runOnOperation() GenerateRuntimeVerification.cpp:0:0
#18 0x000056343631fac1 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb396ac1)
#19 0x000056343631fe50 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb396e50)
#20 0x0000563436321f04 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb398f04)
#21 0x0000563436322f91 mlir::PassManager::run(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb399f91)
#22 0x000056342d60778b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#23 0x000056342d608233 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, mlir::SourceMgrDiagnosticVerifierHandler*, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#24 0x000056342d6084bb llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, 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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#25 0x00005634366faa15 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::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb771a15)
#26 0x000056342d5fe5c4 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (.part.0) MlirOptMain.cpp:0:0
#27 0x000056342d6089d7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x267f9d7)
#28 0x000056342d608c13 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x267fc13)
#29 0x000056342d46eabc main (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x24e5abc)
#30 0x00007fe989884083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#31 0x000056342d51e70e _start (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x259570e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to