1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 -mattr=+fullfp16 | FileCheck %s
3 ; RUN: llc < %s -mtriple=aarch64 -mattr=+fullfp16 -global-isel | FileCheck %s
6 define <4 x i32> @gt_v4f32(<4 x float> %a, <4 x float> %b) {
7 ; CHECK-LABEL: gt_v4f32:
8 ; CHECK: // %bb.0: // %entry
9 ; CHECK-NEXT: facgt v0.4s, v0.4s, v1.4s
12 %vabs1.i = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
13 %vabs1.i2 = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %b)
14 %cmp = fcmp ogt <4 x float> %vabs1.i, %vabs1.i2
15 %sext = sext <4 x i1> %cmp to <4 x i32>
19 define <4 x i32> @ge_v4f32(<4 x float> %a, <4 x float> %b) {
20 ; CHECK-LABEL: ge_v4f32:
21 ; CHECK: // %bb.0: // %entry
22 ; CHECK-NEXT: facge v0.4s, v0.4s, v1.4s
25 %vabs1.i = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
26 %vabs1.i2 = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %b)
27 %cmp = fcmp oge <4 x float> %vabs1.i, %vabs1.i2
28 %sext = sext <4 x i1> %cmp to <4 x i32>
32 define <4 x i32> @lt_v4f32(<4 x float> %a, <4 x float> %b) {
33 ; CHECK-LABEL: lt_v4f32:
34 ; CHECK: // %bb.0: // %entry
35 ; CHECK-NEXT: facgt v0.4s, v1.4s, v0.4s
38 %vabs1.i = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
39 %vabs1.i2 = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %b)
40 %cmp = fcmp olt <4 x float> %vabs1.i, %vabs1.i2
41 %sext = sext <4 x i1> %cmp to <4 x i32>
45 define <4 x i32> @le_v4f32(<4 x float> %a, <4 x float> %b) {
46 ; CHECK-LABEL: le_v4f32:
47 ; CHECK: // %bb.0: // %entry
48 ; CHECK-NEXT: facge v0.4s, v1.4s, v0.4s
51 %vabs1.i = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
52 %vabs1.i2 = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %b)
53 %cmp = fcmp ole <4 x float> %vabs1.i, %vabs1.i2
54 %sext = sext <4 x i1> %cmp to <4 x i32>
58 define <2 x i32> @gt_v2f32(<2 x float> %a, <2 x float> %b) {
59 ; CHECK-LABEL: gt_v2f32:
60 ; CHECK: // %bb.0: // %entry
61 ; CHECK-NEXT: facgt v0.2s, v0.2s, v1.2s
64 %vabs1.i = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
65 %vabs1.i2 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %b)
66 %cmp = fcmp ogt <2 x float> %vabs1.i, %vabs1.i2
67 %sext = sext <2 x i1> %cmp to <2 x i32>
71 define <2 x i32> @ge_v2f32(<2 x float> %a, <2 x float> %b) {
72 ; CHECK-LABEL: ge_v2f32:
73 ; CHECK: // %bb.0: // %entry
74 ; CHECK-NEXT: facge v0.2s, v0.2s, v1.2s
77 %vabs1.i = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
78 %vabs1.i2 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %b)
79 %cmp = fcmp oge <2 x float> %vabs1.i, %vabs1.i2
80 %sext = sext <2 x i1> %cmp to <2 x i32>
84 define <4 x i16> @gt_v4f16(<4 x half> %a, <4 x half> %b) {
85 ; CHECK-LABEL: gt_v4f16:
86 ; CHECK: // %bb.0: // %entry
87 ; CHECK-NEXT: facgt v0.4h, v0.4h, v1.4h
90 %vabs1.i = tail call <4 x half> @llvm.fabs.v4f16(<4 x half> %a)
91 %vabs1.i2 = tail call <4 x half> @llvm.fabs.v4f16(<4 x half> %b)
92 %cmp = fcmp ogt <4 x half> %vabs1.i, %vabs1.i2
93 %sext = sext <4 x i1> %cmp to <4 x i16>
97 define <4 x i16> @ge_v4f16(<4 x half> %a, <4 x half> %b) {
98 ; CHECK-LABEL: ge_v4f16:
99 ; CHECK: // %bb.0: // %entry
100 ; CHECK-NEXT: facge v0.4h, v0.4h, v1.4h
103 %vabs1.i = tail call <4 x half> @llvm.fabs.v4f16(<4 x half> %a)
104 %vabs1.i2 = tail call <4 x half> @llvm.fabs.v4f16(<4 x half> %b)
105 %cmp = fcmp oge <4 x half> %vabs1.i, %vabs1.i2
106 %sext = sext <4 x i1> %cmp to <4 x i16>
110 define <8 x i16> @gt_v8f16(<8 x half> %a, <8 x half> %b) {
111 ; CHECK-LABEL: gt_v8f16:
112 ; CHECK: // %bb.0: // %entry
113 ; CHECK-NEXT: facgt v0.8h, v0.8h, v1.8h
116 %vabs1.i = tail call <8 x half> @llvm.fabs.v8f16(<8 x half> %a)
117 %vabs1.i2 = tail call <8 x half> @llvm.fabs.v8f16(<8 x half> %b)
118 %cmp = fcmp ogt <8 x half> %vabs1.i, %vabs1.i2
119 %sext = sext <8 x i1> %cmp to <8 x i16>
123 define <8 x i16> @ge_v8f16(<8 x half> %a, <8 x half> %b) {
124 ; CHECK-LABEL: ge_v8f16:
125 ; CHECK: // %bb.0: // %entry
126 ; CHECK-NEXT: facge v0.8h, v0.8h, v1.8h
129 %vabs1.i = tail call <8 x half> @llvm.fabs.v8f16(<8 x half> %a)
130 %vabs1.i2 = tail call <8 x half> @llvm.fabs.v8f16(<8 x half> %b)
131 %cmp = fcmp oge <8 x half> %vabs1.i, %vabs1.i2
132 %sext = sext <8 x i1> %cmp to <8 x i16>
136 define <2 x i64> @gt_v2f64(<2 x double> %a, <2 x double> %b) {
137 ; CHECK-LABEL: gt_v2f64:
138 ; CHECK: // %bb.0: // %entry
139 ; CHECK-NEXT: facgt v0.2d, v0.2d, v1.2d
142 %vabs1.i = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %a)
143 %vabs1.i2 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %b)
144 %cmp = fcmp ogt <2 x double> %vabs1.i, %vabs1.i2
145 %sext = sext <2 x i1> %cmp to <2 x i64>
149 define <2 x i64> @ge_v2f64(<2 x double> %a, <2 x double> %b) {
150 ; CHECK-LABEL: ge_v2f64:
151 ; CHECK: // %bb.0: // %entry
152 ; CHECK-NEXT: facge v0.2d, v0.2d, v1.2d
155 %vabs1.i = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %a)
156 %vabs1.i2 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %b)
157 %cmp = fcmp oge <2 x double> %vabs1.i, %vabs1.i2
158 %sext = sext <2 x i1> %cmp to <2 x i64>
162 declare <8 x half> @llvm.fabs.v8f16(<8 x half>)
163 declare <4 x half> @llvm.fabs.v4f16(<4 x half>)
164 declare <4 x float> @llvm.fabs.v4f32(<4 x float>)
165 declare <2 x float> @llvm.fabs.v2f32(<2 x float>)
166 declare <2 x double> @llvm.fabs.v2f64(<2 x double>)