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
13 ; CODE-NEXT: cmeq v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
14 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
29 ; CODE-NEXT: cmgt v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
30 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
45 ; CODE-NEXT: cmeq v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
46 ; CODE-NEXT: bit v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
61 ; CODE-NEXT: cmhi v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
62 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
77 ; CODE-NEXT: cmhs v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
78 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
93 ; CODE-NEXT: cmhi v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
94 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
109 ; CODE-NEXT: cmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
110 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
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
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
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
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
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
167 ; CODE-NEXT: fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
168 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
185 ; CODE-NEXT: fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
186 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
201 ; CODE-NEXT: fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
202 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
217 ; CODE-NEXT: fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
218 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
233 ; CODE-NEXT: fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
234 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
251 ; CODE-NEXT: fcmge v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
252 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
269 ; CODE-NEXT: fcmge v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
270 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
285 ; CODE-NEXT: fcmge v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
286 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
301 ; CODE-NEXT: fcmge v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
302 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
317 ; CODE-NEXT: fcmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
318 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
335 ; CODE-NEXT: fcmgt v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
336 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
353 ; CODE-NEXT: fcmgt v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
354 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
369 ; CODE-NEXT: fcmgt v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
370 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
385 ; CODE-NEXT: fcmgt v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
386 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
401 ; CODE-NEXT: fcmgt v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
402 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
419 ; CODE-NEXT: fcmge v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
420 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
437 ; CODE-NEXT: fcmge v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
438 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
453 ; CODE-NEXT: fcmge v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
454 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
469 ; CODE-NEXT: fcmge v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
470 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
485 ; CODE-NEXT: fcmge v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
486 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
503 ; CODE-NEXT: fcmeq v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
504 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
521 ; CODE-NEXT: fcmeq v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
522 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
537 ; CODE-NEXT: fcmeq v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
538 ; CODE-NEXT: bif v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
553 ; CODE-NEXT: fcmeq v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
554 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
569 ; CODE-NEXT: fcmeq v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
570 ; CODE-NEXT: bif v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
681 ; CODE-NEXT: fcmeq v{{.+}}.4h, v{{.+}}.4h, v{{.+}}.4h
682 ; CODE-NEXT: bit v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
699 ; CODE-NEXT: fcmeq v{{.+}}.8h, v{{.+}}.8h, v{{.+}}.8h
700 ; CODE-NEXT: bit v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
715 ; CODE-NEXT: fcmeq v{{.+}}.2s, v{{.+}}.2s, v{{.+}}.2s
716 ; CODE-NEXT: bit v{{.+}}.8b, v{{.+}}.8b, v{{.+}}.8b
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
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
731 ; CODE-NEXT: fcmeq v{{.+}}.4s, v{{.+}}.4s, v{{.+}}.4s
732 ; CODE-NEXT: bit v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
747 ; CODE-NEXT: fcmeq v{{.+}}.2d, v{{.+}}.2d, v{{.+}}.2d
748 ; CODE-NEXT: bit v{{.+}}.16b, v{{.+}}.16b, v{{.+}}.16b
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
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
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
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
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
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
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
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
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