1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 < %s | FileCheck %s
4 ; All tests are doing unordered vector comparisons on vectors larger than a
7 define i1 @unordered_floating_point_compare_on_v8f32(<8 x float> %a_vec) {
8 ; CHECK-LABEL: unordered_floating_point_compare_on_v8f32:
10 ; CHECK-NEXT: fcmgt v1.4s, v1.4s, #0.0
11 ; CHECK-NEXT: fcmgt v0.4s, v0.4s, #0.0
12 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
13 ; CHECK-NEXT: mvn v0.16b, v0.16b
14 ; CHECK-NEXT: xtn v0.8b, v0.8h
15 ; CHECK-NEXT: fcmp d0, #0.0
16 ; CHECK-NEXT: cset w0, eq
18 %a_cmp = fcmp ule <8 x float> %a_vec, zeroinitializer
19 %cmp_result = bitcast <8 x i1> %a_cmp to i8
20 %all_zero = icmp eq i8 %cmp_result, 0
24 define i1 @unordered_floating_point_compare_on_v16f32(<16 x float> %a_vec) {
25 ; CHECK-LABEL: unordered_floating_point_compare_on_v16f32:
27 ; CHECK-NEXT: fcmgt v3.4s, v3.4s, #0.0
28 ; CHECK-NEXT: fcmgt v2.4s, v2.4s, #0.0
29 ; CHECK-NEXT: mov w9, #1 // =0x1
30 ; CHECK-NEXT: fcmgt v1.4s, v1.4s, #0.0
31 ; CHECK-NEXT: fcmgt v0.4s, v0.4s, #0.0
32 ; CHECK-NEXT: uzp1 v2.8h, v2.8h, v3.8h
33 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
34 ; CHECK-NEXT: uzp1 v0.16b, v0.16b, v2.16b
35 ; CHECK-NEXT: mvn v0.16b, v0.16b
36 ; CHECK-NEXT: umaxv b0, v0.16b
37 ; CHECK-NEXT: fmov w8, s0
38 ; CHECK-NEXT: bic w0, w9, w8
40 %a_cmp = fcmp ule <16 x float> %a_vec, zeroinitializer
41 %cmp_result = bitcast <16 x i1> %a_cmp to i16
42 %all_zero = icmp eq i16 %cmp_result, 0
46 define i1 @unordered_floating_point_compare_on_v32f32(<32 x float> %a_vec) {
47 ; CHECK-LABEL: unordered_floating_point_compare_on_v32f32:
49 ; CHECK-NEXT: fcmgt v3.4s, v3.4s, #0.0
50 ; CHECK-NEXT: fcmgt v2.4s, v2.4s, #0.0
51 ; CHECK-NEXT: mov w9, #1 // =0x1
52 ; CHECK-NEXT: fcmgt v1.4s, v1.4s, #0.0
53 ; CHECK-NEXT: fcmgt v0.4s, v0.4s, #0.0
54 ; CHECK-NEXT: fcmgt v7.4s, v7.4s, #0.0
55 ; CHECK-NEXT: fcmgt v6.4s, v6.4s, #0.0
56 ; CHECK-NEXT: fcmgt v5.4s, v5.4s, #0.0
57 ; CHECK-NEXT: fcmgt v4.4s, v4.4s, #0.0
58 ; CHECK-NEXT: uzp1 v2.8h, v2.8h, v3.8h
59 ; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
60 ; CHECK-NEXT: uzp1 v1.8h, v6.8h, v7.8h
61 ; CHECK-NEXT: uzp1 v3.8h, v4.8h, v5.8h
62 ; CHECK-NEXT: uzp1 v0.16b, v0.16b, v2.16b
63 ; CHECK-NEXT: uzp1 v1.16b, v3.16b, v1.16b
64 ; CHECK-NEXT: mvn v0.16b, v0.16b
65 ; CHECK-NEXT: orn v0.16b, v0.16b, v1.16b
66 ; CHECK-NEXT: shl v0.16b, v0.16b, #7
67 ; CHECK-NEXT: cmlt v0.16b, v0.16b, #0
68 ; CHECK-NEXT: umaxv b0, v0.16b
69 ; CHECK-NEXT: fmov w8, s0
70 ; CHECK-NEXT: bic w0, w9, w8
72 %a_cmp = fcmp ule <32 x float> %a_vec, zeroinitializer
73 %cmp_result = bitcast <32 x i1> %a_cmp to i32
74 %all_zero = icmp eq i32 %cmp_result, 0