1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -verify-machineinstrs -O0 -run-pass=instruction-select %s -o - | FileCheck %s
9 tracksRegLiveness: true
11 - { id: 0, class: fpr }
12 - { id: 1, class: fpr }
13 - { id: 2, class: gpr }
14 - { id: 3, class: fpr }
19 ; CHECK-LABEL: name: v2s32_fpr
21 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
22 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
23 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
24 ; CHECK: [[CPYi32_:%[0-9]+]]:fpr32 = CPYi32 [[INSERT_SUBREG]], 1
25 ; CHECK: $s0 = COPY [[CPYi32_]]
26 ; CHECK: RET_ReallyLR implicit $s0
27 %0:fpr(<2 x s32>) = COPY $d0
28 %2:gpr(s64) = G_CONSTANT i64 1
29 %3:fpr(s64) = COPY %2(s64)
30 %1:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
32 RET_ReallyLR implicit $s0
40 tracksRegLiveness: true
44 ; CHECK-LABEL: name: v2s32_fpr_idx0
46 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
47 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]].ssub
48 ; CHECK: $s0 = COPY [[COPY1]]
49 ; CHECK: RET_ReallyLR implicit $s0
50 %0:fpr(<2 x s32>) = COPY $d0
51 %2:gpr(s64) = G_CONSTANT i64 0
52 %3:fpr(s64) = COPY %2(s64)
53 %1:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
55 RET_ReallyLR implicit $s0
63 tracksRegLiveness: true
65 - { id: 0, class: fpr }
66 - { id: 1, class: fpr }
67 - { id: 2, class: gpr }
68 - { id: 3, class: fpr }
73 ; CHECK-LABEL: name: v2s64_fpr
75 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
76 ; CHECK: [[CPYi64_:%[0-9]+]]:fpr64 = CPYi64 [[COPY]], 2
77 ; CHECK: $d0 = COPY [[CPYi64_]]
78 ; CHECK: RET_ReallyLR implicit $d0
79 %0:fpr(<2 x s64>) = COPY $q0
80 %2:gpr(s64) = G_CONSTANT i64 2
81 %3:fpr(s64) = COPY %2(s64)
82 %1:fpr(s64) = G_EXTRACT_VECTOR_ELT %0(<2 x s64>), %3(s64)
84 RET_ReallyLR implicit $d0
92 tracksRegLiveness: true
94 - { id: 0, class: fpr }
95 - { id: 1, class: fpr }
96 - { id: 2, class: gpr }
97 - { id: 3, class: fpr }
102 ; CHECK-LABEL: name: v4s16_fpr
103 ; CHECK: liveins: $d0
104 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
105 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
106 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
107 ; CHECK: [[CPYi16_:%[0-9]+]]:fpr16 = CPYi16 [[INSERT_SUBREG]], 1
108 ; CHECK: $h0 = COPY [[CPYi16_]]
109 ; CHECK: RET_ReallyLR implicit $h0
110 %0:fpr(<4 x s16>) = COPY $d0
111 %2:gpr(s64) = G_CONSTANT i64 1
112 %3:fpr(s64) = COPY %2(s64)
113 %1:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<4 x s16>), %3(s64)
115 RET_ReallyLR implicit $h0
122 regBankSelected: true
123 tracksRegLiveness: true
127 ; CHECK-LABEL: name: v8s16_fpr
128 ; CHECK: liveins: $q0
129 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
130 ; CHECK: [[CPYi16_:%[0-9]+]]:fpr16 = CPYi16 [[COPY]], 1
131 ; CHECK: $h0 = COPY [[CPYi16_]]
132 ; CHECK: RET_ReallyLR implicit $h0
133 %0:fpr(<8 x s16>) = COPY $q0
134 %2:gpr(s64) = G_CONSTANT i64 1
135 %3:fpr(s64) = COPY %2(s64)
136 %1:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
138 RET_ReallyLR implicit $h0
145 regBankSelected: true
146 tracksRegLiveness: true
150 ; CHECK-LABEL: name: v8s16_fpr_zext
151 ; CHECK: liveins: $q0
152 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
153 ; CHECK: [[CPYi16_:%[0-9]+]]:fpr16 = CPYi16 [[COPY]], 1
154 ; CHECK: $h0 = COPY [[CPYi16_]]
155 ; CHECK: RET_ReallyLR implicit $h0
156 %0:fpr(<8 x s16>) = COPY $q0
157 %1:gpr(s32) = G_CONSTANT i32 1
158 %2:gpr(s64) = G_ZEXT %1
159 %3:fpr(s64) = COPY %2(s64)
160 %4:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
162 RET_ReallyLR implicit $h0
169 regBankSelected: true
170 tracksRegLiveness: true
174 ; CHECK-LABEL: name: v8s16_fpr_sext
175 ; CHECK: liveins: $q0
176 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
177 ; CHECK: [[CPYi16_:%[0-9]+]]:fpr16 = CPYi16 [[COPY]], 1
178 ; CHECK: $h0 = COPY [[CPYi16_]]
179 ; CHECK: RET_ReallyLR implicit $h0
180 %0:fpr(<8 x s16>) = COPY $q0
181 %1:gpr(s32) = G_CONSTANT i32 1
182 %2:gpr(s64) = G_SEXT %1
183 %3:fpr(s64) = COPY %2(s64)
184 %4:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
186 RET_ReallyLR implicit $h0
190 name: v8s16_fpr_trunc
193 regBankSelected: true
194 tracksRegLiveness: true
198 ; CHECK-LABEL: name: v8s16_fpr_trunc
199 ; CHECK: liveins: $q0
200 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
201 ; CHECK: [[CPYi16_:%[0-9]+]]:fpr16 = CPYi16 [[COPY]], 1
202 ; CHECK: $h0 = COPY [[CPYi16_]]
203 ; CHECK: RET_ReallyLR implicit $h0
204 %0:fpr(<8 x s16>) = COPY $q0
205 %1:gpr(s64) = G_CONSTANT i64 1
206 %2:gpr(s32) = G_TRUNC %1
207 %3:gpr(s64) = G_SEXT %2
208 %4:fpr(s64) = COPY %3(s64)
209 %5:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %4(s64)
211 RET_ReallyLR implicit $h0