• 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_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 }
12
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 }
17
18  define void @test_fptosi_s1_s32() { ret void }
19  define void @test_fptoui_s1_s32() { ret void }
20
21  define void @test_fptosi_s8_s64() { ret void }
22  define void @test_fptoui_s8_s64() { ret void }
23
24  define void @test_fptosi_s16_s32() { ret void }
25  define void @test_fptoui_s16_s32() { ret void }
26...
27
28---
29name:            test_fptosi_s32_s32
30body: |
31  bb.0:
32    liveins: $w0
33    ; CHECK-LABEL: name: test_fptosi_s32_s32
34    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
35    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
36    ; CHECK: $w0 = COPY [[FPTOSI]](s32)
37    %0:_(s32) = G_IMPLICIT_DEF
38    %1:_(s32) = G_FPTOSI %0
39    $w0 = COPY %1
40...
41
42---
43name:            test_fptoui_s32_s32
44body: |
45  bb.0:
46    liveins: $w0
47    ; CHECK-LABEL: name: test_fptoui_s32_s32
48    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
49    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[DEF]](s32)
50    ; CHECK: $w0 = COPY [[FPTOUI]](s32)
51    %0:_(s32) = G_IMPLICIT_DEF
52    %1:_(s32) = G_FPTOUI %0
53    $w0 = COPY %1
54...
55
56---
57name:            test_fptosi_s32_s64
58body: |
59  bb.0:
60    liveins: $x0
61    ; CHECK-LABEL: name: test_fptosi_s32_s64
62    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
63    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32)
64    ; CHECK: $w0 = COPY [[FPTOSI]](s32)
65    %0:_(s32) = G_IMPLICIT_DEF
66    %1:_(s32) = G_FPTOSI %0
67    $w0 = COPY %1
68...
69
70---
71name:            test_fptoui_s32_s64
72body: |
73  bb.0:
74    liveins: $x0
75    ; CHECK-LABEL: name: test_fptoui_s32_s64
76    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
77    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
78    ; CHECK: $w0 = COPY [[FPTOUI]](s32)
79    %0:_(s64) = COPY $x0
80    %1:_(s32) = G_FPTOUI %0
81    $w0 = COPY %1
82...
83
84---
85name:            test_fptosi_s64_s32
86body: |
87  bb.0:
88    liveins: $w0
89    ; CHECK-LABEL: name: test_fptosi_s64_s32
90    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
91    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s32)
92    ; CHECK: $x0 = COPY [[FPTOSI]](s64)
93    %0:_(s32) = COPY $w0
94    %1:_(s64) = G_FPTOSI %0
95    $x0 = COPY %1
96...
97
98---
99name:            test_fptoui_s64_s32
100body: |
101  bb.0:
102    liveins: $w0
103    ; CHECK-LABEL: name: test_fptoui_s64_s32
104    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
105    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s32)
106    ; CHECK: $x0 = COPY [[FPTOUI]](s64)
107    %0:_(s32) = COPY $w0
108    %1:_(s64) = G_FPTOUI %0
109    $x0 = COPY %1
110...
111
112---
113name:            test_fptosi_s64_s64
114body: |
115  bb.0:
116    liveins: $x0
117    ; CHECK-LABEL: name: test_fptosi_s64_s64
118    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
119    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s64)
120    ; CHECK: $x0 = COPY [[FPTOSI]](s64)
121    %0:_(s64) = COPY $x0
122    %1:_(s64) = G_FPTOSI %0
123    $x0 = COPY %1
124...
125
126---
127name:            test_fptoui_s64_s64
128body: |
129  bb.0:
130    liveins: $x0
131    ; CHECK-LABEL: name: test_fptoui_s64_s64
132    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
133    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s64)
134    ; CHECK: $x0 = COPY [[FPTOUI]](s64)
135    %0:_(s64) = COPY $x0
136    %1:_(s64) = G_FPTOUI %0
137    $x0 = COPY %1
138...
139
140
141
142---
143name:            test_fptosi_s1_s32
144body: |
145  bb.0:
146    liveins: $w0
147    ; CHECK-LABEL: name: test_fptosi_s1_s32
148    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
149    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
150    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FPTOSI]](s32)
151    ; CHECK: $x0 = COPY [[ANYEXT]](s64)
152    %0:_(s32) = COPY $w0
153    %1:_(s1) = G_FPTOSI %0
154    %2:_(s64) = G_ANYEXT %1
155    $x0 = COPY %2
156...
157
158---
159name:            test_fptoui_s1_s32
160body: |
161  bb.0:
162    liveins: $w0
163    ; CHECK-LABEL: name: test_fptoui_s1_s32
164    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
165    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
166    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
167    ; CHECK: $w0 = COPY [[COPY1]](s32)
168    %0:_(s32) = COPY $w0
169    %1:_(s1) = G_FPTOUI %0
170    %2:_(s32) = G_ANYEXT %1
171    $w0 = COPY %2
172...
173
174---
175name:            test_fptosi_s8_s64
176body: |
177  bb.0:
178    liveins: $x0
179    ; CHECK-LABEL: name: test_fptosi_s8_s64
180    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
181    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
182    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
183    ; CHECK: $w0 = COPY [[COPY1]](s32)
184    %0:_(s64) = COPY $x0
185    %1:_(s8) = G_FPTOSI %0
186    %2:_(s32) = G_ANYEXT %1
187    $w0 = COPY %2
188...
189
190---
191name:            test_fptoui_s8_s64
192body: |
193  bb.0:
194    liveins: $x0
195    ; CHECK-LABEL: name: test_fptoui_s8_s64
196    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
197    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64)
198    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
199    ; CHECK: $w0 = COPY [[COPY1]](s32)
200    %0:_(s64) = COPY $x0
201    %1:_(s8) = G_FPTOUI %0
202    %2:_(s32) = G_ANYEXT %1
203    $w0 = COPY %2
204...
205
206---
207name:            test_fptosi_s16_s32
208body: |
209  bb.0:
210    liveins: $w0
211    ; CHECK-LABEL: name: test_fptosi_s16_s32
212    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
213    ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32)
214    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32)
215    ; CHECK: $w0 = COPY [[COPY1]](s32)
216    %0:_(s32) = COPY $w0
217    %1:_(s16) = G_FPTOSI %0
218    %2:_(s32) = G_ANYEXT %1
219    $w0 = COPY %2
220...
221
222---
223name:            test_fptoui_s16_s32
224body: |
225  bb.0:
226    liveins: $w0
227    ; CHECK-LABEL: name: test_fptoui_s16_s32
228    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
229    ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32)
230    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32)
231    ; CHECK: $w0 = COPY [[COPY1]](s32)
232    %0:_(s32) = COPY $w0
233    %1:_(s16) = G_FPTOUI %0
234    %2:_(s32) = G_ANYEXT %1
235    $w0 = COPY %2
236...
237