xref: /llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/regbankselect-unmerge-vec.mir (revision 48904e9452de81375bd55d830d08e51cc8f2ec7e)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -O0 -mtriple arm64-- -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s
3---
4name:            unmerge
5alignment:       4
6legalized:       true
7tracksRegLiveness: true
8frameInfo:
9  maxCallFrameSize: 0
10body:             |
11  bb.0:
12    liveins: $q0
13
14    ; Ensure that the dest regs have FPR since we're unmerging from a vector
15    ; CHECK-LABEL: name: unmerge
16    ; CHECK: liveins: $q0
17    ; CHECK: [[COPY:%[0-9]+]]:fpr(<2 x s64>) = COPY $q0
18    ; CHECK: [[UV:%[0-9]+]]:fpr(s64), [[UV1:%[0-9]+]]:fpr(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
19    ; CHECK: $x0 = COPY [[UV]](s64)
20    ; CHECK: RET_ReallyLR implicit $x0
21    %0:_(<2 x s64>) = COPY $q0
22    %1:_(s64), %2:_(s64) = G_UNMERGE_VALUES %0(<2 x s64>)
23    $x0 = COPY %1(s64)
24    RET_ReallyLR implicit $x0
25
26...
27---
28name:            unmerge_s128
29alignment:       4
30legalized:       true
31tracksRegLiveness: true
32frameInfo:
33  maxCallFrameSize: 0
34body:             |
35  bb.0:
36    liveins: $q0
37
38    ; s128 should be treated as an FPR/vector because it can't live on GPR bank.
39    ; CHECK-LABEL: name: unmerge_s128
40    ; CHECK: liveins: $q0
41    ; CHECK: [[COPY:%[0-9]+]]:fpr(s128) = COPY $q0
42    ; CHECK: [[UV:%[0-9]+]]:fpr(s64), [[UV1:%[0-9]+]]:fpr(s64) = G_UNMERGE_VALUES [[COPY]](s128)
43    ; CHECK: $x0 = COPY [[UV]](s64)
44    ; CHECK: RET_ReallyLR implicit $x0
45    %0:_(s128) = COPY $q0
46    %1:_(s64), %2:_(s64) = G_UNMERGE_VALUES %0(s128)
47    $x0 = COPY %1(s64)
48    RET_ReallyLR implicit $x0
49
50...
51