| Issue |
203861
|
| Summary |
[mlir] -test-written-to test_tag: a: bug report
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
Anonymous7i0em3yd
|
git version: 58031e519153fdbe637f9f135ac1fbfef6f0e224
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -test-written-to a.mlir`
a.mlir:
```mlir
module {
llvm.func @f(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i64) attributes {llvm.emitc.entity_analysis} {
%0 = llvm.mlir.undef : !llvm.struct<(ptr, ptr, i64)>
%1 = llvm.insertvalue %arg0, %0[0] : !llvm.struct<(ptr, ptr, i64)>
%2 = llvm.insertvalue %arg1, %1[1] : !llvm.struct<(ptr, ptr, i64)>
%3 = llvm.insertvalue %arg2, %2[2] : !llvm.struct<(ptr, ptr, i64)>
%4 = builtin.unrealized_conversion_cast %3 : !llvm.struct<(ptr, ptr, i64)> to memref<f32>
%5 = llvm.mlir.constant(1.000000e+00 : f32) : f32
memref.store %5, %4[] {tag = "a"} : memref<f32>
%6 = memref.load %4[] {tag = "b"} : memref<f32>
llvm.return
}
llvm.func @_mlir_ciface_f(%arg0: !llvm.ptr) attributes {llvm.emit_c_interface, llvm.emitc.ciface, used_versions = ["old", "old"]} {
%0 = llvm.load %arg0 : !llvm.ptr -> !llvm.struct<(ptr, ptr, i64)>
%1 = llvm.extractvalue %0[0] : !llvm.struct<(ptr, ptr, i64)>
%2 = llvm.extractvalue %0[1] : !llvm.struct<(ptr, ptr, i64)>
%3 = llvm.extractvalue %0[2] : !llvm.struct<(ptr, ptr, i64)>
llvm.call @f(%1, %2, %3) : (!llvm.ptr, !llvm.ptr, i64) -> ()
llvm.return
}
}
```
stack trace:
```
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: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -test-written-to 19.mlir
#0 0x0000559de180f798 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1ff4798)
#1 0x0000559de180c631 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1ff1631)
#2 0x0000559de18108b6 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f534bbea420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x0000559dea429023 mlir::StringAttr::getValue() const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac0e023)
#5 0x0000559de1945009 mlir::dataflow::Lattice<(anonymous namespace)::WrittenToLatticeValue>::print(llvm::raw_ostream&) const TestSparseBackwardDataFlowAnalysis.cpp:0:0
#6 0x0000559de1945d6e void llvm::function_ref<void (mlir::Operation*)>::callback_fn<(anonymous namespace)::TestWrittenToPass::runOnOperation()::'lambda'(mlir::Operation*)>(long, mlir::Operation*) TestSparseBackwardDataFlowAnalysis.cpp:0:0
#7 0x0000559de18d35ce void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20b85ce)
#8 0x0000559de18d35ce void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20b85ce)
#9 0x0000559de1943171 (anonymous namespace)::TestWrittenToPass::runOnOperation() TestSparseBackwardDataFlowAnalysis.cpp:0:0
#10 0x0000559dea1cbc22 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa9b0c22)
#11 0x0000559dea1cca64 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa9b1a64)
#12 0x0000559dea1d397a mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa9b897a)
#13 0x0000559dea1d32af mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa9b82af)
#14 0x0000559de18c0940 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#15 0x0000559de18bfb76 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&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#16 0x0000559dea520ca5 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) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xad05ca5)
#17 0x0000559de18b5776 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x209a776)
#18 0x0000559de18b5b55 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x209ab55)
#19 0x0000559de18b5eb5 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x209aeb5)
#20 0x0000559de17f5222 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fda222)
#21 0x00007f534b208083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#22 0x0000559de17f4d5e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fd9d5e)
Segmentation fault (core dumped)
test_tag: a:
operand #0: [```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs