1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - -mtriple=aarch64 -run-pass=legalizer %s | FileCheck %s
4 # Make sure we don't lose the register bank constraints when
5 # artifact combining G_UNMERGE_VALUES instructions.
10 ; CHECK-LABEL: name: test_none_none
11 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
12 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
13 ; CHECK: $w0 = COPY [[COPY]](s32)
14 ; CHECK: $w1 = COPY [[COPY1]](s32)
17 %2:_(s64) = G_MERGE_VALUES %0(s32), %1
18 %3:_(s32), %4:_(s32) = G_UNMERGE_VALUES %2(s64)
26 ; CHECK-LABEL: name: test_gpr_none
27 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
28 ; CHECK: [[COPY1:%[0-9]+]]:gpr(s32) = COPY $w1
29 ; CHECK: $w0 = COPY [[COPY]](s32)
30 ; CHECK: $w1 = COPY [[COPY1]](s32)
31 %0:gpr(s32) = COPY $w0
32 %1:gpr(s32) = COPY $w1
33 %2:_(s64) = G_MERGE_VALUES %0(s32), %1
34 %3:_(s32), %4:_(s32) = G_UNMERGE_VALUES %2(s64)
42 ; CHECK-LABEL: name: test_none_gpr
43 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
44 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
45 ; CHECK: [[COPY2:%[0-9]+]]:gpr(s32) = COPY [[COPY]](s32)
46 ; CHECK: [[COPY3:%[0-9]+]]:gpr(s32) = COPY [[COPY1]](s32)
47 ; CHECK: $w0 = COPY [[COPY2]](s32)
48 ; CHECK: $w1 = COPY [[COPY3]](s32)
51 %2:_(s64) = G_MERGE_VALUES %0(s32), %1
52 %3:gpr(s32), %4:gpr(s32) = G_UNMERGE_VALUES %2(s64)
60 ; CHECK-LABEL: name: test_fpr_gpr
61 ; CHECK: [[COPY:%[0-9]+]]:fpr(s32) = COPY $w0
62 ; CHECK: [[COPY1:%[0-9]+]]:fpr(s32) = COPY $w1
63 ; CHECK: [[COPY2:%[0-9]+]]:gpr(s32) = COPY [[COPY]](s32)
64 ; CHECK: [[COPY3:%[0-9]+]]:gpr(s32) = COPY [[COPY1]](s32)
65 ; CHECK: $w0 = COPY [[COPY2]](s32)
66 ; CHECK: $w1 = COPY [[COPY3]](s32)
67 %0:fpr(s32) = COPY $w0
68 %1:fpr(s32) = COPY $w1
69 %2:_(s64) = G_MERGE_VALUES %0(s32), %1
70 %3:gpr(s32), %4:gpr(s32) = G_UNMERGE_VALUES %2(s64)