1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
7 tracksRegLiveness: true
10 machineFunctionInfo: {}
14 ; CHECK-LABEL: name: add_lhs_sub_reg
15 ; CHECK: liveins: $w0, $w1
17 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
18 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)
21 %2:_(s32) = G_SUB %0, %1
22 %3:_(s32) = G_ADD %2, %1
26 name: add_lhs_sub_reg_wide
28 tracksRegLiveness: true
31 machineFunctionInfo: {}
35 ; CHECK-LABEL: name: add_lhs_sub_reg_wide
36 ; CHECK: liveins: $q0, $q1
38 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $q0
39 ; CHECK-NEXT: $q0 = COPY [[COPY]](s128)
42 %2:_(s128) = G_SUB %0, %1
43 %3:_(s128) = G_ADD %2, %1
47 name: add_lhs_sub_reg_vec
49 tracksRegLiveness: true
52 machineFunctionInfo: {}
56 ; CHECK-LABEL: name: add_lhs_sub_reg_vec
57 ; CHECK: liveins: $x0, $x1
59 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $x0
60 ; CHECK-NEXT: $x0 = COPY [[COPY]](<4 x s16>)
61 %0:_(<4 x s16>) = COPY $x0
62 %1:_(<4 x s16>) = COPY $x1
63 %2:_(<4 x s16>) = G_SUB %0, %1
64 %3:_(<4 x s16>) = G_ADD %2, %1
70 tracksRegLiveness: true
73 machineFunctionInfo: {}
77 ; CHECK-LABEL: name: add_rhs_sub_reg
78 ; CHECK: liveins: $w0, $w1
80 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
81 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)
84 %2:_(s32) = G_SUB %0, %1
85 %3:_(s32) = G_ADD %1, %2
89 name: add_rhs_sub_reg_wide
91 tracksRegLiveness: true
94 machineFunctionInfo: {}
98 ; CHECK-LABEL: name: add_rhs_sub_reg_wide
99 ; CHECK: liveins: $q0, $q1
101 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $q0
102 ; CHECK-NEXT: $q0 = COPY [[COPY]](s128)
103 %0:_(s128) = COPY $q0
104 %1:_(s128) = COPY $q1
105 %2:_(s128) = G_SUB %0, %1
106 %3:_(s128) = G_ADD %1, %2
110 name: add_rhs_sub_reg_vec
112 tracksRegLiveness: true
115 machineFunctionInfo: {}
119 ; CHECK-LABEL: name: add_rhs_sub_reg_vec
120 ; CHECK: liveins: $x0, $x1
122 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $x0
123 ; CHECK-NEXT: $x0 = COPY [[COPY]](<4 x s16>)
124 %0:_(<4 x s16>) = COPY $x0
125 %1:_(<4 x s16>) = COPY $x1
126 %2:_(<4 x s16>) = G_SUB %0, %1
127 %3:_(<4 x s16>) = G_ADD %1, %2