Issue 132755
Summary [mlir] -split-input-file crashes
Labels
Assignees
Reporter wwy6191
    git version: 59fd2878fce470f02058f43d4b818ed68ce04094

system: `Ubuntu 18.04.6 LTS`

reproduce with: `mlir-opt  -split-input-file a.mlir`


a.mlir: 
``` 
module {
  func.func @add_dynamic(%arg0: memref<3x4x5xf32>, %arg1 : memref< 3x4x5xi32>, %arg2: memref<3x4x5xf32>, %arg3: memref<3x4x5xf32>) attributes {arm_streaming} {
    linalg.add ins(%arg0, %arg1 : memref<3x4x5xf32>, memref< 3x4x5xi32>) outs(%arg2 : memref<3x4x5xf32>)
 return
  }
}

``` 
stack trace:

``` 
unsupported non numeric type
UNREACHABLE executed at /data/szy/MLIR/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:467!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /data/szy/MLIR/llvm-project/install/bin/mlir-opt --split-input-file /data/szy/MLIR/seed/seed19/tmp.ObMmrsq6VK.mlir
1.      MLIR Parser: custom op parser 'builtin.module'
2.      MLIR Parser: custom op parser 'func.func'
3.      MLIR Parser: custom op parser 'linalg.add'
 #0 0x00005625234eddb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bddb8)
 #1 0x00005625234eb8be llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bb8be)
 #2 0x00005625234ee736 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007fed4e47d420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007fed4daba00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007fed4da99859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
 #6 0x00005625234d4f3f (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11a4f3f)
 #7 0x0000562523d9d8fd (anonymous namespace)::RegionBuilderHelper::buildBinaryFn(mlir::linalg::BinaryFn, mlir::Value, mlir::Value) LinalgOps.cpp:0:0
 #8 0x0000562523d9e339 mlir::linalg::AddOp::regionBuilder(mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x1a6e339)
 #9 0x0000562523eb9c1d void llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>::callback_fn<std::function<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>>(long, mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x1b89c1d)
#10 0x0000562523ea3f33 fillStructuredOpRegion(mlir::OpBuilder&, mlir::Region&, mlir::TypeRange, mlir::TypeRange, llvm::ArrayRef<mlir::NamedAttribute>, llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>) LinalgOps.cpp:0:0
#11 0x0000562523d92573 parseNamedStructuredOp(mlir::OpAsmParser&, mlir::OperationState&, unsigned int, llvm::function_ref<void (mlir::ImplicitLocOpBuilder&, mlir::Block&, llvm::ArrayRef<mlir::NamedAttribute>)>) LinalgOps.cpp:0:0
#12 0x0000562523d9e4cc mlir::linalg::AddOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x1a6e4cc)
#13 0x00005625296567e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#14 0x00005625296619a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#15 0x000056252965f85c (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#16 0x000056252965dacc (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#17 0x000056252975fe32 mlir::function_interface_impl::parseFunctionOp(mlir::OpAsmParser&, mlir::OperationState&, bool, mlir::StringAttr, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_interface_impl::VariadicFlag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)>, mlir::StringAttr, mlir::StringAttr) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x742fe32)
#18 0x0000562523b707fa mlir::func::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x18407fa)
#19 0x00005625296567e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#20 0x00005625296619a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#21 0x000056252965f6d5 (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#22 0x0000562526614b9e mlir::ModuleOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e4b9e)
#23 0x00005625296567e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#24 0x00005625296555ad mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x73255ad)
#25 0x00005625264f4f0f mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c4f0f)
#26 0x00005625264f3e8e mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c3e8e)
#27 0x00005625264f367f performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#28 0x00005625264f33ed 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
#29 0x000056252659e726 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)::$_0::operator()(llvm::StringRef) const ToolUtilities.cpp:0:0
#30 0x000056252659e39d 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) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x426e39d)
#31 0x00005625264ed405 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd405)
#32 0x00005625264ed6af mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd6af)
#33 0x00005625264ed9de mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd9de)
#34 0x00005625234cc337 main (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119c337)
#35 0x00007fed4da9b083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#36 0x00005625234cbe9e _start (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119be9e)
``` 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to