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
3
4--- |
5  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6
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 }
17...
18
19---
20name:            bitcast_s32_gpr
21legalized:       true
22regBankSelected: true
23registers:
24  - { id: 0, class: gpr }
25  - { id: 1, class: gpr }
26
27body:             |
28  bb.0:
29    liveins: $w0
30
31    ; CHECK-LABEL: name: bitcast_s32_gpr
32    ; CHECK: [[COPY:%[0-9]+]]:gpr32all = COPY $w0
33    ; CHECK: $w0 = COPY [[COPY]]
34    %0(s32) = COPY $w0
35    %1(s32) = G_BITCAST %0
36    $w0 = COPY %1(s32)
37...
38
39---
40name:            bitcast_s32_fpr
41legalized:       true
42regBankSelected: true
43
44registers:
45  - { id: 0, class: fpr }
46  - { id: 1, class: fpr }
47
48body:             |
49  bb.0:
50    liveins: $s0
51
52    ; CHECK-LABEL: name: bitcast_s32_fpr
53    ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
54    ; CHECK: $s0 = COPY [[COPY]]
55    %0(s32) = COPY $s0
56    %1(s32) = G_BITCAST %0
57    $s0 = COPY %1(s32)
58...
59
60---
61name:            bitcast_s32_gpr_fpr
62legalized:       true
63regBankSelected: true
64
65registers:
66  - { id: 0, class: gpr }
67  - { id: 1, class: fpr }
68
69body:             |
70  bb.0:
71    liveins: $w0
72
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]]
77    %0(s32) = COPY $w0
78    %1(s32) = G_BITCAST %0
79    $s0 = COPY %1(s32)
80...
81
82---
83name:            bitcast_s32_fpr_gpr
84legalized:       true
85regBankSelected: true
86
87registers:
88  - { id: 0, class: fpr }
89  - { id: 1, class: gpr }
90
91body:             |
92  bb.0:
93    liveins: $s0
94
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]]
99    %0(s32) = COPY $s0
100    %1(s32) = G_BITCAST %0
101    $w0 = COPY %1(s32)
102...
103
104---
105name:            bitcast_s64_gpr
106legalized:       true
107regBankSelected: true
108
109registers:
110  - { id: 0, class: gpr }
111  - { id: 1, class: gpr }
112
113body:             |
114  bb.0:
115    liveins: $x0
116
117    ; CHECK-LABEL: name: bitcast_s64_gpr
118    ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
119    ; CHECK: $x0 = COPY [[COPY]]
120    %0(s64) = COPY $x0
121    %1(s64) = G_BITCAST %0
122    $x0 = COPY %1(s64)
123...
124
125---
126name:            bitcast_s64_fpr
127legalized:       true
128regBankSelected: true
129
130registers:
131  - { id: 0, class: fpr }
132  - { id: 1, class: fpr }
133
134body:             |
135  bb.0:
136    liveins: $d0
137
138    ; CHECK-LABEL: name: bitcast_s64_fpr
139    ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
140    ; CHECK: $d0 = COPY [[COPY]]
141    %0(s64) = COPY $d0
142    %1(s64) = G_BITCAST %0
143    $d0 = COPY %1(s64)
144...
145
146---
147name:            bitcast_s64_gpr_fpr
148legalized:       true
149regBankSelected: true
150
151registers:
152  - { id: 0, class: gpr }
153  - { id: 1, class: fpr }
154body:             |
155  bb.0:
156    liveins: $x0
157
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]]
162    %0(s64) = COPY $x0
163    %1(s64) = G_BITCAST %0
164    $d0 = COPY %1(s64)
165...
166
167---
168name:            bitcast_s64_fpr_gpr
169legalized:       true
170regBankSelected: true
171
172registers:
173  - { id: 0, class: fpr }
174  - { id: 1, class: gpr }
175
176body:             |
177  bb.0:
178    liveins: $d0
179
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]]
184    %0(s64) = COPY $d0
185    %1(s64) = G_BITCAST %0
186    $x0 = COPY %1(s64)
187...
188
189---
190name:            bitcast_s64_v2f32_fpr
191legalized:       true
192regBankSelected: true
193
194registers:
195  - { id: 0, class: fpr }
196  - { id: 1, class: fpr }
197
198body:             |
199  bb.0:
200    liveins: $d0
201
202    ; CHECK-LABEL: name: bitcast_s64_v2f32_fpr
203    ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
204    ; CHECK: $x0 = COPY [[COPY]]
205    %0(s64) = COPY $d0
206    %1(<2 x s32>) = G_BITCAST %0
207    $x0 = COPY %1(<2 x s32>)
208...
209
210---
211name:            bitcast_s64_v8i8_fpr
212legalized:       true
213regBankSelected: true
214
215registers:
216  - { id: 0, class: fpr }
217  - { id: 1, class: fpr }
218
219body:             |
220  bb.0:
221    liveins: $d0
222
223    ; CHECK-LABEL: name: bitcast_s64_v8i8_fpr
224    ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
225    ; CHECK: $x0 = COPY [[COPY]]
226    %0(s64) = COPY $d0
227    %1(<8 x s8>) = G_BITCAST %0
228    $x0 = COPY %1(<8 x s8>)
229...
230