1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
14 ; CHECK-LABEL: name: merge_unmerge
15 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
16 ; CHECK: $x0 = COPY [[COPY]](s64)
17 ; CHECK: RET_ReallyLR implicit $x0
19 %a:_(s32), %b:_(s32) = G_UNMERGE_VALUES %0
20 %merge:_(s64) = G_MERGE_VALUES %a, %b
21 $x0 = COPY %merge(s64)
22 RET_ReallyLR implicit $x0
26 name: merge_unmerge_mismatched_order
35 ; CHECK-LABEL: name: merge_unmerge_mismatched_order
36 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
37 ; CHECK: %b:_(s32), %a:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
38 ; CHECK: %merge:_(s64) = G_MERGE_VALUES %a(s32), %b(s32)
39 ; CHECK: $x0 = COPY %merge(s64)
40 ; CHECK: RET_ReallyLR implicit $x0
42 %b:_(s32), %a:_(s32) = G_UNMERGE_VALUES %0
43 %merge:_(s64) = G_MERGE_VALUES %a, %b
44 $x0 = COPY %merge(s64)
45 RET_ReallyLR implicit $x0
49 name: merge_unmerge_mismatched_num_defs
58 ; CHECK-LABEL: name: merge_unmerge_mismatched_num_defs
59 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $q0
60 ; CHECK: %a:_(s32), %b:_(s32), %c:_(s32), %d:_(s32) = G_UNMERGE_VALUES [[COPY]](s128)
61 ; CHECK: %merge:_(s64) = G_MERGE_VALUES %a(s32), %b(s32)
62 ; CHECK: $x0 = COPY %merge(s64)
63 ; CHECK: RET_ReallyLR implicit $x0
65 %a:_(s32), %b:_(s32), %c:_(s32), %d:_(s32) = G_UNMERGE_VALUES %0
66 %merge:_(s64) = G_MERGE_VALUES %a, %b
67 $x0 = COPY %merge(s64)
68 RET_ReallyLR implicit $x0
81 ; CHECK-LABEL: name: merge_to_zext
82 ; CHECK: %v:_(s32) = COPY $w0
83 ; CHECK: %merge:_(s64) = G_ZEXT %v(s32)
84 ; CHECK: $x0 = COPY %merge(s64)
85 ; CHECK: RET_ReallyLR implicit $x0
87 %zero:_(s32) = G_CONSTANT i32 0
88 %merge:_(s64) = G_MERGE_VALUES %v, %zero
89 $x0 = COPY %merge(s64)
90 RET_ReallyLR implicit $x0