1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64--"
8 define void @test_fptosi_s32_s32() { ret void }
9 define void @test_fptoui_s32_s32() { ret void }
10 define void @test_fptosi_s32_s64() { ret void }
11 define void @test_fptoui_s32_s64() { ret void }
13 define void @test_fptosi_s64_s32() { ret void }
14 define void @test_fptoui_s64_s32() { ret void }
15 define void @test_fptosi_s64_s64() { ret void }
16 define void @test_fptoui_s64_s64() { ret void }
18 define void @test_fptosi_s1_s32() { ret void }
19 define void @test_fptoui_s1_s32() { ret void }
21 define void @test_fptosi_s8_s64() { ret void }
22 define void @test_fptoui_s8_s64() { ret void }
24 define void @test_fptosi_s16_s32() { ret void }
25 define void @test_fptoui_s16_s32() { ret void }
27 define void @test_fptoui_v4s32() { ret void }
28 define void @test_fptosi_v4s32() { ret void }
32 name: test_fptosi_s32_s32
36 ; CHECK-LABEL: name: test_fptosi_s32_s32
37 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
38 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
39 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
40 %0:_(s32) = G_IMPLICIT_DEF
41 %1:_(s32) = G_FPTOSI %0
46 name: test_fptoui_s32_s32
50 ; CHECK-LABEL: name: test_fptoui_s32_s32
51 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
52 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[DEF]](s32)
53 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
54 %0:_(s32) = G_IMPLICIT_DEF
55 %1:_(s32) = G_FPTOUI %0
60 name: test_fptosi_s32_s64
64 ; CHECK-LABEL: name: test_fptosi_s32_s64
65 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
66 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
67 ; CHECK: $w0 = COPY [[FPTOSI]](s32)
68 %0:_(s32) = G_IMPLICIT_DEF
69 %1:_(s32) = G_FPTOSI %0
74 name: test_fptoui_s32_s64
78 ; CHECK-LABEL: name: test_fptoui_s32_s64
79 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
80 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
81 ; CHECK: $w0 = COPY [[FPTOUI]](s32)
83 %1:_(s32) = G_FPTOUI %0
88 name: test_fptosi_s64_s32
92 ; CHECK-LABEL: name: test_fptosi_s64_s32
93 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
94 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s32)
95 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
97 %1:_(s64) = G_FPTOSI %0
102 name: test_fptoui_s64_s32
106 ; CHECK-LABEL: name: test_fptoui_s64_s32
107 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
108 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s32)
109 ; CHECK: $x0 = COPY [[FPTOUI]](s64)
111 %1:_(s64) = G_FPTOUI %0
116 name: test_fptosi_s64_s64
120 ; CHECK-LABEL: name: test_fptosi_s64_s64
121 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
122 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s64)
123 ; CHECK: $x0 = COPY [[FPTOSI]](s64)
125 %1:_(s64) = G_FPTOSI %0
130 name: test_fptoui_s64_s64
134 ; CHECK-LABEL: name: test_fptoui_s64_s64
135 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
136 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s64)
137 ; CHECK: $x0 = COPY [[FPTOUI]](s64)
139 %1:_(s64) = G_FPTOUI %0
146 name: test_fptosi_s1_s32
150 ; CHECK-LABEL: name: test_fptosi_s1_s32
151 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
152 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
153 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FPTOSI]](s32)
154 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
156 %1:_(s1) = G_FPTOSI %0
157 %2:_(s64) = G_ANYEXT %1
162 name: test_fptoui_s1_s32
166 ; CHECK-LABEL: name: test_fptoui_s1_s32
167 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
168 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
169 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
170 ; CHECK: $w0 = COPY [[COPY1]](s32)
172 %1:_(s1) = G_FPTOUI %0
173 %2:_(s32) = G_ANYEXT %1
178 name: test_fptosi_s8_s64
182 ; CHECK-LABEL: name: test_fptosi_s8_s64
183 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
184 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
185 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
186 ; CHECK: $w0 = COPY [[COPY1]](s32)
188 %1:_(s8) = G_FPTOSI %0
189 %2:_(s32) = G_ANYEXT %1
194 name: test_fptoui_s8_s64
198 ; CHECK-LABEL: name: test_fptoui_s8_s64
199 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
200 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
201 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
202 ; CHECK: $w0 = COPY [[COPY1]](s32)
204 %1:_(s8) = G_FPTOUI %0
205 %2:_(s32) = G_ANYEXT %1
210 name: test_fptosi_s16_s32
214 ; CHECK-LABEL: name: test_fptosi_s16_s32
215 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
216 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
217 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
218 ; CHECK: $w0 = COPY [[COPY1]](s32)
220 %1:_(s16) = G_FPTOSI %0
221 %2:_(s32) = G_ANYEXT %1
226 name: test_fptoui_s16_s32
230 ; CHECK-LABEL: name: test_fptoui_s16_s32
231 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
232 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
233 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
234 ; CHECK: $w0 = COPY [[COPY1]](s32)
236 %1:_(s16) = G_FPTOUI %0
237 %2:_(s32) = G_ANYEXT %1
242 name: test_fptoui_v4s32
246 ; CHECK-LABEL: name: test_fptoui_v4s32
247 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
248 ; CHECK: [[FPTOUI:%[0-9]+]]:_(<4 x s32>) = G_FPTOUI [[COPY]](<4 x s32>)
249 ; CHECK: $q0 = COPY [[FPTOUI]](<4 x s32>)
250 %0:_(<4 x s32>) = COPY $q0
251 %1:_(<4 x s32>) = G_FPTOUI %0
256 name: test_fptosi_v4s32
260 ; CHECK-LABEL: name: test_fptosi_v4s32
261 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
262 ; CHECK: [[FPTOSI:%[0-9]+]]:_(<4 x s32>) = G_FPTOSI [[COPY]](<4 x s32>)
263 ; CHECK: $q0 = COPY [[FPTOSI]](<4 x s32>)
264 %0:_(<4 x s32>) = COPY $q0
265 %1:_(<4 x s32>) = G_FPTOSI %0