• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
3
4name:            uitofp_to_zero
5alignment:       4
6tracksRegLiveness: true
7body:             |
8  bb.0:
9    ; CHECK-LABEL: name: uitofp_to_zero
10    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+00
11    ; CHECK: $s0 = COPY [[C]](s32)
12    ; CHECK: RET_ReallyLR implicit $s0
13    %0:_(s32) = G_IMPLICIT_DEF
14    %1:_(s32) = G_UITOFP %0(s32)
15    $s0 = COPY %1(s32)
16    RET_ReallyLR implicit $s0
17
18...
19---
20name:            sitofp_to_zero
21alignment:       4
22tracksRegLiveness: true
23body:             |
24  bb.0:
25    ; CHECK-LABEL: name: sitofp_to_zero
26    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+00
27    ; CHECK: $s0 = COPY [[C]](s32)
28    ; CHECK: RET_ReallyLR implicit $s0
29    %0:_(s32) = G_IMPLICIT_DEF
30    %1:_(s32) = G_SITOFP %0(s32)
31    $s0 = COPY %1(s32)
32    RET_ReallyLR implicit $s0
33
34...
35---
36name:            and_to_zero
37alignment:       4
38tracksRegLiveness: true
39body:             |
40  bb.0:
41    ; CHECK-LABEL: name: and_to_zero
42    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
43    ; CHECK: $w0 = COPY [[C]](s32)
44    ; CHECK: RET_ReallyLR implicit $w0
45    %0:_(s32) = G_CONSTANT i32 10
46    %1:_(s32) = G_IMPLICIT_DEF
47    %2:_(s32) = G_AND %0, %1
48    $w0 = COPY %2(s32)
49    RET_ReallyLR implicit $w0
50
51...
52---
53name:            mul_to_zero
54alignment:       4
55tracksRegLiveness: true
56body:             |
57  bb.0:
58    ; CHECK-LABEL: name: mul_to_zero
59    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
60    ; CHECK: $w0 = COPY [[C]](s32)
61    ; CHECK: RET_ReallyLR implicit $w0
62    %0:_(s32) = G_CONSTANT i32 10
63    %1:_(s32) = G_IMPLICIT_DEF
64    %2:_(s32) = G_MUL %0, %1
65    $w0 = COPY %2(s32)
66    RET_ReallyLR implicit $w0
67
68...
69---
70name:            or_to_negative_one
71alignment:       4
72tracksRegLiveness: true
73body:             |
74  bb.0:
75    ; CHECK-LABEL: name: or_to_negative_one
76    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
77    ; CHECK: $w0 = COPY [[C]](s32)
78    ; CHECK: RET_ReallyLR implicit $w0
79    %0:_(s32) = G_CONSTANT i32 10
80    %1:_(s32) = G_IMPLICIT_DEF
81    %2:_(s32) = G_OR %0, %1
82    $w0 = COPY %2(s32)
83    RET_ReallyLR implicit $w0
84
85...
86---
87name:            xor_to_undef
88alignment:       4
89tracksRegLiveness: true
90body:             |
91  bb.0:
92    ; CHECK-LABEL: name: xor_to_undef
93    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
94    ; CHECK: $w0 = COPY [[DEF]](s32)
95    ; CHECK: RET_ReallyLR implicit $w0
96    %0:_(s32) = G_CONSTANT i32 10
97    %1:_(s32) = G_IMPLICIT_DEF
98    %2:_(s32) = G_XOR %0, %1
99    $w0 = COPY %2(s32)
100    RET_ReallyLR implicit $w0
101
102...
103---
104name:            add_to_undef
105alignment:       4
106tracksRegLiveness: true
107body:             |
108  bb.0:
109    ; CHECK-LABEL: name: add_to_undef
110    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
111    ; CHECK: $w0 = COPY [[DEF]](s32)
112    ; CHECK: RET_ReallyLR implicit $w0
113    %0:_(s32) = G_CONSTANT i32 10
114    %1:_(s32) = G_IMPLICIT_DEF
115    %2:_(s32) = G_ADD %0, %1
116    $w0 = COPY %2(s32)
117    RET_ReallyLR implicit $w0
118
119...
120---
121name:            sub_to_undef
122alignment:       4
123tracksRegLiveness: true
124body:             |
125  bb.0:
126    ; CHECK-LABEL: name: sub_to_undef
127    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
128    ; CHECK: $w0 = COPY [[DEF]](s32)
129    ; CHECK: RET_ReallyLR implicit $w0
130    %0:_(s32) = G_CONSTANT i32 10
131    %1:_(s32) = G_IMPLICIT_DEF
132    %2:_(s32) = G_SUB %0, %1
133    $w0 = COPY %2(s32)
134    RET_ReallyLR implicit $w0
135
136...
137---
138name:            fptoui_to_undef
139alignment:       4
140tracksRegLiveness: true
141body:             |
142  bb.0:
143    ; CHECK-LABEL: name: fptoui_to_undef
144    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
145    ; CHECK: $w0 = COPY [[DEF]](s32)
146    ; CHECK: RET_ReallyLR implicit $w0
147    %0:_(s32) = G_IMPLICIT_DEF
148    %1:_(s32) = G_FPTOUI %0(s32)
149    $w0 = COPY %1(s32)
150    RET_ReallyLR implicit $w0
151
152...
153---
154name:            fptosi_to_undef
155alignment:       4
156tracksRegLiveness: true
157body:             |
158  bb.0:
159    ; CHECK-LABEL: name: fptosi_to_undef
160    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
161    ; CHECK: $w0 = COPY [[DEF]](s32)
162    ; CHECK: RET_ReallyLR implicit $w0
163    %0:_(s32) = G_IMPLICIT_DEF
164    %1:_(s32) = G_FPTOSI %0(s32)
165    $w0 = COPY %1(s32)
166    RET_ReallyLR implicit $w0
167
168...
169---
170name:            shufflevector_undef_ops_to_undef
171alignment:       4
172tracksRegLiveness: true
173body:             |
174  bb.0:
175    ; CHECK-LABEL: name: shufflevector_undef_ops_to_undef
176    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
177    ; CHECK: $d0 = COPY [[DEF]](<2 x s32>)
178    ; CHECK: RET_ReallyLR implicit $d0
179    %1:_(<2 x s32>) = G_IMPLICIT_DEF
180    %2:_(<2 x s32>) = G_IMPLICIT_DEF
181    %0:_(<2 x s32>) = G_SHUFFLE_VECTOR %1(<2 x s32>), %2(<2 x s32>), shufflemask(0, 1)
182    $d0 = COPY %0(<2 x s32>)
183    RET_ReallyLR implicit $d0
184
185...
186---
187name:            shufflevector_undef_mask_to_undef
188alignment:       4
189tracksRegLiveness: true
190body:             |
191  bb.0:
192    liveins: $d0, $d1
193    ; CHECK-LABEL: name: shufflevector_undef_mask_to_undef
194    ; CHECK: liveins: $d0, $d1
195    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
196    ; CHECK: $d0 = COPY [[DEF]](<2 x s32>)
197    ; CHECK: RET_ReallyLR implicit $d0
198    %0:_(<2 x s32>) = COPY $d0
199    %1:_(<2 x s32>) = COPY $d1
200    %2:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(undef, undef)
201    $d0 = COPY %2(<2 x s32>)
202    RET_ReallyLR implicit $d0
203
204...
205---
206name:            shufflevector_not_all_ops_undef
207alignment:       4
208tracksRegLiveness: true
209body:             |
210  bb.0:
211    liveins: $d0
212    ; Show that we don't do the combine when one of the vectors is not a
213    ; G_IMPLICIT_DEF.
214    ;
215    ; CHECK-LABEL: name: shufflevector_not_all_ops_undef
216    ; CHECK: liveins: $d0
217    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
218    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
219    ; CHECK: [[SHUF:%[0-9]+]]:_(<2 x s32>) = G_SHUFFLE_VECTOR [[DEF]](<2 x s32>), [[COPY]], shufflemask(0, 1)
220    ; CHECK: $d0 = COPY [[SHUF]](<2 x s32>)
221    ; CHECK: RET_ReallyLR implicit $d0
222    %1:_(<2 x s32>) = G_IMPLICIT_DEF
223    %2:_(<2 x s32>) = COPY $d0
224    %0:_(<2 x s32>) = G_SHUFFLE_VECTOR %1(<2 x s32>), %2(<2 x s32>), shufflemask(0, 1)
225    $d0 = COPY %0(<2 x s32>)
226    RET_ReallyLR implicit $d0
227