1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s
4 # Verify register banks for G_DUP.
12 tracksRegLiveness: true
17 ; CHECK-LABEL: name: v4s32_gpr
19 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
20 ; CHECK: [[DUP:%[0-9]+]]:fpr(<4 x s32>) = G_DUP [[COPY]](s32)
21 ; CHECK: $q0 = COPY [[DUP]](<4 x s32>)
22 ; CHECK: RET_ReallyLR implicit $q0
24 %4:_(<4 x s32>) = G_DUP %0(s32)
25 $q0 = COPY %4(<4 x s32>)
26 RET_ReallyLR implicit $q0
33 tracksRegLiveness: true
38 ; CHECK-LABEL: name: v4s64_gpr
40 ; CHECK: [[COPY:%[0-9]+]]:gpr(s64) = COPY $x0
41 ; CHECK: [[DUP:%[0-9]+]]:fpr(<2 x s64>) = G_DUP [[COPY]](s64)
42 ; CHECK: $q0 = COPY [[DUP]](<2 x s64>)
43 ; CHECK: RET_ReallyLR implicit $q0
45 %4:_(<2 x s64>) = G_DUP %0(s64)
46 $q0 = COPY %4(<2 x s64>)
47 RET_ReallyLR implicit $q0
54 tracksRegLiveness: true
59 ; CHECK-LABEL: name: v2s32_gpr
61 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
62 ; CHECK: [[DUP:%[0-9]+]]:fpr(<2 x s32>) = G_DUP [[COPY]](s32)
63 ; CHECK: $d0 = COPY [[DUP]](<2 x s32>)
64 ; CHECK: RET_ReallyLR implicit $d0
66 %4:_(<2 x s32>) = G_DUP %0(s32)
67 $d0 = COPY %4(<2 x s32>)
68 RET_ReallyLR implicit $d0
75 tracksRegLiveness: true
80 ; CHECK-LABEL: name: v4s32_fpr
82 ; CHECK: [[COPY:%[0-9]+]]:fpr(s32) = COPY $s0
83 ; CHECK: [[DUP:%[0-9]+]]:fpr(<4 x s32>) = G_DUP [[COPY]](s32)
84 ; CHECK: $q0 = COPY [[DUP]](<4 x s32>)
85 ; CHECK: RET_ReallyLR implicit $q0
87 %4:_(<4 x s32>) = G_DUP %0(s32)
88 $q0 = COPY %4(<4 x s32>)
89 RET_ReallyLR implicit $q0
96 tracksRegLiveness: true
101 ; CHECK-LABEL: name: v2s64_fpr
102 ; CHECK: liveins: $d0
103 ; CHECK: [[COPY:%[0-9]+]]:fpr(s64) = COPY $d0
104 ; CHECK: [[DUP:%[0-9]+]]:fpr(<2 x s64>) = G_DUP [[COPY]](s64)
105 ; CHECK: $q0 = COPY [[DUP]](<2 x s64>)
106 ; CHECK: RET_ReallyLR implicit $q0
108 %4:_(<2 x s64>) = G_DUP %0(s64)
109 $q0 = COPY %4(<2 x s64>)
110 RET_ReallyLR implicit $q0
117 tracksRegLiveness: true
122 ; CHECK-LABEL: name: v2s32_fpr
123 ; CHECK: liveins: $s0
124 ; CHECK: [[COPY:%[0-9]+]]:fpr(s32) = COPY $s0
125 ; CHECK: [[DUP:%[0-9]+]]:fpr(<2 x s32>) = G_DUP [[COPY]](s32)
126 ; CHECK: $d0 = COPY [[DUP]](<2 x s32>)
127 ; CHECK: RET_ReallyLR implicit $d0
129 %4:_(<2 x s32>) = G_DUP %0(s32)
130 $d0 = COPY %4(<2 x s32>)
131 RET_ReallyLR implicit $d0
138 tracksRegLiveness: true
143 ; CHECK-LABEL: name: v2s64_fpr_copy
144 ; CHECK: liveins: $d0
145 ; CHECK: [[COPY:%[0-9]+]]:fpr(s64) = COPY $d0
146 ; CHECK: [[DUP:%[0-9]+]]:fpr(<2 x s64>) = G_DUP [[COPY]](s64)
147 ; CHECK: $q0 = COPY [[DUP]](<2 x s64>)
148 ; CHECK: RET_ReallyLR implicit $q0
150 %6:_(<2 x s64>) = G_DUP %0(s64)
151 $q0 = COPY %6(<2 x s64>)
152 RET_ReallyLR implicit $q0
159 tracksRegLiveness: true
164 ; CHECK-LABEL: name: v416s8_gpr
165 ; CHECK: liveins: $w0
166 ; CHECK: [[COPY:%[0-9]+]]:gpr(s32) = COPY $w0
167 ; CHECK: %trunc:gpr(s8) = G_TRUNC [[COPY]](s32)
168 ; CHECK: [[DUP:%[0-9]+]]:fpr(<16 x s8>) = G_DUP %trunc(s8)
169 ; CHECK: $q0 = COPY [[DUP]](<16 x s8>)
170 ; CHECK: RET_ReallyLR implicit $q0
172 %trunc:_(s8) = G_TRUNC %0(s32)
173 %1:_(<16 x s8>) = G_DUP %trunc(s8)
174 $q0 = COPY %1(<16 x s8>)
175 RET_ReallyLR implicit $q0