• 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-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
3---
4name:            f64_faddp
5alignment:       4
6legalized:       true
7tracksRegLiveness: true
8liveins:
9  - { reg: '$q0' }
10body:             |
11  bb.1:
12    liveins: $q0
13
14    ; CHECK-LABEL: name: f64_faddp
15    ; CHECK: liveins: $q0
16    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
17    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
18    ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C]](s64)
19    ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
20    ; CHECK: [[EVEC1:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C1]](s64)
21    ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[EVEC]], [[EVEC1]]
22    ; CHECK: $d0 = COPY [[FADD]](s64)
23    ; CHECK: RET_ReallyLR implicit $d0
24    %0:_(<2 x s64>) = COPY $q0
25    %2:_(<2 x s64>) = G_IMPLICIT_DEF
26    %5:_(s64) = G_CONSTANT i64 0
27    %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
28    %3:_(<2 x s64>) = G_FADD %1, %0
29    %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
30    $d0 = COPY %4(s64)
31    RET_ReallyLR implicit $d0
32
33...
34---
35name:            f64_faddp_commuted
36alignment:       4
37legalized:       true
38tracksRegLiveness: true
39liveins:
40  - { reg: '$q0' }
41body:             |
42  bb.1:
43    liveins: $q0
44
45    ; CHECK-LABEL: name: f64_faddp_commuted
46    ; CHECK: liveins: $q0
47    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
48    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
49    ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C]](s64)
50    ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
51    ; CHECK: [[EVEC1:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[C1]](s64)
52    ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[EVEC]], [[EVEC1]]
53    ; CHECK: $d0 = COPY [[FADD]](s64)
54    ; CHECK: RET_ReallyLR implicit $d0
55    %0:_(<2 x s64>) = COPY $q0
56    %2:_(<2 x s64>) = G_IMPLICIT_DEF
57    %5:_(s64) = G_CONSTANT i64 0
58    %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
59    %3:_(<2 x s64>) = G_FADD %0, %1
60    %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
61    $d0 = COPY %4(s64)
62    RET_ReallyLR implicit $d0
63
64...
65---
66name:            f32_faddp
67alignment:       4
68legalized:       true
69tracksRegLiveness: true
70liveins:
71  - { reg: '$d0' }
72body:             |
73  bb.1:
74    liveins: $d0
75
76    ; CHECK-LABEL: name: f32_faddp
77    ; CHECK: liveins: $d0
78    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
79    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
80    ; CHECK: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C]](s64)
81    ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
82    ; CHECK: [[EVEC1:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C1]](s64)
83    ; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[EVEC]], [[EVEC1]]
84    ; CHECK: $s0 = COPY [[FADD]](s32)
85    ; CHECK: RET_ReallyLR implicit $s0
86    %0:_(<2 x s32>) = COPY $d0
87    %2:_(<2 x s32>) = G_IMPLICIT_DEF
88    %5:_(s64) = G_CONSTANT i64 0
89    %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, undef)
90    %3:_(<2 x s32>) = G_FADD %1, %0
91    %4:_(s32) = G_EXTRACT_VECTOR_ELT %3(<2 x s32>), %5(s64)
92    $s0 = COPY %4(s32)
93    RET_ReallyLR implicit $s0
94
95...
96---
97name:            f32_faddp_commuted
98alignment:       4
99legalized:       true
100tracksRegLiveness: true
101liveins:
102  - { reg: '$d0' }
103body:             |
104  bb.1:
105    liveins: $d0
106
107    ; CHECK-LABEL: name: f32_faddp_commuted
108    ; CHECK: liveins: $d0
109    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
110    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
111    ; CHECK: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C]](s64)
112    ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
113    ; CHECK: [[EVEC1:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[C1]](s64)
114    ; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[EVEC]], [[EVEC1]]
115    ; CHECK: $s0 = COPY [[FADD]](s32)
116    ; CHECK: RET_ReallyLR implicit $s0
117    %0:_(<2 x s32>) = COPY $d0
118    %2:_(<2 x s32>) = G_IMPLICIT_DEF
119    %5:_(s64) = G_CONSTANT i64 0
120    %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, undef)
121    %3:_(<2 x s32>) = G_FADD %0, %1
122    %4:_(s32) = G_EXTRACT_VECTOR_ELT %3(<2 x s32>), %5(s64)
123    $s0 = COPY %4(s32)
124    RET_ReallyLR implicit $s0
125
126...
127---
128name:            wrong_extract_idx
129alignment:       4
130legalized:       true
131tracksRegLiveness: true
132liveins:
133  - { reg: '$q0' }
134body:             |
135  bb.1:
136    liveins: $q0
137
138    ; CHECK-LABEL: name: wrong_extract_idx
139    ; CHECK: liveins: $q0
140    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
141    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
142    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
143    ; CHECK: [[SHUF:%[0-9]+]]:_(<2 x s64>) = G_SHUFFLE_VECTOR [[COPY]](<2 x s64>), [[DEF]], shufflemask(1, undef)
144    ; CHECK: [[FADD:%[0-9]+]]:_(<2 x s64>) = G_FADD [[SHUF]], [[COPY]]
145    ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[FADD]](<2 x s64>), [[C]](s64)
146    ; CHECK: $d0 = COPY [[EVEC]](s64)
147    ; CHECK: RET_ReallyLR implicit $d0
148    %0:_(<2 x s64>) = COPY $q0
149    %2:_(<2 x s64>) = G_IMPLICIT_DEF
150    %5:_(s64) = G_CONSTANT i64 1
151    %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(1, undef)
152    %3:_(<2 x s64>) = G_FADD %1, %0
153    %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
154    $d0 = COPY %4(s64)
155    RET_ReallyLR implicit $d0
156
157...
158---
159name:            wrong_shuffle_mask
160alignment:       4
161legalized:       true
162tracksRegLiveness: true
163liveins:
164  - { reg: '$q0' }
165body:             |
166  bb.1:
167    liveins: $q0
168
169    ; CHECK-LABEL: name: wrong_shuffle_mask
170    ; CHECK: liveins: $q0
171    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
172    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
173    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
174    ; CHECK: [[SHUF:%[0-9]+]]:_(<2 x s64>) = G_SHUFFLE_VECTOR [[COPY]](<2 x s64>), [[DEF]], shufflemask(0, undef)
175    ; CHECK: [[FADD:%[0-9]+]]:_(<2 x s64>) = G_FADD [[SHUF]], [[COPY]]
176    ; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[FADD]](<2 x s64>), [[C]](s64)
177    ; CHECK: $d0 = COPY [[EVEC]](s64)
178    ; CHECK: RET_ReallyLR implicit $d0
179    %0:_(<2 x s64>) = COPY $q0
180    %2:_(<2 x s64>) = G_IMPLICIT_DEF
181    %5:_(s64) = G_CONSTANT i64 0
182    %1:_(<2 x s64>) = G_SHUFFLE_VECTOR %0(<2 x s64>), %2, shufflemask(0, undef)
183    %3:_(<2 x s64>) = G_FADD %1, %0
184    %4:_(s64) = G_EXTRACT_VECTOR_ELT %3(<2 x s64>), %5(s64)
185    $d0 = COPY %4(s64)
186    RET_ReallyLR implicit $d0
187
188...
189