Issue 89635
Summary LLVM ERROR: Broken module found, compilation aborted
Labels new issue
Assignees
Reporter TatyanaDoubts
    To reproduce run the following test with -passes slp-vectorizer -slp-threshold=-99999
```
; 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 i32 @wombat(i32 %arg) #0 gc "statepoint-example" {
bb:
  %or = or i32 %arg, 0
  %mul = mul i32 0, 1
  %mul1 = mul i32 %or, %mul
  %sitofp = sitofp i32 %mul1 to float
  %fcmp = fcmp ugt float 0.000000e+00, %sitofp
  %or2 = or i32 0, %or
  %mul3 = mul i32 %mul, 0
  %mul4 = mul i32 %or2, %mul3
 %sitofp5 = sitofp i32 %mul4 to float
  %fcmp6 = fcmp ugt float 0.000000e+00, %sitofp5
  ret i32 0
}
```
Reproducer: https://godbolt.org/z/qW6c8ovEh
Stack dump:
```
Instruction does not dominate all uses!
  %mul = mul i32 0, 1
  %1 = insertelement <2 x i32> %0, i32 %mul, i32 1
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes slp-vectorizer -slp-threshold=-99999 <source>
 #0 0x0000000004d1fff8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4d1fff8)
 #1 0x0000000004d1d74c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f0922e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f0922e969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007f0922e42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007f0922e287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00000000007a7cc7 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
 #7 0x0000000004c57178 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4c57178)
 #8 0x0000000004b6aa13 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b6aa13)
 #9 0x00000000008be3fe llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8be3fe)
#10 0x0000000004b2e4bc llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b2e4bc)
#11 0x00000000008c8eb2 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8c8eb2)
#12 0x00000000008bc705 optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8bc705)
#13 0x00007f0922e29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x00007f0922e29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x00000000008b34ae _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8b34ae)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to