<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/108709>108709</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 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 void @wombat() #0 gc "statepoint-example" {
bb:
  br label %bb6

bb1: ; No predecessors!
  %ashr = ashr i32 0, 0
  br label %bb2

bb2: ; preds = %bb6, %bb1
  %phi = phi i32 [ %ashr, %bb1 ], [ %ashr9, %bb6 ]
  %phi3 = phi i32 [ 0, %bb1 ], [ %mul10, %bb6 ]
  %phi4 = phi i32 [ 0, %bb1 ], [ %mul11, %bb6 ]
  %phi5 = phi i32 [ 0, %bb1 ], [ %mul, %bb6 ]
  ret void

bb6:                                              ; preds = %bb6, %bb
  %phi7 = phi i32 [ 0, %bb ], [ %mul11, %bb6 ]
 %phi8 = phi i32 [ 0, %bb ], [ %mul10, %bb6 ]
  %mul = mul i32 0, %phi8
 %ashr9 = ashr i32 0, 0
  %mul10 = mul i32 0, 0
  %mul11 = mul i32 %phi7, 0
  br i1 false, label %bb2, label %bb6
}
```
Reproducer: https://godbolt.org/z/oYMzeobe5
Stack dump:
```
Instruction does not dominate all uses!
  %5 = call <4 x i32> @llvm.vector.insert.v4i32.v2i32(<4 x i32> <i32 0, i32 0, i32 poison, i32 poison>, <2 x i32> %1, i64 2)
  %2 = shufflevector <4 x i32> %5, <4 x i32> poison, <2 x i32> <i32 2, i32 poison>
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>
1.      Running pass "verify" on module "<source>"
 #0 0x0000000005016bb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5016bb8)
 #1 0x00000000050142fc SignalHandler(int) Signals.cpp:0:0
 #2 0x0000732a8a842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x0000732a8a8969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x0000732a8a842476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x0000732a8a8287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00000000007cb3e1 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
 #7 0x0000000004f55fb8 (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4f55fb8)
 #8 0x0000000004e52d30 llvm::VerifierPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4e52d30)
 #9 0x00000000008f20ee 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+0x8f20ee)
#10 0x0000000004e17450 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4e17450)
#11 0x00000000008fce52 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+0x8fce52)
#12 0x00000000008efcdc optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8efcdc)
#13 0x0000732a8a829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#14 0x0000732a8a829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#15 0x00000000008e77ae _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8e77ae)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWFtz4yoS_jX4hZJLAt384Acnjs9md3ImlUxN1T6lkNSymSBQAcplfv0WSL7IcVLxTp6OyxcBzdfdXzfQmBnD1xJgjpILlCwnrLMbpec_mH1lki1VV1gzKVT1Ov-hsIZWq6orAetOYrsBXCsh1DOXa2zBWPzM7QYHLTMGDKJLI9rgCUqrNP8NGgeubTcazEaJCtFlMHMvFC5RuEBpOLz7Jr3AN6rqBFwvMaJLjEg2RWSlwemvpkIgkvWiRnW6hIeaC5CsgUGaHEuTXtoyvQaLK2aZYK-qs1t5CBpEFxC0JAsRXVDiv1wzGjfdUxr7r4DvHiKSI7qISB7UeTg8Sd-VbqencXDvu7nrDlqyHciHDyX9GDm21mreip1nL3n6kMZBJx-lepaB4LJ7Cday283qvyuouQT8pHiFURw-q6ZgFpEckRlGhIZ4XTo0Y5mFVnFpA3hhTSsAEYJRdtGjFAWiAyDGhcaCFSAwIklRpIfaisLRhF3c_la41VBBCcYobRCJtv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