<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90780>90780</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM ERROR: Broken module found, compilation aborted!
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
TatyanaDoubts
</td>
</tr>
</table>
<pre>
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 double @wombat() #0 gc "statepoint-example" {
bb:
br i1 false, label %bb1, label %bb2
bb1: ; preds = %bb
br i1 false, label %bb14, label %bb11
bb2: ; preds = %bb9, %bb
%phi = phi i32 [ 0, %bb9 ], [ 0, %bb ]
%phi3 = phi i32 [ 0, %bb9 ], [ 0, %bb ]
%phi4 = phi i32 [ 0, %bb9 ], [ 0, %bb ]
%phi5 = phi i32 [ 0, %bb9 ], [ 0, %bb ]
br i1 false, label %bb6, label %bb11
bb6: ; preds = %bb2
br i1 false, label %bb7, label %bb14
bb7: ; preds = %bb6
%zext = zext i32 %phi4 to i64
%zext8 = zext i32 %phi to i64
%icmp = icmp ult i64 %zext, %zext8
br label %bb17
bb9: ; No predecessors!
br label %bb2
bb10: ; No predecessors!
br label %bb17
bb11: ; preds = %bb2, %bb1
%phi12 = phi i32 [ 0, %bb1 ], [ %phi3, %bb2 ]
%phi13 = phi i32 [ 0, %bb1 ], [ %phi5, %bb2 ]
br label %bb20
bb14: ; preds = %bb6, %bb1
%phi15 = phi i32 [ %phi, %bb6 ], [ 0, %bb1 ]
%phi16 = phi i32 [ %phi4, %bb6 ], [ 0, %bb1 ]
br label %bb20
bb17: ; preds = %bb10, %bb7
%phi18 = phi i64 [ %zext, %bb7 ], [ 0, %bb10 ]
%phi19 = phi i64 [ 0, %bb7 ], [ 0, %bb10 ]
br label %bb20
bb20: ; preds = %bb17, %bb14, %bb11
ret double 0.000000e+00
}
```
Reproducer: https://godbolt.org/z/eY7nsqG97
Stack dump:
```
PHI nodes not grouped at top of basic block!
%2 = phi <2 x i32> [ poison, %bb9 ], [ zeroinitializer, %bb ]
label %bb2
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 0x0000000004d50ef8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4d50ef8)
#1 0x0000000004d4e64c SignalHandler(int) Signals.cpp:0:0
#2 0x00007430bee42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007430bee969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007430bee42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007430bee287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00000000007aa2c7 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
#7 0x0000000004c92718 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4c92718)
#8 0x0000000004b9b013 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b9b013)
#9 0x00000000008c0f9e 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+0x8c0f9e)
#10 0x0000000004b5e93c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4b5e93c)
#11 0x00000000008cba52 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+0x8cba52)
#12 0x00000000008bf2a5 optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8bf2a5)
#13 0x00007430bee29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x00007430bee29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x00000000008b604e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8b604e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWFtz2zoO_jX0C0ceiro_-MGp457sNqeZpNOZfcpQEmTzhCa1JNUk_fU7pOSLHLut2zytxxeJBD8AHwARNDOGryTADCVXKFlMWGfXSs--MPvKJFuorrRmUqr6dfZFYQ2tVnVXAdadxHYNuFFCqGcuV9iCsfiZ2zUOWmYMGGxEG3yDyirNv4PGgbu3aw1mrUSNokVQuBciC0TmKCXDu7-NrvCtqjsBNwuMogVGNJsiutTgtNdTIRDNelGjOl3BY8MFSLaBQZoeS9Ne2jK9AotrZplgr6qzW3kINiiaQ9DSjKBoHlH_5W7D8a27SmP_FfDdRUhzFM1DmgdNToYr6YfS7fI0Dh78MHfDQUu3E_nwiWg_R4-ttZq3YufZS54-pnHQySepnmUguOxegpXsdqv67xoaLgHXqivd2pg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