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: gpr }
31 ; CHECK-LABEL: name: bitcast_s32_gpr
32 ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
33 ; CHECK: $w0 = COPY [[COPY]]
35 %1(s32) = G_BITCAST %0
45 - { id: 0, class: fpr }
46 - { id: 1, class: fpr }
52 ; CHECK-LABEL: name: bitcast_s32_fpr
53 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
54 ; CHECK: $s0 = COPY [[COPY]]
56 %1(s32) = G_BITCAST %0
61 name: bitcast_s32_gpr_fpr
66 - { id: 0, class: gpr }
67 - { id: 1, class: fpr }
73 ; CHECK-LABEL: name: bitcast_s32_gpr_fpr
74 ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
75 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]]
76 ; CHECK: $s0 = COPY [[COPY1]]
78 %1(s32) = G_BITCAST %0
83 name: bitcast_s32_fpr_gpr
88 - { id: 0, class: fpr }
89 - { id: 1, class: gpr }
95 ; CHECK-LABEL: name: bitcast_s32_fpr_gpr
96 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
97 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]]
98 ; CHECK: $w0 = COPY [[COPY1]]
100 %1(s32) = G_BITCAST %0
105 name: bitcast_s64_gpr
107 regBankSelected: true
110 - { id: 0, class: gpr }
111 - { id: 1, class: gpr }
117 ; CHECK-LABEL: name: bitcast_s64_gpr
118 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
119 ; CHECK: $x0 = COPY [[COPY]]
121 %1(s64) = G_BITCAST %0
126 name: bitcast_s64_fpr
128 regBankSelected: true
131 - { id: 0, class: fpr }
132 - { id: 1, class: fpr }
138 ; CHECK-LABEL: name: bitcast_s64_fpr
139 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
140 ; CHECK: $d0 = COPY [[COPY]]
142 %1(s64) = G_BITCAST %0
147 name: bitcast_s64_gpr_fpr
149 regBankSelected: true
152 - { id: 0, class: gpr }
153 - { id: 1, class: fpr }
158 ; CHECK-LABEL: name: bitcast_s64_gpr_fpr
159 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
160 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]]
161 ; CHECK: $d0 = COPY [[COPY1]]
163 %1(s64) = G_BITCAST %0
168 name: bitcast_s64_fpr_gpr
170 regBankSelected: true
173 - { id: 0, class: fpr }
174 - { id: 1, class: gpr }
180 ; CHECK-LABEL: name: bitcast_s64_fpr_gpr
181 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
182 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY [[COPY]]
183 ; CHECK: $x0 = COPY [[COPY1]]
185 %1(s64) = G_BITCAST %0
190 name: bitcast_s64_v2f32_fpr
192 regBankSelected: true
195 - { id: 0, class: fpr }
196 - { id: 1, class: fpr }
202 ; CHECK-LABEL: name: bitcast_s64_v2f32_fpr
203 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
204 ; CHECK: $x0 = COPY [[COPY]]
206 %1(<2 x s32>) = G_BITCAST %0
207 $x0 = COPY %1(<2 x s32>)
211 name: bitcast_s64_v8i8_fpr
213 regBankSelected: true
216 - { id: 0, class: fpr }
217 - { id: 1, class: fpr }
223 ; CHECK-LABEL: name: bitcast_s64_v8i8_fpr
224 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
225 ; CHECK: $x0 = COPY [[COPY]]
227 %1(<8 x s8>) = G_BITCAST %0
228 $x0 = COPY %1(<8 x s8>)