| Issue |
53165
|
| Summary |
[MLIR] Translation to LLVM broken
|
| Labels |
mlir:llvm
|
| Assignees |
|
| Reporter |
wsmoses
|
Not a minimal case by any means (but now only ~5K lines rather than 500K lines)
cc @ftynse
```
wmoses@beast:~/git/Polygeist/proj/rodinia/cuda/b+tree (makefix) $ ~/git/Polygeist/mlir-build/bin/mlir-translate -mlir-to-llvmir badtranslate.mlir
mlir-translate: /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:366: mlir::Value getPHISourceValue(mlir::Block*, mlir::Block*, unsigned int, unsigned int): Assertion `std::adjacent_find(successors.begin(), successors.end()) == successors.end() && "successors with arguments in LLVM branches must be different blocks"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/wmoses/git/Polygeist/mlir-build/bin/mlir-translate -mlir-to-llvmir badtranslate.mlir
#0 0x000055f82dcadddc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/wmoses/git/Polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:0
#1 0x000055f82dcade93 PrintStackTraceSignalHandler(void*) /home/wmoses/git/Polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:0
#2 0x000055f82dcabb42 llvm::sys::RunSignalHandlers() /home/wmoses/git/Polygeist/llvm-project/llvm/lib/Support/Signals.cpp:96:0
#3 0x000055f82dcad75d SignalHandler(int) /home/wmoses/git/Polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:0
#4 0x00007fee214bf980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#5 0x00007fee20374fb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007fee20376921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#7 0x00007fee2036648a __assert_fail_base /build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
#8 0x00007fee20366502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#9 0x000055f82ce7f73e getPHISourceValue(mlir::Block*, mlir::Block*, unsigned int, unsigned int) /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:364:0
#10 0x000055f82ce7fd0e mlir::LLVM::detail::connectPHINodes(mlir::Region&, mlir::LLVM::ModuleTranslation const&) /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:424:0
#11 0x000055f82ce8239b mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:811:0
#12 0x000055f82ce8286f mlir::LLVM::ModuleTranslation::convertFunctions() /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:849:0
#13 0x000055f82ce83cdd mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef) /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:1035:0
#14 0x000055f82c2942fe mlir::registerToLLVMIRTranslation()::'lambda'(mlir::ModuleOp, llvm::raw_ostream&)::operator()(mlir::ModuleOp, llvm::raw_ostream&) const /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp:29:0
#15 0x000055f82c2945f1 std::_Function_handler<mlir::LogicalResult (mlir::ModuleOp, llvm::raw_ostream&), mlir::registerToLLVMIRTranslation()::'lambda'(mlir::ModuleOp, llvm::raw_ostream&)>::_M_invoke(std::_Any_data const&, mlir::ModuleOp&&, llvm::raw_ostream&) /usr/include/c++/7/bits/std_function.h:303:0
#16 0x000055f82c7a06e9 std::function<mlir::LogicalResult (mlir::ModuleOp, llvm::raw_ostream&)>::operator()(mlir::ModuleOp, llvm::raw_ostream&) const /usr/include/c++/7/bits/std_function.h:707:0
#17 0x000055f82c79dfcd mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, std::function<mlir::LogicalResult (mlir::ModuleOp, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::'lambda'(llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*)::operator()(llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*) const /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Translation/Translation.cpp:107:0
#18 0x000055f82c79f2cf std::_Function_handler<mlir::LogicalResult (llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*), mlir::TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(llvm::StringRef, std::function<mlir::LogicalResult (mlir::ModuleOp, llvm::raw_ostream&)> const&, std::function<void (mlir::DialectRegistry&)> const&)::'lambda'(llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*)>::_M_invoke(std::_Any_data const&, llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*&&) /usr/include/c++/7/bits/std_function.h:303:0
#19 0x000055f82c7a1396 std::function<mlir::LogicalResult (llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*)>::operator()(llvm::SourceMgr&, llvm::raw_ostream&, mlir::MLIRContext*) const /usr/include/c++/7/bits/std_function.h:707:0
#20 0x000055f82c79e4ff mlir::mlirTranslateMain(int, char**, llvm::StringRef)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&)::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&) const /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Translation/Translation.cpp:188:0
#21 0x000055f82c79ec73 mlir::mlirTranslateMain(int, char**, llvm::StringRef) /home/wmoses/git/Polygeist/llvm-project/mlir/lib/Translation/Translation.cpp:203:0
#22 0x000055f82c26b450 main /home/wmoses/git/Polygeist/llvm-project/mlir/tools/mlir-translate/mlir-translate.cpp:34:0
#23 0x00007fee20357bf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#24 0x000055f82c26b30a _start (/home/wmoses/git/Polygeist/mlir-build/bin/mlir-translate+0x9d30a)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs