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: $w0 = COPY [[FPTOUI]](s32)
144 %1:_(s1) = G_FPTOUI %0
145 %2:_(s32) = G_ANYEXT %1
150 name: test_fptosi_s8_s64
154 ; CHECK-LABEL: name: test_fptosi_s8_s64
155 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
156 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
157 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
159 %1:_(s8) = G_FPTOSI %0
160 %2:_(s32) = G_ANYEXT %1
165 name: test_fptoui_s8_s64
169 ; CHECK-LABEL: name: test_fptoui_s8_s64
170 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
171 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
172 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
174 %1:_(s8) = G_FPTOUI %0
175 %2:_(s32) = G_ANYEXT %1
180 name: test_fptosi_s16_s32
184 ; CHECK-LABEL: name: test_fptosi_s16_s32
185 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
186 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
187 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
189 %1:_(s16) = G_FPTOSI %0
190 %2:_(s32) = G_ANYEXT %1
195 name: test_fptoui_s16_s32
199 ; CHECK-LABEL: name: test_fptoui_s16_s32
200 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
201 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
202 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
204 %1:_(s16) = G_FPTOUI %0
205 %2:_(s32) = G_ANYEXT %1
210 name: test_fptoui_v4s32
214 ; CHECK-LABEL: name: test_fptoui_v4s32
215 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
216 ; CHECK: [[FPTOUI:%[0-9]+]]:_(<4 x s32>) = G_FPTOUI [[COPY]](<4 x s32>)
217 ; CHECK: $q0 = COPY [[FPTOUI]](<4 x s32>)
218 %0:_(<4 x s32>) = COPY $q0
219 %1:_(<4 x s32>) = G_FPTOUI %0
224 name: test_fptosi_v4s32
228 ; CHECK-LABEL: name: test_fptosi_v4s32
229 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
230 ; CHECK: [[FPTOSI:%[0-9]+]]:_(<4 x s32>) = G_FPTOSI [[COPY]](<4 x s32>)
231 ; CHECK: $q0 = COPY [[FPTOSI]](<4 x s32>)
232 %0:_(<4 x s32>) = COPY $q0
233 %1:_(<4 x s32>) = G_FPTOSI %0
238 name: test_fptoui_s128_s32
242 ; CHECK-LABEL: name: test_fptoui_s128_s32
243 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
244 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s128) = G_FPTOUI [[COPY]](s32)
245 ; CHECK: $q0 = COPY [[FPTOUI]](s128)
247 %1:_(s128) = G_FPTOUI %0
252 name: test_fptosi_s128_s32
256 ; CHECK-LABEL: name: test_fptosi_s128_s32
257 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
258 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[COPY]](s32)
259 ; CHECK: $q0 = COPY [[FPTOSI]](s128)
261 %1:_(s128) = G_FPTOSI %0
265 name: test_fptosi_s88_s88
269 ; CHECK-LABEL: name: test_fptosi_s88_s88
270 ; CHECK: [[DEF:%[0-9]+]]:_(s88) = G_IMPLICIT_DEF
271 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[DEF]](s88)
272 ; CHECK: [[TRUNC:%[0-9]+]]:_(s88) = G_TRUNC [[FPTOSI]](s128)
273 ; CHECK: %trunc:_(s64) = G_TRUNC [[TRUNC]](s88)
274 ; CHECK: $x0 = COPY %trunc(s64)
275 %0:_(s88) = G_IMPLICIT_DEF
276 %1:_(s88) = G_FPTOSI %0
277 %trunc:_(s64) = G_TRUNC %1
281 name: test_fptosi_s88_s64
285 ; CHECK-LABEL: name: test_fptosi_s88_s64
286 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
287 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s128) = G_FPTOSI [[DEF]](s64)
288 ; CHECK: [[TRUNC:%[0-9]+]]:_(s88) = G_TRUNC [[FPTOSI]](s128)
289 ; CHECK: %trunc:_(s64) = G_TRUNC [[TRUNC]](s88)
290 ; CHECK: $x0 = COPY %trunc(s64)
291 %0:_(s64) = G_IMPLICIT_DEF
292 %1:_(s88) = G_FPTOSI %0
293 %trunc:_(s64) = G_TRUNC %1
297 name: test_fptosi_s64_s88
301 ; CHECK-LABEL: name: test_fptosi_s64_s88
302 ; CHECK: [[DEF:%[0-9]+]]:_(s88) = G_IMPLICIT_DEF
303 ; CHECK: [[FPEXT:%[0-9]+]]:_(s128) = G_FPEXT [[DEF]](s88)
304 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[FPEXT]](s128)
305 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
306 %0:_(s88) = G_IMPLICIT_DEF
307 %1:_(s64) = G_FPTOSI %0