| Issue |
204099
|
| Summary |
[mlir] Fell off the end of a type-switch. UNREACHABLE TypeSwitch.
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
Anonymous7i0em3yd
|
git version: 4281db2755459933c68aa95a17f2518ef8317889
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -transform-interpreter a.mlir`
a.mlir:
```mlir
module {
pdl_interp.func @matchers(%arg0: i32) {
pdl_interp.finalize
}
module @rewriters {
}
func.func @test_add_1d_matching_static(%arg0: tensor<134217728xf32>, %arg1: tensor<134217728xf32>) -> tensor<134217728xf32> {
%0 = linalg.add ins(%arg0, %arg1 : tensor<134217728xf32>, tensor<134217728xf32>) outs(%arg0 : tensor<134217728xf32>) -> tensor<134217728xf32>
return %0 : tensor<134217728xf32>
}
module attributes {transform.with_named_sequence} {
transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) {
%0 = transform.structured.match ops{["linalg.add"]} in %arg0 : (!transform.any_op) -> !transform.any_op
%1 = transform.structured.rewrite_in_destination_passing_style %0 : (!transform.any_op) -> !transform.any_op
transform.yield
}
}
}
```
stack trace:
```
Fell off the end of a type-switch
UNREACHABLE executed at /data/szy/MLIR/llvm-release/llvm-project/llvm/include/llvm/ADT/TypeSwitch.h:154!
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 -transform-interpreter 32.mlir
#0 0x0000556bf4d3bcc8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2023cc8)
#1 0x0000556bf4d38b61 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2020b61)
#2 0x0000556bf4d3cde6 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007ff589814420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007ff588e5100b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007ff588e30859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x0000556bf4d2217f (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x200a17f)
#7 0x0000556bf5886aa6 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2b6eaa6)
#8 0x0000556bf58060c7 mlir::DiagnosedSilenceableFailure mlir::transform::detail::applyTransformToEach<mlir::transform::RewriteInDestinationPassingStyleOp, llvm::iterator_range<llvm::filter_iterator_impl<mlir::Operation* const*, mlir::transform::TransformState::getPayloadOps(mlir::Value) const::'lambda'(mlir::Operation*), std::bidirectional_iterator_tag>>&>(mlir::transform::RewriteInDestinationPassingStyleOp, mlir::transform::TransformRewriter&, llvm::iterator_range<llvm::filter_iterator_impl<mlir::Operation* const*, mlir::transform::TransformState::getPayloadOps(mlir::Value) const::'lambda'(mlir::Operation*), std::bidirectional_iterator_tag>>&, llvm::SmallVectorImpl<mlir::transform::ApplyToEachResultList>&, mlir::transform::TransformState&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2aee0c7)
#9 0x0000556bf5805c22 mlir::transform::TransformEachOpTrait<mlir::transform::RewriteInDestinationPassingStyleOp>::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2aedc22)
#10 0x0000556bf58058a1 mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::RewriteInDestinationPassingStyleOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2aed8a1)
#11 0x0000556bfae4590a mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x812d90a)
#12 0x0000556bfae08012 applySequenceBlock(mlir::Block&, mlir::transform::FailurePropagationMode, mlir::transform::TransformState&, mlir::transform::TransformResults&) TransformOps.cpp:0:0
#13 0x0000556bfae0b47e mlir::transform::NamedSequenceOp::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x80f347e)
#14 0x0000556bfad93331 mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::NamedSequenceOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x807b331)
#15 0x0000556bfae4590a mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x812d90a)
#16 0x0000556bfae519d2 mlir::transform::applyTransforms(mlir::Operation*, mlir::transform::TransformOpInterface, mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>> const&, mlir::transform::TransformOptions const&, bool, llvm::function_ref<void (mlir::transform::TransformState&)>, llvm::function_ref<llvm::LogicalResult (mlir::transform::TransformState&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x81399d2)
#17 0x0000556bfad57f06 mlir::transform::applyTransformNamedSequence(mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>>, mlir::transform::TransformOpInterface, mlir::ModuleOp, mlir::transform::TransformOptions const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x803ff06)
#18 0x0000556bfad52ab1 (anonymous namespace)::InterpreterPass::runOnOperation() InterpreterPass.cpp:0:0
#19 0x0000556bfd6963f2 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa97e3f2)
#20 0x0000556bfd697234 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+0xa97f234)
#21 0x0000556bfd69e14a mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa98614a)
#22 0x0000556bfd69da7f mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa985a7f)
#23 0x0000556bf4dea970 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#24 0x0000556bf4de9ba6 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
#25 0x0000556bfd9ea795 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+0xacd2795)
#26 0x0000556bf4de0c06 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+0x20c8c06)
#27 0x0000556bf4de0fe5 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20c8fe5)
#28 0x0000556bf4de1345 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20c9345)
#29 0x0000556bf4d21752 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2009752)
#30 0x00007ff588e32083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#31 0x0000556bf4d2128e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x200928e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs