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

    <tr>
        <th>Summary</th>
        <td>
            aarch64 llvm 14 regression with vectors: assertion `TmpVec.size() > 1' failed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            backend:AArch64,
            regression
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          andrewrk
      </td>
    </tr>
</table>

<pre>
    Does *not* affect LLVM 13.0.1.
Tested with LLVM 14.0.6. Have not yet confirmed whether it affects trunk.

Reduced LLVM IR:

```llvm
define internal fastcc i16 @test2.doTheTest.S.doTheTest() {
Block10:
  %0 = call fastcc i16 undef(<3 x i32> zeroinitializer, <3 x i32> zeroinitializer)
  ret i16 0
}
```

Reproduction:

```
$ ~/local/llvm14-debug/bin/clang -c reduced.ll  -target aarch64-linux-unknown
warning: overriding the module target triple with aarch64-unknown-linux-unknown [-Woverride-module]
clang: /home/andy/Downloads/llvm-project-14/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:656: llvm::MachineInstrBuilder llvm::MachineIRBuilder::buildUnmerge(llvm::ArrayRef<llvm::Register>, const llvm::SrcOp&): Assertion `TmpVec.size() > 1' failed.
```

Downstream issue: https://github.com/ziglang/zig/issues/12012

Apologies for not catching this during the RC phase.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVNtu2zgQ_Rr6hZAgUTfrQQ-OnXYDtCjgpN1nihpJ3NCkQFJJ06_vUJZrZ7HbxQICKd7OzDlzyNZ0b83BgKOE7bTx2FLe9yA8_fTp22eaZnESpzFJDiTZPYHz0NFX6cd1NcfVMqZ_8BegeJq-gafC6F7aU9g4gh_BUulXTEe9nfXzCnduj9DNAjcvgA9Hku1uV0mZnD-lXk7nqQ56qYFK7cFqrmjPnReCyrSkJE885sjizjyNENKNH6__h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