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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64][SVE] Error in insert_v4f32_v2f32
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          stevesuzuki-arm
      </td>
    </tr>
</table>

<pre>
    `llvm.experimental.vector.insert.nxv4f32.nxv2f32` https://godbolt.org/z/eTWTMMvEq
```
target triple = "aarch64-unknown-linux-gnueabihf"
define <vscale x 4 x float> @insert_v4f32_v2f32(<vscale x 2 x float> %a, <vscale x 4 x float> %b) #0 { 
  %1 = call <vscale x 4 x float> @llvm.experimental.vector.insert.nxv4f32.nxv2f32(<vscale x 4 x float> %b, <vscale x 2 x float> %a, i64 0)
  ret <vscale x 4 x float> %1
}
declare <vscale x 4 x float> @llvm.experimental.vector.insert.nxv4f32.nxv2f32(<vscale x 4 x float>, <vscale x 2 x float>, i64 ) 
```
Crashes with target triple = "aarch64-linux-gnu" -mattr=+sve2 -O3

```
LLVM ERROR: Cannot select: t11: nxv4f32 = AArch64ISD::UUNPKHI t4
  t4: nxv4f32,ch = CopyFromReg t0, Register:nxv4f32 %1
    t3: nxv4f32 = Register %1
In function: insert_v4f32_v2f32
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/llc -o /app/output.s -x86-asm-syntax=intel -mattr=+sve2 -O3 <source>
1.      Running pass 'Function Pass Manager' on module '<source>'.
2.      Running pass 'AArch64 Instruction Selection' on function '@insert_v4f32_v2f32'
 #0 0x000056093d5980cf PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x000056093d595b3c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f8a9df703c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x143c0)
 #3 0x00007f8a9da3d03b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4303b)
 #4 0x00007f8a9da1c859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x000056093d4da318 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x30da318)
 #6 0x000056093d3879c9 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f879c9)
 #7 0x000056093d38b13a llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f8b13a)
 #8 0x000056093b15fda7 (anonymous namespace)::AArch64DAGToDAGISel::Select(llvm::SDNode*) AArch64ISelDAGToDAG.cpp:0:0
 #9 0x000056093d3892aa llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f892aa)
#10 0x000056093d391bfc llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f91bfc)
#11 0x000056093d395303 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f95303)
#12 0x000056093d396a38 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.960) SelectionDAGISel.cpp:0:0
#13 0x000056093c8d8386 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x24d8386)
#14 0x000056093cd868f6 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x29868f6)
#15 0x000056093cd86c49 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2986c49)
#16 0x000056093cd87589 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2987589)
#17 0x000056093af40528 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#18 0x000056093ae99467 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xa99467)
#19 0x00007f8a9da1e0b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b3)
#20 0x000056093af36f2a _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xb36f2a)
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFmFtz4jYUgH-NedHA2JavDzwQILuZbrqZJLudPjGyLIMbW3IlmSX763skG4JZNklbpmVgbEvWOd-56EgiE_nz1IncqtrWE7ZrmCxrxjWpJltGtZCTkism9YTvtkGBfXP14Qoj0EbrRjl45vjX8F2LPBOVngi5hqfv8GOPvz3e3m6XfzruwnFnMKT_2kdN5JpppGXZVAw5eIEc3ydE0k0UjFv-xMU3Pq5K3u7Ga94ykpWbAt7oBuesKLkZNd8qSmD8DgXwKypBtIOXyAncjntlqVcds58cD_AHA_yQOP78FYl-mDl-ClfsIie-Qh0IMh2exYdR1atEf9fFQ9wzNEPcs_aUUYBc4N7TSnD5a1K9PlbxYu9oWhH5uqcvZ9drJu2tsUE4l1BzSdSGKfSt1Bv0anYdsgra0LgmWkt4w_Gv1JZBw2fcyz-n5dOnr7doeX__-R4yH80J50IjxSqw2DRozzOX3mSreDazWm8eFmau4NmXL7_e_fLxBulgHxS4exkDdtKNHTgXzfO1FPU9WyPtGvvhrlSaAe3soOEQMwQfjU-174ccvXjDUdFyqkvBzdtnJop97e7TcvawRKrN6lIjgrJ2DenTCAluFaeTH3zeZhMqangw-dBfxo0UfxjX-NelUi1TcIMIz0EprdqcIb1hiJrAoYzQJy0JZZNO_YOGBpS3dWO02CYXutI7KdaS1AgC3Jp0MxBg3LVojBYgaMqK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