[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / Analysis / CostModel / AArch64 / vector-select.ll
blob4477bfbf577f98063da96a0e252e26aa26ba60dd
1 ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print<cost-model>" 2>&1 -disable-output | FileCheck %s --check-prefixes=COST,COST-NOFP16
2 ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+fullfp16 | FileCheck %s --check-prefixes=COST,COST-FULLFP16
3 ; RUN: llc < %s -mtriple=aarch64--linux-gnu -mattr=+fullfp16 | FileCheck %s --check-prefix=CODE
5 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
7 ; COST-LABEL: v8i8_select_eq
8 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp eq <8 x i8> %a, %b
9 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x i8> %a, <8 x i8> %c
11 ; CODE-LABEL: v8i8_select_eq
12 ; CODE:       bb.0
13 ; CODE-NEXT:    cmeq  v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
14 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
15 ; CODE-NEXT:    ret
17 define <8 x i8> @v8i8_select_eq(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
18   %cmp.1 = icmp eq <8 x i8> %a, %b
19   %s.1 = select <8 x i1> %cmp.1, <8 x i8> %a, <8 x i8> %c
20   ret <8 x i8> %s.1
23 ; COST-LABEL: v16i8_select_sgt
24 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp sgt <16 x i8> %a, %b
25 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <16 x i1> %cmp.1, <16 x i8> %a, <16 x i8> %c
27 ; CODE-LABEL: v16i8_select_sgt
28 ; CODE:       bb.0
29 ; CODE-NEXT:    cmgt  v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
30 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
31 ; CODE-NEXT:    ret
33 define <16 x i8> @v16i8_select_sgt(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
34   %cmp.1 = icmp sgt <16 x i8> %a, %b
35   %s.1 = select <16 x i1> %cmp.1, <16 x i8> %a, <16 x i8> %c
36   ret <16 x i8> %s.1
39 ; COST-LABEL: v4i16_select_ne
40 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp ne <4 x i16> %a, %b
41 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x i16> %a, <4 x i16> %c
43 ; CODE-LABEL: v4i16_select_ne
44 ; CODE:       bb.0
45 ; CODE-NEXT:    cmeq  v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
46 ; CODE-NEXT:    bit   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
47 ; CODE-NEXT:    ret
49 define <4 x i16> @v4i16_select_ne(<4 x i16> %a, <4 x i16> %b, <4 x i16> %c) {
50   %cmp.1 = icmp ne <4 x i16> %a, %b
51   %s.1 = select <4 x i1> %cmp.1, <4 x i16> %a, <4 x i16> %c
52   ret <4 x i16> %s.1
55 ; COST-LABEL: v8i16_select_ugt
56 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp ugt <8 x i16> %a, %b
57 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x i16> %a, <8 x i16> %c
59 ; CODE-LABEL: v8i16_select_ugt
60 ; CODE:       bb.0
61 ; CODE-NEXT:    cmhi  v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
62 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
63 ; CODE-NEXT:    ret
65 define <8 x i16> @v8i16_select_ugt(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
66   %cmp.1 = icmp ugt <8 x i16> %a, %b
67   %s.1 = select <8 x i1> %cmp.1, <8 x i16> %a, <8 x i16> %c
68   ret <8 x i16> %s.1
71 ; COST-LABEL: v2i32_select_ule
72 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp ule <2 x i32> %a, %b
73 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x i32> %a, <2 x i32> %c
75 ; CODE-LABEL: v2i32_select_ule
76 ; CODE:       bb.0
77 ; CODE-NEXT:    cmhs  v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
78 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
79 ; CODE-NEXT:    ret
81 define <2 x i32> @v2i32_select_ule(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c) {
82   %cmp.1 = icmp ule <2 x i32> %a, %b
83   %s.1 = select <2 x i1> %cmp.1, <2 x i32> %a, <2 x i32> %c
84   ret <2 x i32> %s.1
87 ; COST-LABEL: v4i32_select_ult
88 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp ult <4 x i32> %a, %b
89 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x i32> %a, <4 x i32> %c
91 ; CODE-LABEL: v4i32_select_ult
92 ; CODE:       bb.0
93 ; CODE-NEXT:    cmhi  v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
94 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
95 ; CODE-NEXT:    ret
97 define <4 x i32> @v4i32_select_ult(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
98   %cmp.1 = icmp ult <4 x i32> %a, %b
99   %s.1 = select <4 x i1> %cmp.1, <4 x i32> %a, <4 x i32> %c
100   ret <4 x i32> %s.1
103 ; COST-LABEL: v2i64_select_sle
104 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = icmp sle <2 x i64> %a, %b
105 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x i64> %a, <2 x i64> %c
107 ; CODE-LABEL: v2i64_select_sle
108 ; CODE:       bb.0
109 ; CODE-NEXT:    cmge  v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
110 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
111 ; CODE-NEXT:    ret
113 define <2 x i64> @v2i64_select_sle(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
114   %cmp.1 = icmp sle <2 x i64> %a, %b
115   %s.1 = select <2 x i1> %cmp.1, <2 x i64> %a, <2 x i64> %c
116   ret <2 x i64> %s.1
119 ; COST-LABEL: v3i64_select_sle
120 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %cmp.1 = icmp sle <3 x i64> %a, %b
121 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <3 x i1> %cmp.1, <3 x i64> %a, <3 x i64> %c
123 ; CODE-LABEL: v3i64_select_sle
124 ; CODE:       bb.0
125 ; CODE:    mov
126 ; CODE:    mov
127 ; CODE:    mov
128 ; CODE:    ldr
129 ; CODE:    cmge
130 ; CODE:    cmge
131 ; CODE:    bif
132 ; CODE:    bif
133 ; CODE:    ext
134 ; CODE:    ret
136 define <3 x i64> @v3i64_select_sle(<3 x i64> %a, <3 x i64> %b, <3 x i64> %c) {
137   %cmp.1 = icmp sle <3 x i64> %a, %b
138   %s.1 = select <3 x i1> %cmp.1, <3 x i64> %a, <3 x i64> %c
139   ret <3 x i64> %s.1
142 ; COST-LABEL: v2i64_select_no_cmp
143 ; COST-NEXT:  Cost Model: Found an estimated cost of 6 for instruction:   %s.1 = select <2 x i1> %cond, <2 x i64> %a, <2 x i64> %b
145 ; CODE-LABEL: v2i64_select_no_cmp
146 ; CODE:       bb.0
147 ; CODE-NEXT:    ushll   v{{.+}}.2d, v{{.+}}.2s, #0
148 ; CODE-NEXT:    shl v{{.+}}.2d, v{{.+}}.2d, #63
149 ; CODE-NEXT:    cmlt    v{{.+}}.2d, v{{.+}}.2d, #0
150 ; CODE-NEXT:    bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
151 ; CODE-NEXT:    ret
153 define <2 x i64> @v2i64_select_no_cmp(<2 x i64> %a, <2 x i64> %b, <2 x i1> %cond) {
154   %s.1 = select <2 x i1> %cond, <2 x i64> %a, <2 x i64> %b
155   ret <2 x i64> %s.1
158 define <4 x half> @v4f16_select_ogt(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
159 ; COST-LABEL: v4f16_select_ogt
160 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp ogt <4 x half> %a, %b
161 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
162 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp ogt <4 x half> %a, %b
163 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
165 ; CODE-LABEL: v4f16_select_ogt
166 ; CODE:       bb.0
167 ; CODE-NEXT:    fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
168 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
169 ; CODE-NEXT:    ret
171   %cmp.1 = fcmp ogt <4 x half> %a, %b
172   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
173   ret <4 x half> %s.1
176 define <8 x half> @v8f16_select_ogt(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
177 ; COST-LABEL: v8f16_select_ogt
178 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp ogt <8 x half> %a, %b
179 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
180 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp ogt <8 x half> %a, %b
181 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
183 ; CODE-LABEL: v8f16_select_ogt
184 ; CODE:       bb.0
185 ; CODE-NEXT:    fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
186 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
187 ; CODE-NEXT:    ret
189   %cmp.1 = fcmp ogt <8 x half> %a, %b
190   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
191   ret <8 x half> %s.1
194 define <2 x float> @v2f32_select_ogt(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
195 ; COST-LABEL: v2f32_select_ogt
196 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ogt <2 x float> %a, %b
197 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
199 ; CODE-LABEL: v2f32_select_ogt
200 ; CODE:       bb.0
201 ; CODE-NEXT:    fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
202 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
203 ; CODE-NEXT:    ret
205   %cmp.1 = fcmp ogt <2 x float> %a, %b
206   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
207   ret <2 x float> %s.1
210 define <4 x float> @v4f32_select_ogt(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
211 ; COST-LABEL: v4f32_select_ogt
212 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ogt <4 x float> %a, %b
213 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
215 ; CODE-LABEL: v4f32_select_ogt
216 ; CODE:       bb.0
217 ; CODE-NEXT:    fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
218 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
219 ; CODE-NEXT:    ret
221   %cmp.1 = fcmp ogt <4 x float> %a, %b
222   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
223   ret <4 x float> %s.1
226 define <2 x double> @v2f64_select_ogt(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
227 ; COST-LABEL: v2f64_select_ogt
228 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ogt <2 x double> %a, %b
229 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
231 ; CODE-LABEL: v2f64_select_ogt
232 ; CODE:       bb.0
233 ; CODE-NEXT:    fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
234 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
235 ; CODE-NEXT:    ret
237   %cmp.1 = fcmp ogt <2 x double> %a, %b
238   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
239   ret <2 x double> %s.1
242 define <4 x half> @v4f16_select_oge(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
243 ; COST-LABEL: v4f16_select_oge
244 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp oge <4 x half> %a, %b
245 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
246 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp oge <4 x half> %a, %b
247 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
249 ; CODE-LABEL: v4f16_select_oge
250 ; CODE:       bb.0
251 ; CODE-NEXT:    fcmge v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
252 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
253 ; CODE-NEXT:    ret
255   %cmp.1 = fcmp oge <4 x half> %a, %b
256   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
257   ret <4 x half> %s.1
260 define <8 x half> @v8f16_select_oge(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
261 ; COST-LABEL: v8f16_select_oge
262 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp oge <8 x half> %a, %b
263 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
264 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp oge <8 x half> %a, %b
265 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
267 ; CODE-LABEL: v8f16_select_oge
268 ; CODE:       bb.0
269 ; CODE-NEXT:    fcmge v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
270 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
271 ; CODE-NEXT:    ret
273   %cmp.1 = fcmp oge <8 x half> %a, %b
274   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
275   ret <8 x half> %s.1
278 define <2 x float> @v2f32_select_oge(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
279 ; COST-LABEL: v2f32_select_oge
280 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oge <2 x float> %a, %b
281 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
283 ; CODE-LABEL: v2f32_select_oge
284 ; CODE:       bb.0
285 ; CODE-NEXT:    fcmge v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
286 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
287 ; CODE-NEXT:    ret
289   %cmp.1 = fcmp oge <2 x float> %a, %b
290   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
291   ret <2 x float> %s.1
294 define <4 x float> @v4f32_select_oge(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
295 ; COST-LABEL: v4f32_select_oge
296 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oge <4 x float> %a, %b
297 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
299 ; CODE-LABEL: v4f32_select_oge
300 ; CODE:       bb.0
301 ; CODE-NEXT:    fcmge v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
302 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
303 ; CODE-NEXT:    ret
305   %cmp.1 = fcmp oge <4 x float> %a, %b
306   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
307   ret <4 x float> %s.1
310 define <2 x double> @v2f64_select_oge(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
311 ; COST-LABEL: v2f64_select_oge
312 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oge <2 x double> %a, %b
313 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
315 ; CODE-LABEL: v2f64_select_oge
316 ; CODE:       bb.0
317 ; CODE-NEXT:    fcmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
318 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
319 ; CODE-NEXT:    ret
321   %cmp.1 = fcmp oge <2 x double> %a, %b
322   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
323   ret <2 x double> %s.1
326 define <4 x half> @v4f16_select_olt(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
327 ; COST-LABEL: v4f16_select_olt
328 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp olt <4 x half> %a, %b
329 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
330 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp olt <4 x half> %a, %b
331 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
333 ; CODE-LABEL: v4f16_select_olt
334 ; CODE:       bb.0
335 ; CODE-NEXT:    fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
336 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
337 ; CODE-NEXT:    ret
339   %cmp.1 = fcmp olt <4 x half> %a, %b
340   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
341   ret <4 x half> %s.1
344 define <8 x half> @v8f16_select_olt(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
345 ; COST-LABEL: v8f16_select_olt
346 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp olt <8 x half> %a, %b
347 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
348 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp olt <8 x half> %a, %b
349 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
351 ; CODE-LABEL: v8f16_select_olt
352 ; CODE:       bb.0
353 ; CODE-NEXT:    fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
354 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
355 ; CODE-NEXT:    ret
357   %cmp.1 = fcmp olt <8 x half> %a, %b
358   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
359   ret <8 x half> %s.1
362 define <2 x float> @v2f32_select_olt(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
363 ; COST-LABEL: v2f32_select_olt
364 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp olt <2 x float> %a, %b
365 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
367 ; CODE-LABEL: v2f32_select_olt
368 ; CODE:       bb.0
369 ; CODE-NEXT:    fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
370 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
371 ; CODE-NEXT:    ret
373   %cmp.1 = fcmp olt <2 x float> %a, %b
374   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
375   ret <2 x float> %s.1
378 define <4 x float> @v4f32_select_olt(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
379 ; COST-LABEL: v4f32_select_olt
380 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp olt <4 x float> %a, %b
381 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
383 ; CODE-LABEL: v4f32_select_olt
384 ; CODE:       bb.0
385 ; CODE-NEXT:    fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
386 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
387 ; CODE-NEXT:    ret
389   %cmp.1 = fcmp olt <4 x float> %a, %b
390   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
391   ret <4 x float> %s.1
394 define <2 x double> @v2f64_select_olt(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
395 ; COST-LABEL: v2f64_select_olt
396 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp olt <2 x double> %a, %b
397 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
399 ; CODE-LABEL: v2f64_select_olt
400 ; CODE:       bb.0
401 ; CODE-NEXT:    fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
402 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
403 ; CODE-NEXT:    ret
405   %cmp.1 = fcmp olt <2 x double> %a, %b
406   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
407   ret <2 x double> %s.1
410 define <4 x half> @v4f16_select_ole(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
411 ; COST-LABEL: v4f16_select_ole
412 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp ole <4 x half> %a, %b
413 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
414 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp ole <4 x half> %a, %b
415 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
417 ; CODE-LABEL: v4f16_select_ole
418 ; CODE:       bb.0
419 ; CODE-NEXT:    fcmge v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
420 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
421 ; CODE-NEXT:    ret
423   %cmp.1 = fcmp ole <4 x half> %a, %b
424   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
425   ret <4 x half> %s.1
428 define <8 x half> @v8f16_select_ole(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
429 ; COST-LABEL: v8f16_select_ole
430 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp ole <8 x half> %a, %b
431 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
432 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp ole <8 x half> %a, %b
433 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
435 ; CODE-LABEL: v8f16_select_ole
436 ; CODE:       bb.0
437 ; CODE-NEXT:    fcmge v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
438 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
439 ; CODE-NEXT:    ret
441   %cmp.1 = fcmp ole <8 x half> %a, %b
442   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
443   ret <8 x half> %s.1
446 define <2 x float> @v2f32_select_ole(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
447 ; COST-LABEL: v2f32_select_ole
448 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ole <2 x float> %a, %b
449 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
451 ; CODE-LABEL: v2f32_select_ole
452 ; CODE:       bb.0
453 ; CODE-NEXT:    fcmge v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
454 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
455 ; CODE-NEXT:    ret
457   %cmp.1 = fcmp ole <2 x float> %a, %b
458   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
459   ret <2 x float> %s.1
462 define <4 x float> @v4f32_select_ole(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
463 ; COST-LABEL: v4f32_select_ole
464 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ole <4 x float> %a, %b
465 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
467 ; CODE-LABEL: v4f32_select_ole
468 ; CODE:       bb.0
469 ; CODE-NEXT:    fcmge v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
470 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
471 ; CODE-NEXT:    ret
473   %cmp.1 = fcmp ole <4 x float> %a, %b
474   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
475   ret <4 x float> %s.1
478 define <2 x double> @v2f64_select_ole(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
479 ; COST-LABEL: v2f64_select_ole
480 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ole <2 x double> %a, %b
481 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
483 ; CODE-LABEL: v2f64_select_ole
484 ; CODE:       bb.0
485 ; CODE-NEXT:    fcmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
486 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
487 ; CODE-NEXT:    ret
489   %cmp.1 = fcmp ole <2 x double> %a, %b
490   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
491   ret <2 x double> %s.1
494 define <4 x half> @v4f16_select_oeq(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
495 ; COST-LABEL: v4f16_select_oeq
496 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp oeq <4 x half> %a, %b
497 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
498 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp oeq <4 x half> %a, %b
499 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
501 ; CODE-LABEL: v4f16_select_oeq
502 ; CODE:       bb.0
503 ; CODE-NEXT:    fcmeq v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
504 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
505 ; CODE-NEXT:    ret
507   %cmp.1 = fcmp oeq <4 x half> %a, %b
508   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
509   ret <4 x half> %s.1
512 define <8 x half> @v8f16_select_oeq(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
513 ; COST-LABEL: v8f16_select_oeq
514 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp oeq <8 x half> %a, %b
515 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
516 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp oeq <8 x half> %a, %b
517 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
519 ; CODE-LABEL: v8f16_select_oeq
520 ; CODE:       bb.0
521 ; CODE-NEXT:    fcmeq v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
522 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
523 ; CODE-NEXT:    ret
525   %cmp.1 = fcmp oeq <8 x half> %a, %b
526   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
527   ret <8 x half> %s.1
530 define <2 x float> @v2f32_select_oeq(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
531 ; COST-LABEL: v2f32_select_oeq
532 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oeq <2 x float> %a, %b
533 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
535 ; CODE-LABEL: v2f32_select_oeq
536 ; CODE:       bb.0
537 ; CODE-NEXT:    fcmeq v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
538 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
539 ; CODE-NEXT:    ret
541   %cmp.1 = fcmp oeq <2 x float> %a, %b
542   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
543   ret <2 x float> %s.1
546 define <4 x float> @v4f32_select_oeq(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
547 ; COST-LABEL: v4f32_select_oeq
548 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oeq <4 x float> %a, %b
549 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
551 ; CODE-LABEL: v4f32_select_oeq
552 ; CODE:       bb.0
553 ; CODE-NEXT:    fcmeq v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
554 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
555 ; CODE-NEXT:    ret
557   %cmp.1 = fcmp oeq <4 x float> %a, %b
558   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
559   ret <4 x float> %s.1
562 define <2 x double> @v2f64_select_oeq(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
563 ; COST-LABEL: v2f64_select_oeq
564 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp oeq <2 x double> %a, %b
565 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
567 ; CODE-LABEL: v2f64_select_oeq
568 ; CODE:       bb.0
569 ; CODE-NEXT:    fcmeq v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
570 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
571 ; CODE-NEXT:    ret
573   %cmp.1 = fcmp oeq <2 x double> %a, %b
574   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
575   ret <2 x double> %s.1
578 define <4 x half> @v4f16_select_one(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
579 ; COST-LABEL: v4f16_select_one
580 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp one <4 x half> %a, %b
581 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
582 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp one <4 x half> %a, %b
583 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
585 ; CODE-LABEL: v4f16_select_one
586 ; CODE:       bb.0
587 ; CODE-NEXT:    fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
588 ; CODE-NEXT:    fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
589 ; CODE-NEXT:    orr   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
590 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
591 ; CODE-NEXT:    ret
593   %cmp.1 = fcmp one <4 x half> %a, %b
594   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
595   ret <4 x half> %s.1
598 define <8 x half> @v8f16_select_one(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
599 ; COST-LABEL: v8f16_select_one
600 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:  %cmp.1 = fcmp one <8 x half> %a, %b
601 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
602 ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp one <8 x half> %a, %b
603 ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
605 ; CODE-LABEL: v8f16_select_one
606 ; CODE:       bb.0
607 ; CODE-NEXT:    fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
608 ; CODE-NEXT:    fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
609 ; CODE-NEXT:    orr   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
610 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
611 ; CODE-NEXT:    ret
613   %cmp.1 = fcmp one <8 x half> %a, %b
614   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
615   ret <8 x half> %s.1
618 define <2 x float> @v2f32_select_one(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
619 ; COST-LABEL: v2f32_select_one
620 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp one <2 x float> %a, %b
621 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
623 ; CODE-LABEL: v2f32_select_one
624 ; CODE:       bb.0
625 ; CODE-NEXT:    fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
626 ; CODE-NEXT:    fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
627 ; CODE-NEXT:    orr   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
628 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
629 ; CODE-NEXT:    ret
631   %cmp.1 = fcmp one <2 x float> %a, %b
632   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
633   ret <2 x float> %s.1
636 define <4 x float> @v4f32_select_one(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
637 ; COST-LABEL: v4f32_select_one
638 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp one <4 x float> %a, %b
639 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
641 ; CODE-LABEL: v4f32_select_one
642 ; CODE:       bb.0
643 ; CODE-NEXT:    fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
644 ; CODE-NEXT:    fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
645 ; CODE-NEXT:    orr   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
646 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
647 ; CODE-NEXT:    ret
649   %cmp.1 = fcmp one <4 x float> %a, %b
650   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
651   ret <4 x float> %s.1
654 define <2 x double> @v2f64_select_one(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
655 ; COST-LABEL: v2f64_select_one
656 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp one <2 x double> %a, %b
657 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
659 ; CODE-LABEL: v2f64_select_one
660 ; CODE:       bb.0
661 ; CODE-NEXT:    fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
662 ; CODE-NEXT:    fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
663 ; CODE-NEXT:    orr   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
664 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
665 ; CODE-NEXT:    ret
667   %cmp.1 = fcmp one <2 x double> %a, %b
668   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
669   ret <2 x double> %s.1
672 define <4 x half> @v4f16_select_une(<4 x half> %a, <4 x half> %b, <4 x half> %c) {
673 ; COST-LABEL: v4f16_select_une
674 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction:   %cmp.1 = fcmp une <4 x half> %a, %b
675 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
676 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp une <4 x half> %a, %b
677 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
679 ; CODE-LABEL: v4f16_select_une
680 ; CODE:       bb.0
681 ; CODE-NEXT:    fcmeq v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
682 ; CODE-NEXT:    bit   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
683 ; CODE-NEXT:    ret
685   %cmp.1 = fcmp une <4 x half> %a, %b
686   %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c
687   ret <4 x half> %s.1
690 define <8 x half> @v8f16_select_une(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
691 ; COST-LABEL: v8f16_select_une
692 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp une <8 x half> %a, %b
693 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
694 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp une <8 x half> %a, %b
695 ; COST-FULLFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
697 ; CODE-LABEL: v8f16_select_une
698 ; CODE:       bb.0
699 ; CODE-NEXT:    fcmeq v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
700 ; CODE-NEXT:    bit   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
701 ; CODE-NEXT:    ret
703   %cmp.1 = fcmp une <8 x half> %a, %b
704   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
705   ret <8 x half> %s.1
708 define <2 x float> @v2f32_select_une(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
709 ; COST-LABEL: v2f32_select_une
710 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp une <2 x float> %a, %b
711 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
713 ; CODE-LABEL: v2f32_select_une
714 ; CODE:       bb.0
715 ; CODE-NEXT:    fcmeq v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
716 ; CODE-NEXT:    bit   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
717 ; CODE-NEXT:    ret
719   %cmp.1 = fcmp une <2 x float> %a, %b
720   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
721   ret <2 x float> %s.1
724 define <4 x float> @v4f32_select_une(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
725 ; COST-LABEL: v4f32_select_une
726 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp une <4 x float> %a, %b
727 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
729 ; CODE-LABEL: v4f32_select_une
730 ; CODE:       bb.0
731 ; CODE-NEXT:    fcmeq v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
732 ; CODE-NEXT:    bit   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
733 ; CODE-NEXT:    ret
735   %cmp.1 = fcmp une <4 x float> %a, %b
736   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
737   ret <4 x float> %s.1
740 define <2 x double> @v2f64_select_une(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
741 ; COST-LABEL: v2f64_select_une
742 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %cmp.1 = fcmp une <2 x double> %a, %b
743 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:  %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
745 ; CODE-LABEL: v2f64_select_une
746 ; CODE:       bb.0
747 ; CODE-NEXT:    fcmeq v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
748 ; CODE-NEXT:    bit   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
749 ; CODE-NEXT:    ret
751   %cmp.1 = fcmp une <2 x double> %a, %b
752   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
753   ret <2 x double> %s.1
756 define <2 x float> @v2f32_select_ord(<2 x float> %a, <2 x float> %b, <2 x float> %c) {
757 ; COST-LABEL: v2f32_select_ord
758 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ord <2 x float> %a, %b
759 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
761 ; CODE-LABEL: v2f32_select_ord
762 ; CODE:       bb.0
763 ; CODE-NEXT:    fcmge v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
764 ; CODE-NEXT:    fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
765 ; CODE-NEXT:    orr   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
766 ; CODE-NEXT:    bif   v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
767 ; CODE-NEXT:    ret
769   %cmp.1 = fcmp ord <2 x float> %a, %b
770   %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c
771   ret <2 x float> %s.1
774 define <4 x float> @v4f32_select_ord(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
775 ; COST-LABEL: v4f32_select_ord
776 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ord <4 x float> %a, %b
777 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:  %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
779 ; CODE-LABEL: v4f32_select_ord
780 ; CODE:       bb.0
781 ; CODE-NEXT:    fcmge v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
782 ; CODE-NEXT:    fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
783 ; CODE-NEXT:    orr   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
784 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
785 ; CODE-NEXT:    ret
787   %cmp.1 = fcmp ord <4 x float> %a, %b
788   %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c
789   ret <4 x float> %s.1
792 define <2 x double> @v2f64_select_ord(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
793 ; COST-LABEL: v2f64_select_ord
794 ; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %cmp.1 = fcmp ord <2 x double> %a, %b
795 ; COST-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
797 ; CODE-LABEL: v2f64_select_ord
798 ; CODE:       bb.0
799 ; CODE-NEXT:    fcmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
800 ; CODE-NEXT:    fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
801 ; CODE-NEXT:    orr   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
802 ; CODE-NEXT:    bif   v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
803 ; CODE-NEXT:    ret
805   %cmp.1 = fcmp ord <2 x double> %a, %b
806   %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c
807   ret <2 x double> %s.1