1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7 define void @bitcast_s32_gpr() { ret void }
8 define void @bitcast_s32_fpr() { ret void }
9 define void @bitcast_s32_gpr_fpr() { ret void }
10 define void @bitcast_s32_fpr_gpr() { ret void }
11 define void @bitcast_s64_gpr() { ret void }
12 define void @bitcast_s64_fpr() { ret void }
13 define void @bitcast_s64_gpr_fpr() { ret void }
14 define void @bitcast_s64_fpr_gpr() { ret void }
15 define void @bitcast_s64_v2f32_fpr() { ret void }
16 define void @bitcast_s64_v8i8_fpr() { ret void }
24 - { id: 0, class: gpr }
25 - { id: 1, class: fpr }
26 - { id: 2, class: gpr }
31 ; CHECK-LABEL: name: bitcast_s32_gpr
32 ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
33 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]]
34 ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
35 ; CHECK: $w0 = COPY [[COPY2]]
37 %1(<2 x s16>) = G_BITCAST %0
38 %2(s32) = G_BITCAST %1
48 - { id: 0, class: fpr }
49 - { id: 1, class: gpr }
50 - { id: 2, class: fpr }
55 ; CHECK-LABEL: name: bitcast_s32_fpr
56 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
57 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[COPY]]
58 ; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[COPY1]]
59 ; CHECK: $s0 = COPY [[COPY2]]
61 %1(<2 x s16>) = G_BITCAST %0
62 %2(s32) = G_BITCAST %1
67 name: bitcast_s32_gpr_fpr
72 - { id: 0, class: gpr }
73 - { id: 1, class: fpr }
79 ; CHECK-LABEL: name: bitcast_s32_gpr_fpr
80 ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
81 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]]
82 ; CHECK: $s0 = COPY [[COPY1]]
84 %1(<2 x s16>) = G_BITCAST %0
89 name: bitcast_s32_fpr_gpr
94 - { id: 0, class: fpr }
95 - { id: 1, class: gpr }
101 ; CHECK-LABEL: name: bitcast_s32_fpr_gpr
102 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
103 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[COPY]]
104 ; CHECK: $w0 = COPY [[COPY1]]
105 %0(<2 x s16>) = COPY $s0
106 %1(s32) = G_BITCAST %0
111 name: bitcast_s64_gpr
113 regBankSelected: true
116 - { id: 0, class: gpr }
117 - { id: 1, class: fpr }
118 - { id: 2, class: gpr }
124 ; CHECK-LABEL: name: bitcast_s64_gpr
125 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
126 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]]
127 ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY [[COPY1]]
128 ; CHECK: $x0 = COPY [[COPY2]]
130 %1(<2 x s32>) = G_BITCAST %0
131 %2(s64) = G_BITCAST %1
136 name: bitcast_s64_fpr
138 regBankSelected: true
141 - { id: 0, class: fpr }
142 - { id: 1, class: fpr }
148 ; CHECK-LABEL: name: bitcast_s64_fpr
149 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
150 ; CHECK: $d0 = COPY [[COPY]]
152 %1(<2 x s32>) = G_BITCAST %0
157 name: bitcast_s64_gpr_fpr
159 regBankSelected: true
162 - { id: 0, class: gpr }
163 - { id: 1, class: fpr }
168 ; CHECK-LABEL: name: bitcast_s64_gpr_fpr
169 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
170 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]]
171 ; CHECK: $d0 = COPY [[COPY1]]
173 %1(<2 x s32>) = G_BITCAST %0
178 name: bitcast_s64_fpr_gpr
180 regBankSelected: true
183 - { id: 0, class: fpr }
184 - { id: 1, class: gpr }
190 ; CHECK-LABEL: name: bitcast_s64_fpr_gpr
191 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
192 ; CHECK: [[COPY1:%[0-9]+]]:gpr64all = COPY [[COPY]]
193 ; CHECK: $x0 = COPY [[COPY1]]
195 %1(<2 x s32>) = G_BITCAST %0
200 name: bitcast_s64_v2f32_fpr
202 regBankSelected: true
205 - { id: 0, class: fpr }
206 - { id: 1, class: fpr }
212 ; CHECK-LABEL: name: bitcast_s64_v2f32_fpr
213 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
214 ; CHECK: $x0 = COPY [[COPY]]
216 %1(<2 x s32>) = G_BITCAST %0
217 $x0 = COPY %1(<2 x s32>)
221 name: bitcast_s64_v8i8_fpr
223 regBankSelected: true
226 - { id: 0, class: fpr }
227 - { id: 1, class: fpr }
233 ; CHECK-LABEL: name: bitcast_s64_v8i8_fpr
234 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
235 ; CHECK: $x0 = COPY [[COPY]]
237 %1(<8 x s8>) = G_BITCAST %0
238 $x0 = COPY %1(<8 x s8>)