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
7 tracksRegLiveness: true
14 ; CHECK-LABEL: name: f64_faddp
16 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
17 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
18 ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C]](s64)
19 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
20 ; CHECK: [[EVEC1:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C1]](s64)
21 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[EVEC]], [[EVEC1]]
22 ; CHECK: $d0 = COPY [[FADD]](s64)
23 ; CHECK: RET_ReallyLR implicit $d0
24 %0:_(<2 x s64>) = COPY $q0
25 %2:_(<2 x s64>) = G_IMPLICIT_DEF
26 %5:_(s64) = G_CONSTANT i64 0
27 %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
28 %3:_(<2 x s64>) = G_FADD %1, %0
29 %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
31 RET_ReallyLR implicit $d0
35 name: f64_faddp_commuted
38 tracksRegLiveness: true
45 ; CHECK-LABEL: name: f64_faddp_commuted
47 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
48 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
49 ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C]](s64)
50 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
51 ; CHECK: [[EVEC1:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C1]](s64)
52 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[EVEC]], [[EVEC1]]
53 ; CHECK: $d0 = COPY [[FADD]](s64)
54 ; CHECK: RET_ReallyLR implicit $d0
55 %0:_(<2 x s64>) = COPY $q0
56 %2:_(<2 x s64>) = G_IMPLICIT_DEF
57 %5:_(s64) = G_CONSTANT i64 0
58 %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
59 %3:_(<2 x s64>) = G_FADD %0, %1
60 %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
62 RET_ReallyLR implicit $d0
69 tracksRegLiveness: true
76 ; CHECK-LABEL: name: f32_faddp
78 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
79 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
80 ; CHECK: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C]](s64)
81 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
82 ; CHECK: [[EVEC1:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C1]](s64)
83 ; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[EVEC]], [[EVEC1]]
84 ; CHECK: $s0 = COPY [[FADD]](s32)
85 ; CHECK: RET_ReallyLR implicit $s0
86 %0:_(<2 x s32>) = COPY $d0
87 %2:_(<2 x s32>) = G_IMPLICIT_DEF
88 %5:_(s64) = G_CONSTANT i64 0
89 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, undef)
90 %3:_(<2 x s32>) = G_FADD %1, %0
91 %4:_(s32) = G_EXTRACT_VECTOR_ELT %3(<2 x s32>), %5(s64)
93 RET_ReallyLR implicit $s0
97 name: f32_faddp_commuted
100 tracksRegLiveness: true
107 ; CHECK-LABEL: name: f32_faddp_commuted
108 ; CHECK: liveins: $d0
109 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
110 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
111 ; CHECK: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C]](s64)
112 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
113 ; CHECK: [[EVEC1:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C1]](s64)
114 ; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[EVEC]], [[EVEC1]]
115 ; CHECK: $s0 = COPY [[FADD]](s32)
116 ; CHECK: RET_ReallyLR implicit $s0
117 %0:_(<2 x s32>) = COPY $d0
118 %2:_(<2 x s32>) = G_IMPLICIT_DEF
119 %5:_(s64) = G_CONSTANT i64 0
120 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, undef)
121 %3:_(<2 x s32>) = G_FADD %0, %1
122 %4:_(s32) = G_EXTRACT_VECTOR_ELT %3(<2 x s32>), %5(s64)
124 RET_ReallyLR implicit $s0
128 name: wrong_extract_idx
131 tracksRegLiveness: true
138 ; CHECK-LABEL: name: wrong_extract_idx
139 ; CHECK: liveins: $q0
140 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
141 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
142 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
143 ; CHECK: [[SHUF:%[0-9]+]]:_(<2 x s64>) = G_SHUFFLE_VECTOR [[COPY]](<2 x s64>), [[DEF]], shufflemask(1, undef)
144 ; CHECK: [[FADD:%[0-9]+]]:_(<2 x s64>) = G_FADD [[SHUF]], [[COPY]]
145 ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[FADD]](<2 x s64>), [[C]](s64)
146 ; CHECK: $d0 = COPY [[EVEC]](s64)
147 ; CHECK: RET_ReallyLR implicit $d0
148 %0:_(<2 x s64>) = COPY $q0
149 %2:_(<2 x s64>) = G_IMPLICIT_DEF
150 %5:_(s64) = G_CONSTANT i64 1
151 %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
152 %3:_(<2 x s64>) = G_FADD %1, %0
153 %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
155 RET_ReallyLR implicit $d0
159 name: wrong_shuffle_mask
162 tracksRegLiveness: true
169 ; CHECK-LABEL: name: wrong_shuffle_mask
170 ; CHECK: liveins: $q0
171 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
172 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
173 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
174 ; CHECK: [[SHUF:%[0-9]+]]:_(<2 x s64>) = G_SHUFFLE_VECTOR [[COPY]](<2 x s64>), [[DEF]], shufflemask(0, undef)
175 ; CHECK: [[FADD:%[0-9]+]]:_(<2 x s64>) = G_FADD [[SHUF]], [[COPY]]
176 ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[FADD]](<2 x s64>), [[C]](s64)
177 ; CHECK: $d0 = COPY [[EVEC]](s64)
178 ; CHECK: RET_ReallyLR implicit $d0
179 %0:_(<2 x s64>) = COPY $q0
180 %2:_(<2 x s64>) = G_IMPLICIT_DEF
181 %5:_(s64) = G_CONSTANT i64 0
182 %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(0, undef)
183 %3:_(<2 x s64>) = G_FADD %1, %0
184 %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
186 RET_ReallyLR implicit $d0