Issue 76852
Summary LLVM ERROR: Broken module found, compilation aborted!
Labels new issue
Assignees
Reporter TatyanaDoubts
    The bug was found by FuzzGen IR test generator

Run opt with -passes=loop-deletion 
https://godbolt.org/z/16zoTYEqx

Test.ll
```
; ModuleID = './reduced.ll'
source_filename = "./reduced.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

define void @wombat() gc "statepoint-example" personality ptr null {
bb:
  br i1 false, label %bb1, label %bb4

bb1:                                              ; preds = %bb
  br label %bb2

bb2: ; preds = %bb1, %bb2
  %invoke = invoke double null(i64 0)
 to label %bb2 unwind label %bb3

bb3: ; preds = %bb2
  %landingpad = landingpad { ptr, i32 }
          cleanup
  ret void

bb4: ; preds = %bb
  ret void
}
```
Stack dump:
```
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes=loop-deletion <source>
 #0 0x0000000003597b18 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3597b18)
 #1 0x000000000359526c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fee38042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007fee380969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007fee38042476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007fee380287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00000000007905f3 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
 #7 0x00000000034dea68 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x34dea68)
 #8 0x0000000002f6f993 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2f6f993)
 #9 0x000000000088bbae llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x88bbae)
#10 0x0000000002f34d6c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2f34d6c)
#11 0x0000000000895cca llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x895cca)
#12 0x000000000079c483 main (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x79c483)
#13 0x00007fee38029d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x00007fee38029e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x000000000088af1e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x88af1e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to