<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/141628>141628</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Instruction does not dominate all uses!.. 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 opt with the test below using -passes=slp-vectorizer -slp-threshold=-99999:

[reduced-stripped.ll.zip](https://github.com/user-attachments/files/20462672/reduced-stripped.ll.zip)

Reproducer: https://godbolt.org/z/sf4Kvsqxa

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>
1.      Running pass "verify" on module "<source>"
 #0 0x00000000055ff378 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x55ff378)
 #1 0x00000000055fcd04 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00007a8d0c442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007a8d0c4969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007a8d0c442476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007a8d0c4287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x0000000000810401 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
 #7 0x000000000553a631 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x553a631)
 #8 0x0000000005435df8 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5435df8)
 #9 0x000000000094557e 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+0x94557e)
#10 0x00000000053f3af0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x53f3af0)
#11 0x000000000094f9ca 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+0x94f9ca)
#12 0x000000000094319c optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x94319c)
#13 0x00007a8d0c429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x00007a8d0c429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x000000000093add5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x93add5)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzcV11z2yoT_jX4hpEGgSRLF75wPtw3b5vTTpLJrQcLJNNg0OEjifvrz4CcynKbTnOaq-ORRx-wz-4-uwsLtVZ0ivMFKM5AcTGj3m21WdxRt6eKXmi_cXa20Wy_uNPQ8N5o5hsOjVdQ9w4-CbeFbsuh49bBDZf6CXorVAeTnlrLLSAXVvbJI2-cNuIbNzAJ725ruN1qyQC5SOrwA2QJULyKM8ODEpZYZ0Tfc5ZKmX4TPSguAK62zvU2zMYrgFedcFu_SRu9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