• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s
3
4--- |
5  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6  target triple = "aarch64--"
7
8  define void @test_sitofp_s32_s32() { ret void }
9  define void @test_uitofp_s32_s32() { ret void }
10  define void @test_sitofp_s32_s64() { ret void }
11  define void @test_uitofp_s32_s64() { ret void }
12
13  define void @test_sitofp_s64_s32() { ret void }
14  define void @test_uitofp_s64_s32() { ret void }
15  define void @test_sitofp_s64_s64() { ret void }
16  define void @test_uitofp_s64_s64() { ret void }
17
18  define void @test_sitofp_s32_s1() { ret void }
19  define void @test_uitofp_s32_s1() { ret void }
20
21  define void @test_sitofp_s64_s8() { ret void }
22  define void @test_uitofp_s64_s8() { ret void }
23
24  define void @test_sitofp_v4s32() { ret void }
25  define void @test_uitofp_v4s32() { ret void }
26
27  define void @test_uitofp_v2s64_v2i1() { ret void }
28  define void @test_sitofp_v2s64_v2i1() { ret void }
29
30  define void @test_sitofp_s32_s16() { ret void }
31  define void @test_uitofp_s32_s16() { ret void }
32...
33
34---
35name:            test_sitofp_s32_s32
36body: |
37  bb.0:
38    liveins: $w0
39    ; CHECK-LABEL: name: test_sitofp_s32_s32
40    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
41    ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s32)
42    ; CHECK: $w0 = COPY [[SITOFP]](s32)
43    %0:_(s32) = COPY $w0
44    %1:_(s32) = G_SITOFP %0
45    $w0 = COPY %1
46...
47
48---
49name:            test_uitofp_s32_s32
50body: |
51  bb.0:
52    liveins: $w0
53    ; CHECK-LABEL: name: test_uitofp_s32_s32
54    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
55    ; CHECK: [[UITOFP:%[0-9]+]]:_(s32) = G_UITOFP [[COPY]](s32)
56    ; CHECK: $w0 = COPY [[UITOFP]](s32)
57    %0:_(s32) = COPY $w0
58    %1:_(s32) = G_UITOFP %0
59    $w0 = COPY %1
60...
61
62---
63name:            test_sitofp_s32_s64
64body: |
65  bb.0:
66    liveins: $x0
67    ; CHECK-LABEL: name: test_sitofp_s32_s64
68    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
69    ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s64)
70    ; CHECK: $w0 = COPY [[SITOFP]](s32)
71    %0:_(s64) = COPY $x0
72    %1:_(s32) = G_SITOFP %0
73    $w0 = COPY %1
74...
75
76---
77name:            test_uitofp_s32_s64
78body: |
79  bb.0:
80    liveins: $x0
81    ; CHECK-LABEL: name: test_uitofp_s32_s64
82    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
83    ; CHECK: [[UITOFP:%[0-9]+]]:_(s32) = G_UITOFP [[COPY]](s64)
84    ; CHECK: $w0 = COPY [[UITOFP]](s32)
85    %0:_(s64) = COPY $x0
86    %1:_(s32) = G_UITOFP %0
87    $w0 = COPY %1
88...
89
90---
91name:            test_sitofp_s64_s32
92body: |
93  bb.0:
94    liveins: $w0
95    ; CHECK-LABEL: name: test_sitofp_s64_s32
96    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
97    ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)
98    ; CHECK: $x0 = COPY [[SITOFP]](s64)
99    %0:_(s32) = COPY $w0
100    %1:_(s64) = G_SITOFP %0
101    $x0 = COPY %1
102...
103
104---
105name:            test_uitofp_s64_s32
106body: |
107  bb.0:
108    liveins: $w0
109    ; CHECK-LABEL: name: test_uitofp_s64_s32
110    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
111    ; CHECK: [[UITOFP:%[0-9]+]]:_(s64) = G_UITOFP [[COPY]](s32)
112    ; CHECK: $x0 = COPY [[UITOFP]](s64)
113    %0:_(s32) = COPY $w0
114    %1:_(s64) = G_UITOFP %0
115    $x0 = COPY %1
116...
117
118---
119name:            test_sitofp_s64_s64
120body: |
121  bb.0:
122    liveins: $x0
123    ; CHECK-LABEL: name: test_sitofp_s64_s64
124    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
125    ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s64)
126    ; CHECK: $x0 = COPY [[SITOFP]](s64)
127    %0:_(s64) = COPY $x0
128    %1:_(s64) = G_SITOFP %0
129    $x0 = COPY %1
130...
131
132---
133name:            test_uitofp_s64_s64
134body: |
135  bb.0:
136    liveins: $x0
137    ; CHECK-LABEL: name: test_uitofp_s64_s64
138    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
139    ; CHECK: [[UITOFP:%[0-9]+]]:_(s64) = G_UITOFP [[COPY]](s64)
140    ; CHECK: $x0 = COPY [[UITOFP]](s64)
141    %0:_(s64) = COPY $x0
142    %1:_(s64) = G_UITOFP %0
143    $x0 = COPY %1
144...
145
146
147---
148name:            test_sitofp_s32_s1
149body: |
150  bb.0:
151    liveins: $w0
152    ; CHECK-LABEL: name: test_sitofp_s32_s1
153    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
154    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
155    ; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY1]], 1
156    ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[SEXT_INREG]](s32)
157    ; CHECK: $w0 = COPY [[SITOFP]](s32)
158    %0:_(s32) = COPY $w0
159    %1:_(s1) = G_TRUNC %0
160    %2:_(s32) = G_SITOFP %1
161    $w0 = COPY %2
162...
163
164---
165name:            test_uitofp_s32_s1
166body: |
167  bb.0:
168    liveins: $w0
169    ; CHECK-LABEL: name: test_uitofp_s32_s1
170    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
171    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
172    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
173    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
174    ; CHECK: [[UITOFP:%[0-9]+]]:_(s32) = G_UITOFP [[AND]](s32)
175    ; CHECK: $w0 = COPY [[UITOFP]](s32)
176    %0:_(s32) = COPY $w0
177    %1:_(s1) = G_TRUNC %0
178    %2:_(s32) = G_UITOFP %1
179    $w0 = COPY %2
180...
181
182---
183name:            test_sitofp_s64_s8
184body: |
185  bb.0:
186    liveins: $w0
187    ; CHECK-LABEL: name: test_sitofp_s64_s8
188    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
189    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
190    ; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY1]], 8
191    ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[SEXT_INREG]](s32)
192    ; CHECK: $x0 = COPY [[SITOFP]](s64)
193    %0:_(s32) = COPY $w0
194    %1:_(s8) = G_TRUNC %0
195    %2:_(s64) = G_SITOFP %1
196    $x0 = COPY %2
197...
198
199---
200name:            test_uitofp_s64_s8
201body: |
202  bb.0:
203    liveins: $w0
204    ; CHECK-LABEL: name: test_uitofp_s64_s8
205    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
206    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
207    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
208    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
209    ; CHECK: [[UITOFP:%[0-9]+]]:_(s64) = G_UITOFP [[AND]](s32)
210    ; CHECK: $x0 = COPY [[UITOFP]](s64)
211    %0:_(s32) = COPY $w0
212    %1:_(s8) = G_TRUNC %0
213    %2:_(s64) = G_UITOFP %1
214    $x0 = COPY %2
215...
216
217---
218name:            test_sitofp_v4s32
219body: |
220  bb.0:
221    liveins: $q0
222    ; CHECK-LABEL: name: test_sitofp_v4s32
223    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
224    ; CHECK: [[SITOFP:%[0-9]+]]:_(<4 x s32>) = G_SITOFP [[SITOFP]](<4 x s32>)
225    ; CHECK: $q0 = COPY [[SITOFP]](<4 x s32>)
226    %0:_(<4 x s32>) = COPY $q0
227    %1:_(<4 x s32>) = G_SITOFP %1
228    $q0 = COPY %1
229...
230
231---
232name:            test_uitofp_v4s32
233body: |
234  bb.0:
235    liveins: $q0
236    ; CHECK-LABEL: name: test_uitofp_v4s32
237    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
238    ; CHECK: [[UITOFP:%[0-9]+]]:_(<4 x s32>) = G_UITOFP [[UITOFP]](<4 x s32>)
239    ; CHECK: $q0 = COPY [[UITOFP]](<4 x s32>)
240    %0:_(<4 x s32>) = COPY $q0
241    %1:_(<4 x s32>) = G_UITOFP %1
242    $q0 = COPY %1
243...
244
245---
246name:            test_uitofp_v2s64_v2i1
247body: |
248  bb.0:
249    liveins: $q0
250    ; CHECK-LABEL: name: test_uitofp_v2s64_v2i1
251    ; CHECK: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
252    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s1>) = G_BUILD_VECTOR [[DEF]](s1), [[DEF]](s1)
253    ; CHECK: [[ZEXT:%[0-9]+]]:_(<2 x s64>) = G_ZEXT [[BUILD_VECTOR]](<2 x s1>)
254    ; CHECK: [[UITOFP:%[0-9]+]]:_(<2 x s64>) = G_UITOFP [[ZEXT]](<2 x s64>)
255    ; CHECK: $q0 = COPY [[UITOFP]](<2 x s64>)
256    %0:_(<2 x s1>) = G_IMPLICIT_DEF
257    %1:_(<2 x s64>) = G_UITOFP %0
258    $q0 = COPY %1
259...
260
261---
262name:            test_sitofp_v2s64_v2i1
263body: |
264  bb.0:
265    liveins: $q0
266    ; CHECK-LABEL: name: test_sitofp_v2s64_v2i1
267    ; CHECK: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
268    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s1>) = G_BUILD_VECTOR [[DEF]](s1), [[DEF]](s1)
269    ; CHECK: [[SEXT:%[0-9]+]]:_(<2 x s64>) = G_SEXT [[BUILD_VECTOR]](<2 x s1>)
270    ; CHECK: [[SITOFP:%[0-9]+]]:_(<2 x s64>) = G_SITOFP [[SEXT]](<2 x s64>)
271    ; CHECK: $q0 = COPY [[SITOFP]](<2 x s64>)
272    %0:_(<2 x s1>) = G_IMPLICIT_DEF
273    %1:_(<2 x s64>) = G_SITOFP %0
274    $q0 = COPY %1
275...
276
277---
278name:            test_sitofp_s32_s16
279body: |
280  bb.0:
281    liveins: $w0
282    ; CHECK-LABEL: name: test_sitofp_s32_s16
283    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
284    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
285    ; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY1]], 16
286    ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[SEXT_INREG]](s32)
287    ; CHECK: $w0 = COPY [[SITOFP]](s32)
288    %0:_(s32) = COPY $w0
289    %1:_(s16) = G_TRUNC %0
290    %2:_(s32) = G_SITOFP %1
291    $w0 = COPY %2
292...
293
294---
295name:            test_uitofp_s32_s16
296body: |
297  bb.0:
298    liveins: $w0
299    ; CHECK-LABEL: name: test_uitofp_s32_s16
300    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
301    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
302    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
303    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
304    ; CHECK: [[UITOFP:%[0-9]+]]:_(s32) = G_UITOFP [[AND]](s32)
305    ; CHECK: $w0 = COPY [[UITOFP]](s32)
306    %0:_(s32) = COPY $w0
307    %1:_(s16) = G_TRUNC %0
308    %2:_(s32) = G_UITOFP %1
309    $w0 = COPY %2
310...
311