<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89635>89635</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 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
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWElz4yoe_zT4QsmFQdZy8MGJ4zeZ6Ux3xV09RxeSkMwLAg1LJ3mffgqQHctJql66cxqXF5Yfv_-OwNQY3knGVmB5BZabGXX2oPTqO7XPVNKNcpU1s0o1z6vvCmo2aNW4mkHtJLQHBlslhHrksoOWGQsfuT3AZKDGMAONGJKfrLZK87-Yhonv24Nm5qBEA8gmKf0LoA1Aa5Ch8R275AreqcYJdruBgGwgwPkc4K1mXnozFwLgPEKNcrpm-5YLJmnPRjS-ROOItlR3zMKGWiros3L2iGdJD8iaJQPOESBrgsOX7y6mXd_K0vCV8FNjgQtA1gtcJG2BxpYMQ9lxeZYmuzDM_XAy4ONEMX4IjnP4Ulur-SBOlj0V2T5LEycfpHqUieDSPSWddKdV8bthLZcMcoIhSNGj6itqAS5CHy-p7gAuIcAEwa72tMZSywbFpU3YE-0HwQDGEORXka6qABmZoSdQOuijNDxnvIboDNM7EUD-16OQByymgMUEEYg9Kk6eQQ23qh0CeGyO-MBhFWyFovZsQVv3ER4arrMRAdEchRcD-AqhUVaknJiHz-074pSeak8utfdKv_ZC-tpI_GIlGcEnPZZvm5m-Z2b2QTuXx_Wa2dG8mDj55s1qvD-WvQZkDQ_WDsYnA94CvO1UUylh58qHf_sXwNv__ierC_Xz5hAX7yytH2Dj-uGUQBf0t9JY7WrLlYSNYgZKZWGjei6pZZAKAZ1hBuDFR1Ir5hWXhmnLBOuZ9KV-jeGTxwNy40Fh1TRyvjfyfPny4w7e3N9_vfdmX2n1wCTsw64EW-Vk4_G16gcuaFCeVkpb1pw0_fblZr27gcZVPbeQwsp1fgtV2vpIXviR24Or5rXqAd4K8fP4kwxa_clqC_CWG-O8H7aQygZyWQvXsLAL15qaA6xo_WA1rd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