• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
3---
4name:            test_scalar_add_big
5body:             |
6  bb.0.entry:
7    ; CHECK-LABEL: name: test_scalar_add_big
8    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
10    ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
11    ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
12    ; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY]], [[COPY2]]
13    ; CHECK: [[UADDE:%[0-9]+]]:_(s64), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY1]], [[COPY3]], [[UADDO1]]
14    ; CHECK: $x0 = COPY [[UADDO]](s64)
15    ; CHECK: $x1 = COPY [[UADDE]](s64)
16    %0:_(s64) = COPY $x0
17    %1:_(s64) = COPY $x1
18    %2:_(s64) = COPY $x2
19    %3:_(s64) = COPY $x3
20    %4:_(s128) = G_MERGE_VALUES %0(s64), %1(s64)
21    %5:_(s128) = G_MERGE_VALUES %2(s64), %3(s64)
22    %6:_(s128) = G_ADD %4, %5
23    %7:_(s64), %8:_(s64) = G_UNMERGE_VALUES %6(s128)
24    $x0 = COPY %7(s64)
25    $x1 = COPY %8(s64)
26
27...
28---
29name:            test_scalar_add_big_nonpow2
30body:             |
31  bb.0.entry:
32    ; CHECK-LABEL: name: test_scalar_add_big_nonpow2
33    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
34    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
35    ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
36    ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
37    ; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY]], [[COPY1]]
38    ; CHECK: [[UADDE:%[0-9]+]]:_(s64), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY1]], [[COPY2]], [[UADDO1]]
39    ; CHECK: [[UADDE2:%[0-9]+]]:_(s64), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[COPY2]], [[COPY3]], [[UADDE1]]
40    ; CHECK: $x0 = COPY [[UADDO]](s64)
41    ; CHECK: $x1 = COPY [[UADDE]](s64)
42    ; CHECK: $x2 = COPY [[UADDE2]](s64)
43    %0:_(s64) = COPY $x0
44    %1:_(s64) = COPY $x1
45    %2:_(s64) = COPY $x2
46    %3:_(s64) = COPY $x3
47    %4:_(s192) = G_MERGE_VALUES %0(s64), %1(s64), %2(s64)
48    %5:_(s192) = G_MERGE_VALUES %1(s64), %2(s64), %3(s64)
49    %6:_(s192) = G_ADD %4, %5
50    %7:_(s64), %8:_(s64), %9:_(s64) = G_UNMERGE_VALUES %6(s192)
51    $x0 = COPY %7(s64)
52    $x1 = COPY %8(s64)
53    $x2 = COPY %9(s64)
54
55...
56---
57name:            test_scalar_add_small
58body:             |
59  bb.0.entry:
60    ; CHECK-LABEL: name: test_scalar_add_small
61    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
62    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
63    ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
64    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
65    ; CHECK: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[TRUNC]], [[TRUNC1]]
66    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[ADD]](s32)
67    ; CHECK: $x0 = COPY [[ANYEXT]](s64)
68    %0:_(s64) = COPY $x0
69    %1:_(s64) = COPY $x1
70    %2:_(s8) = G_TRUNC %0(s64)
71    %3:_(s8) = G_TRUNC %1(s64)
72    %4:_(s8) = G_ADD %2, %3
73    %5:_(s64) = G_ANYEXT %4(s8)
74    $x0 = COPY %5(s64)
75
76...
77---
78name:            test_vector_add
79body:             |
80  bb.0.entry:
81    ; CHECK-LABEL: name: test_vector_add
82    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
83    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $q1
84    ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $q2
85    ; CHECK: [[COPY3:%[0-9]+]]:_(<2 x s64>) = COPY $q3
86    ; CHECK: [[ADD:%[0-9]+]]:_(<2 x s64>) = G_ADD [[COPY]], [[COPY2]]
87    ; CHECK: [[ADD1:%[0-9]+]]:_(<2 x s64>) = G_ADD [[COPY1]], [[COPY3]]
88    ; CHECK: $q0 = COPY [[ADD]](<2 x s64>)
89    ; CHECK: $q1 = COPY [[ADD1]](<2 x s64>)
90    %0:_(<2 x s64>) = COPY $q0
91    %1:_(<2 x s64>) = COPY $q1
92    %2:_(<2 x s64>) = COPY $q2
93    %3:_(<2 x s64>) = COPY $q3
94    %4:_(<4 x s64>) = G_CONCAT_VECTORS %0, %1
95    %5:_(<4 x s64>) = G_CONCAT_VECTORS %2, %3
96    %6:_(<4 x s64>) = G_ADD %4, %5
97    %7:_(<2 x s64>), %8:_(<2 x s64>) = G_UNMERGE_VALUES %6(<4 x s64>)
98    $q0 = COPY %7(<2 x s64>)
99    $q1 = COPY %8(<2 x s64>)
100
101...
102---
103name:            test_vector_add_nonpow2
104body:             |
105  bb.0.entry:
106    ; CHECK-LABEL: name: test_vector_add_nonpow2
107    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
108    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $q1
109    ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $q2
110    ; CHECK: [[COPY3:%[0-9]+]]:_(<2 x s64>) = COPY $q3
111    ; CHECK: [[ADD:%[0-9]+]]:_(<2 x s64>) = G_ADD [[COPY]], [[COPY1]]
112    ; CHECK: [[ADD1:%[0-9]+]]:_(<2 x s64>) = G_ADD [[COPY1]], [[COPY2]]
113    ; CHECK: [[ADD2:%[0-9]+]]:_(<2 x s64>) = G_ADD [[COPY2]], [[COPY3]]
114    ; CHECK: $q0 = COPY [[ADD]](<2 x s64>)
115    ; CHECK: $q1 = COPY [[ADD1]](<2 x s64>)
116    ; CHECK: $q2 = COPY [[ADD2]](<2 x s64>)
117    %0:_(<2 x s64>) = COPY $q0
118    %1:_(<2 x s64>) = COPY $q1
119    %2:_(<2 x s64>) = COPY $q2
120    %3:_(<2 x s64>) = COPY $q3
121    %4:_(<6 x s64>) = G_CONCAT_VECTORS %0(<2 x s64>), %1(<2 x s64>), %2(<2 x s64>)
122    %5:_(<6 x s64>) = G_CONCAT_VECTORS %1(<2 x s64>), %2(<2 x s64>), %3(<2 x s64>)
123    %6:_(<6 x s64>) = G_ADD %4, %5
124    %7:_(<2 x s64>), %8:_(<2 x s64>), %9:_(<2 x s64>) = G_UNMERGE_VALUES %6(<6 x s64>)
125    $q0 = COPY %7(<2 x s64>)
126    $q1 = COPY %8(<2 x s64>)
127    $q2 = COPY %9(<2 x s64>)
128...
129---
130name:            add_v8i16
131alignment:       4
132tracksRegLiveness: true
133machineFunctionInfo: {}
134body:             |
135  bb.1:
136    liveins: $q0, $q1
137
138    ; CHECK-LABEL: name: add_v8i16
139    ; CHECK: liveins: $q0, $q1
140    ; CHECK: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
141    ; CHECK: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $q1
142    ; CHECK: [[ADD:%[0-9]+]]:_(<8 x s16>) = G_ADD [[COPY]], [[COPY1]]
143    ; CHECK: $q0 = COPY [[ADD]](<8 x s16>)
144    ; CHECK: RET_ReallyLR implicit $q0
145    %0:_(<8 x s16>) = COPY $q0
146    %1:_(<8 x s16>) = COPY $q1
147    %2:_(<8 x s16>) = G_ADD %0, %1
148    $q0 = COPY %2(<8 x s16>)
149    RET_ReallyLR implicit $q0
150
151...
152---
153name:            add_v16i8
154alignment:       4
155tracksRegLiveness: true
156machineFunctionInfo: {}
157body:             |
158  bb.1:
159    liveins: $q0, $q1
160
161    ; CHECK-LABEL: name: add_v16i8
162    ; CHECK: liveins: $q0, $q1
163    ; CHECK: [[COPY:%[0-9]+]]:_(<16 x s8>) = COPY $q0
164    ; CHECK: [[COPY1:%[0-9]+]]:_(<16 x s8>) = COPY $q1
165    ; CHECK: [[ADD:%[0-9]+]]:_(<16 x s8>) = G_ADD [[COPY]], [[COPY1]]
166    ; CHECK: $q0 = COPY [[ADD]](<16 x s8>)
167    ; CHECK: RET_ReallyLR implicit $q0
168    %0:_(<16 x s8>) = COPY $q0
169    %1:_(<16 x s8>) = COPY $q1
170    %2:_(<16 x s8>) = G_ADD %0, %1
171    $q0 = COPY %2(<16 x s8>)
172    RET_ReallyLR implicit $q0
173
174...
175---
176name:            add_v4i16
177alignment:       4
178tracksRegLiveness: true
179machineFunctionInfo: {}
180body:             |
181  bb.1:
182    liveins: $d0, $d1
183
184    ; CHECK-LABEL: name: add_v4i16
185    ; CHECK: liveins: $d0, $d1
186    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
187    ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $d1
188    ; CHECK: [[ADD:%[0-9]+]]:_(<4 x s16>) = G_ADD [[COPY]], [[COPY1]]
189    ; CHECK: $d0 = COPY [[ADD]](<4 x s16>)
190    ; CHECK: RET_ReallyLR implicit $d0
191    %0:_(<4 x s16>) = COPY $d0
192    %1:_(<4 x s16>) = COPY $d1
193    %2:_(<4 x s16>) = G_ADD %0, %1
194    $d0 = COPY %2(<4 x s16>)
195    RET_ReallyLR implicit $d0
196...
197---
198name:            add_v8s8
199tracksRegLiveness: true
200body:             |
201  bb.1:
202    liveins: $d0, $d1
203
204    ; CHECK-LABEL: name: add_v8s8
205    ; CHECK: liveins: $d0, $d1
206    ; CHECK: [[COPY:%[0-9]+]]:_(<8 x s8>) = COPY $d0
207    ; CHECK: [[COPY1:%[0-9]+]]:_(<8 x s8>) = COPY $d1
208    ; CHECK: [[ADD:%[0-9]+]]:_(<8 x s8>) = G_ADD [[COPY]], [[COPY1]]
209    ; CHECK: $d0 = COPY [[ADD]](<8 x s8>)
210    ; CHECK: RET_ReallyLR implicit $d0
211    %0:_(<8 x s8>) = COPY $d0
212    %1:_(<8 x s8>) = COPY $d1
213    %2:_(<8 x s8>) = G_ADD %0, %1
214    $d0 = COPY %2(<8 x s8>)
215    RET_ReallyLR implicit $d0
216...
217