1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 name: test_fptosi_s32_s32
9 ; CHECK-LABEL: name: test_fptosi_s32_s32
10 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
11 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
12 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
13 %0:_(s32) = G_IMPLICIT_DEF
14 %1:_(s32) = G_FPTOSI %0
19 name: test_fptoui_s32_s32
23 ; CHECK-LABEL: name: test_fptoui_s32_s32
24 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
25 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[DEF]](s32)
26 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
27 %0:_(s32) = G_IMPLICIT_DEF
28 %1:_(s32) = G_FPTOUI %0
33 name: test_fptosi_s32_s64
37 ; CHECK-LABEL: name: test_fptosi_s32_s64
38 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
39 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
40 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
41 %0:_(s32) = G_IMPLICIT_DEF
42 %1:_(s32) = G_FPTOSI %0
47 name: test_fptoui_s32_s64
51 ; CHECK-LABEL: name: test_fptoui_s32_s64
52 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
53 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
54 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
56 %1:_(s32) = G_FPTOUI %0
61 name: test_fptosi_s64_s32
65 ; CHECK-LABEL: name: test_fptosi_s64_s32
66 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
67 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s32)
68 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
70 %1:_(s64) = G_FPTOSI %0
75 name: test_fptoui_s64_s32
79 ; CHECK-LABEL: name: test_fptoui_s64_s32
80 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
81 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s32)
82 ; CHECK: $x0 = COPY [[FPTOUI]](s64)
84 %1:_(s64) = G_FPTOUI %0
89 name: test_fptosi_s64_s64
93 ; CHECK-LABEL: name: test_fptosi_s64_s64
94 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
95 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s64)
96 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
98 %1:_(s64) = G_FPTOSI %0
103 name: test_fptoui_s64_s64
107 ; CHECK-LABEL: name: test_fptoui_s64_s64
108 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
109 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s64)
110 ; CHECK: $x0 = COPY [[FPTOUI]](s64)
112 %1:_(s64) = G_FPTOUI %0
119 name: test_fptosi_s1_s32
123 ; CHECK-LABEL: name: test_fptosi_s1_s32
124 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
125 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
126 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FPTOSI]](s32)
127 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
129 %1:_(s1) = G_FPTOSI %0
130 %2:_(s64) = G_ANYEXT %1
135 name: test_fptoui_s1_s32
139 ; CHECK-LABEL: name: test_fptoui_s1_s32
140 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
141 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
142 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
143 ; CHECK: $w0 = COPY [[COPY1]](s32)
145 %1:_(s1) = G_FPTOUI %0
146 %2:_(s32) = G_ANYEXT %1
151 name: test_fptosi_s8_s64
155 ; CHECK-LABEL: name: test_fptosi_s8_s64
156 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
157 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
158 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
159 ; CHECK: $w0 = COPY [[COPY1]](s32)
161 %1:_(s8) = G_FPTOSI %0
162 %2:_(s32) = G_ANYEXT %1
167 name: test_fptoui_s8_s64
171 ; CHECK-LABEL: name: test_fptoui_s8_s64
172 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
173 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
174 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
175 ; CHECK: $w0 = COPY [[COPY1]](s32)
177 %1:_(s8) = G_FPTOUI %0
178 %2:_(s32) = G_ANYEXT %1
183 name: test_fptosi_s16_s32
187 ; CHECK-LABEL: name: test_fptosi_s16_s32
188 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
189 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
190 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
191 ; CHECK: $w0 = COPY [[COPY1]](s32)
193 %1:_(s16) = G_FPTOSI %0
194 %2:_(s32) = G_ANYEXT %1
199 name: test_fptoui_s16_s32
203 ; CHECK-LABEL: name: test_fptoui_s16_s32
204 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
205 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
206 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
207 ; CHECK: $w0 = COPY [[COPY1]](s32)
209 %1:_(s16) = G_FPTOUI %0
210 %2:_(s32) = G_ANYEXT %1
215 name: test_fptoui_v4s32
219 ; CHECK-LABEL: name: test_fptoui_v4s32
220 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
221 ; CHECK: [[FPTOUI:%[0-9]+]]:_(<4 x s32>) = G_FPTOUI [[COPY]](<4 x s32>)
222 ; CHECK: $q0 = COPY [[FPTOUI]](<4 x s32>)
223 %0:_(<4 x s32>) = COPY $q0
224 %1:_(<4 x s32>) = G_FPTOUI %0
229 name: test_fptosi_v4s32
233 ; CHECK-LABEL: name: test_fptosi_v4s32
234 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
235 ; CHECK: [[FPTOSI:%[0-9]+]]:_(<4 x s32>) = G_FPTOSI [[COPY]](<4 x s32>)
236 ; CHECK: $q0 = COPY [[FPTOSI]](<4 x s32>)
237 %0:_(<4 x s32>) = COPY $q0
238 %1:_(<4 x s32>) = G_FPTOSI %0
243 name: test_fptoui_s128_s32
247 ; CHECK-LABEL: name: test_fptoui_s128_s32
248 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
249 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s128) = G_FPTOUI [[COPY]](s32)
250 ; CHECK: $q0 = COPY [[FPTOUI]](s128)
252 %1:_(s128) = G_FPTOUI %0
257 name: test_fptosi_s128_s32
261 ; CHECK-LABEL: name: test_fptosi_s128_s32
262 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
263 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[COPY]](s32)
264 ; CHECK: $q0 = COPY [[FPTOSI]](s128)
266 %1:_(s128) = G_FPTOSI %0
270 name: test_fptosi_s88_s88
274 ; CHECK-LABEL: name: test_fptosi_s88_s88
275 ; CHECK: [[DEF:%[0-9]+]]:_(s88) = G_IMPLICIT_DEF
276 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[DEF]](s88)
277 ; CHECK: [[TRUNC:%[0-9]+]]:_(s88) = G_TRUNC [[FPTOSI]](s128)
278 ; CHECK: %trunc:_(s64) = G_TRUNC [[TRUNC]](s88)
279 ; CHECK: $x0 = COPY %trunc(s64)
280 %0:_(s88) = G_IMPLICIT_DEF
281 %1:_(s88) = G_FPTOSI %0
282 %trunc:_(s64) = G_TRUNC %1
286 name: test_fptosi_s88_s64
290 ; CHECK-LABEL: name: test_fptosi_s88_s64
291 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
292 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[DEF]](s64)
293 ; CHECK: [[TRUNC:%[0-9]+]]:_(s88) = G_TRUNC [[FPTOSI]](s128)
294 ; CHECK: %trunc:_(s64) = G_TRUNC [[TRUNC]](s88)
295 ; CHECK: $x0 = COPY %trunc(s64)
296 %0:_(s64) = G_IMPLICIT_DEF
297 %1:_(s88) = G_FPTOSI %0
298 %trunc:_(s64) = G_TRUNC %1
302 name: test_fptosi_s64_s88
306 ; CHECK-LABEL: name: test_fptosi_s64_s88
307 ; CHECK: [[DEF:%[0-9]+]]:_(s88) = G_IMPLICIT_DEF
308 ; CHECK: [[FPEXT:%[0-9]+]]:_(s128) = G_FPEXT [[DEF]](s88)
309 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[FPEXT]](s128)
310 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
311 %0:_(s88) = G_IMPLICIT_DEF
312 %1:_(s64) = G_FPTOSI %0