1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve \
3 // RUN: -disable-O0-optnone -mvscale-min=4 -mvscale-max=4 \
4 // RUN: -emit-llvm -o - %s | opt -S -passes=sroa | FileCheck %s
6 // REQUIRES: aarch64-registered-target
12 typedef svint8_t fixed_int8_t
__attribute__((arm_sve_vector_bits(N
)));
13 typedef svint16_t fixed_int16_t
__attribute__((arm_sve_vector_bits(N
)));
14 typedef svint32_t fixed_int32_t
__attribute__((arm_sve_vector_bits(N
)));
15 typedef svint64_t fixed_int64_t
__attribute__((arm_sve_vector_bits(N
)));
17 typedef svuint8_t fixed_uint8_t
__attribute__((arm_sve_vector_bits(N
)));
18 typedef svuint16_t fixed_uint16_t
__attribute__((arm_sve_vector_bits(N
)));
19 typedef svuint32_t fixed_uint32_t
__attribute__((arm_sve_vector_bits(N
)));
20 typedef svuint64_t fixed_uint64_t
__attribute__((arm_sve_vector_bits(N
)));
22 typedef svfloat16_t fixed_float16_t
__attribute__((arm_sve_vector_bits(N
)));
23 typedef svfloat32_t fixed_float32_t
__attribute__((arm_sve_vector_bits(N
)));
24 typedef svfloat64_t fixed_float64_t
__attribute__((arm_sve_vector_bits(N
)));
26 typedef svbool_t fixed_bool_t
__attribute__((arm_sve_vector_bits(N
)));
30 // CHECK-LABEL: @eq_bool(
32 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
33 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
34 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
35 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
36 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <8 x i8> [[A]], [[B]]
37 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
38 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
39 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
40 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
42 fixed_bool_t
eq_bool(fixed_bool_t a
, fixed_bool_t b
) {
46 // CHECK-LABEL: @eq_i8(
48 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
49 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
50 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <64 x i8> [[A]], [[B]]
51 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
52 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
53 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
55 fixed_int8_t
eq_i8(fixed_int8_t a
, fixed_int8_t b
) {
59 // CHECK-LABEL: @eq_i16(
61 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
62 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
63 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <32 x i16> [[A]], [[B]]
64 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
65 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
66 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
68 fixed_int16_t
eq_i16(fixed_int16_t a
, fixed_int16_t b
) {
72 // CHECK-LABEL: @eq_i32(
74 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
75 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
76 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <16 x i32> [[A]], [[B]]
77 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
78 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
79 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
81 fixed_int32_t
eq_i32(fixed_int32_t a
, fixed_int32_t b
) {
85 // CHECK-LABEL: @eq_i64(
87 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
88 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
89 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <8 x i64> [[A]], [[B]]
90 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
91 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
92 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
94 fixed_int64_t
eq_i64(fixed_int64_t a
, fixed_int64_t b
) {
98 // CHECK-LABEL: @eq_u8(
100 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
101 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
102 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <64 x i8> [[A]], [[B]]
103 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
104 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
105 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
107 fixed_int8_t
eq_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
111 // CHECK-LABEL: @eq_u16(
112 // CHECK-NEXT: entry:
113 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
114 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
115 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <32 x i16> [[A]], [[B]]
116 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
117 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
118 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
120 fixed_int16_t
eq_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
124 // CHECK-LABEL: @eq_u32(
125 // CHECK-NEXT: entry:
126 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
127 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
128 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <16 x i32> [[A]], [[B]]
129 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
130 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
131 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
133 fixed_int32_t
eq_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
137 // CHECK-LABEL: @eq_u64(
138 // CHECK-NEXT: entry:
139 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
140 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
141 // CHECK-NEXT: [[CMP:%.*]] = icmp eq <8 x i64> [[A]], [[B]]
142 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
143 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
144 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
146 fixed_int64_t
eq_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
150 // CHECK-LABEL: @eq_f16(
151 // CHECK-NEXT: entry:
152 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
153 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
154 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
155 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
156 // CHECK-NEXT: [[CMP:%.*]] = fcmp oeq <32 x float> [[CONV]], [[CONV2]]
157 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
158 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
159 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
160 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
162 fixed_int16_t
eq_f16(fixed_float16_t a
, fixed_float16_t b
) {
166 // CHECK-LABEL: @eq_f32(
167 // CHECK-NEXT: entry:
168 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
169 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
170 // CHECK-NEXT: [[CMP:%.*]] = fcmp oeq <16 x float> [[A]], [[B]]
171 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
172 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
173 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
175 fixed_int32_t
eq_f32(fixed_float32_t a
, fixed_float32_t b
) {
179 // CHECK-LABEL: @eq_f64(
180 // CHECK-NEXT: entry:
181 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
182 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
183 // CHECK-NEXT: [[CMP:%.*]] = fcmp oeq <8 x double> [[A]], [[B]]
184 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
185 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
186 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
188 fixed_int64_t
eq_f64(fixed_float64_t a
, fixed_float64_t b
) {
194 // CHECK-LABEL: @neq_bool(
195 // CHECK-NEXT: entry:
196 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
197 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
198 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
199 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
200 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <8 x i8> [[A]], [[B]]
201 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
202 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
203 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
204 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
206 fixed_bool_t
neq_bool(fixed_bool_t a
, fixed_bool_t b
) {
210 // CHECK-LABEL: @neq_i8(
211 // CHECK-NEXT: entry:
212 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
213 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
214 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <64 x i8> [[A]], [[B]]
215 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
216 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
217 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
219 fixed_int8_t
neq_i8(fixed_int8_t a
, fixed_int8_t b
) {
223 // CHECK-LABEL: @neq_i16(
224 // CHECK-NEXT: entry:
225 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
226 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
227 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <32 x i16> [[A]], [[B]]
228 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
229 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
230 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
232 fixed_int16_t
neq_i16(fixed_int16_t a
, fixed_int16_t b
) {
236 // CHECK-LABEL: @neq_i32(
237 // CHECK-NEXT: entry:
238 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
239 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
240 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <16 x i32> [[A]], [[B]]
241 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
242 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
243 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
245 fixed_int32_t
neq_i32(fixed_int32_t a
, fixed_int32_t b
) {
249 // CHECK-LABEL: @neq_i64(
250 // CHECK-NEXT: entry:
251 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
252 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
253 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <8 x i64> [[A]], [[B]]
254 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
255 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
256 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
258 fixed_int64_t
neq_i64(fixed_int64_t a
, fixed_int64_t b
) {
262 // CHECK-LABEL: @neq_u8(
263 // CHECK-NEXT: entry:
264 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
265 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
266 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <64 x i8> [[A]], [[B]]
267 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
268 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
269 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
271 fixed_int8_t
neq_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
275 // CHECK-LABEL: @neq_u16(
276 // CHECK-NEXT: entry:
277 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
278 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
279 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <32 x i16> [[A]], [[B]]
280 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
281 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
282 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
284 fixed_int16_t
neq_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
288 // CHECK-LABEL: @neq_u32(
289 // CHECK-NEXT: entry:
290 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
291 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
292 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <16 x i32> [[A]], [[B]]
293 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
294 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
295 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
297 fixed_int32_t
neq_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
301 // CHECK-LABEL: @neq_u64(
302 // CHECK-NEXT: entry:
303 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
304 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
305 // CHECK-NEXT: [[CMP:%.*]] = icmp ne <8 x i64> [[A]], [[B]]
306 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
307 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
308 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
310 fixed_int64_t
neq_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
314 // CHECK-LABEL: @neq_f16(
315 // CHECK-NEXT: entry:
316 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
317 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
318 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
319 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
320 // CHECK-NEXT: [[CMP:%.*]] = fcmp une <32 x float> [[CONV]], [[CONV2]]
321 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
322 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
323 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
324 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
326 fixed_int16_t
neq_f16(fixed_float16_t a
, fixed_float16_t b
) {
330 // CHECK-LABEL: @neq_f32(
331 // CHECK-NEXT: entry:
332 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
333 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
334 // CHECK-NEXT: [[CMP:%.*]] = fcmp une <16 x float> [[A]], [[B]]
335 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
336 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
337 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
339 fixed_int32_t
neq_f32(fixed_float32_t a
, fixed_float32_t b
) {
343 // CHECK-LABEL: @neq_f64(
344 // CHECK-NEXT: entry:
345 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
346 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
347 // CHECK-NEXT: [[CMP:%.*]] = fcmp une <8 x double> [[A]], [[B]]
348 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
349 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
350 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
352 fixed_int64_t
neq_f64(fixed_float64_t a
, fixed_float64_t b
) {
358 // CHECK-LABEL: @lt_bool(
359 // CHECK-NEXT: entry:
360 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
361 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
362 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
363 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
364 // CHECK-NEXT: [[CMP:%.*]] = icmp ult <8 x i8> [[A]], [[B]]
365 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
366 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
367 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
368 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
370 fixed_bool_t
lt_bool(fixed_bool_t a
, fixed_bool_t b
) {
374 // CHECK-LABEL: @lt_i8(
375 // CHECK-NEXT: entry:
376 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
377 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
378 // CHECK-NEXT: [[CMP:%.*]] = icmp slt <64 x i8> [[A]], [[B]]
379 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
380 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
381 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
383 fixed_int8_t
lt_i8(fixed_int8_t a
, fixed_int8_t b
) {
387 // CHECK-LABEL: @lt_i16(
388 // CHECK-NEXT: entry:
389 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
390 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
391 // CHECK-NEXT: [[CMP:%.*]] = icmp slt <32 x i16> [[A]], [[B]]
392 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
393 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
394 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
396 fixed_int16_t
lt_i16(fixed_int16_t a
, fixed_int16_t b
) {
400 // CHECK-LABEL: @lt_i32(
401 // CHECK-NEXT: entry:
402 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
403 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
404 // CHECK-NEXT: [[CMP:%.*]] = icmp slt <16 x i32> [[A]], [[B]]
405 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
406 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
407 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
409 fixed_int32_t
lt_i32(fixed_int32_t a
, fixed_int32_t b
) {
413 // CHECK-LABEL: @lt_i64(
414 // CHECK-NEXT: entry:
415 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
416 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
417 // CHECK-NEXT: [[CMP:%.*]] = icmp slt <8 x i64> [[A]], [[B]]
418 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
419 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
420 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
422 fixed_int64_t
lt_i64(fixed_int64_t a
, fixed_int64_t b
) {
426 // CHECK-LABEL: @lt_u8(
427 // CHECK-NEXT: entry:
428 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
429 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
430 // CHECK-NEXT: [[CMP:%.*]] = icmp ult <64 x i8> [[A]], [[B]]
431 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
432 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
433 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
435 fixed_int8_t
lt_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
439 // CHECK-LABEL: @lt_u16(
440 // CHECK-NEXT: entry:
441 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
442 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
443 // CHECK-NEXT: [[CMP:%.*]] = icmp ult <32 x i16> [[A]], [[B]]
444 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
445 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
446 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
448 fixed_int16_t
lt_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
452 // CHECK-LABEL: @lt_u32(
453 // CHECK-NEXT: entry:
454 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
455 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
456 // CHECK-NEXT: [[CMP:%.*]] = icmp ult <16 x i32> [[A]], [[B]]
457 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
458 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
459 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
461 fixed_int32_t
lt_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
465 // CHECK-LABEL: @lt_u64(
466 // CHECK-NEXT: entry:
467 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
468 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
469 // CHECK-NEXT: [[CMP:%.*]] = icmp ult <8 x i64> [[A]], [[B]]
470 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
471 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
472 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
474 fixed_int64_t
lt_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
478 // CHECK-LABEL: @lt_f16(
479 // CHECK-NEXT: entry:
480 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
481 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
482 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
483 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
484 // CHECK-NEXT: [[CMP:%.*]] = fcmp olt <32 x float> [[CONV]], [[CONV2]]
485 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
486 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
487 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
488 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
490 fixed_int16_t
lt_f16(fixed_float16_t a
, fixed_float16_t b
) {
494 // CHECK-LABEL: @lt_f32(
495 // CHECK-NEXT: entry:
496 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
497 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
498 // CHECK-NEXT: [[CMP:%.*]] = fcmp olt <16 x float> [[A]], [[B]]
499 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
500 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
501 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
503 fixed_int32_t
lt_f32(fixed_float32_t a
, fixed_float32_t b
) {
507 // CHECK-LABEL: @lt_f64(
508 // CHECK-NEXT: entry:
509 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
510 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
511 // CHECK-NEXT: [[CMP:%.*]] = fcmp olt <8 x double> [[A]], [[B]]
512 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
513 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
514 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
516 fixed_int64_t
lt_f64(fixed_float64_t a
, fixed_float64_t b
) {
522 // CHECK-LABEL: @leq_bool(
523 // CHECK-NEXT: entry:
524 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
525 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
526 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
527 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
528 // CHECK-NEXT: [[CMP:%.*]] = icmp ule <8 x i8> [[A]], [[B]]
529 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
530 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
531 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
532 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
534 fixed_bool_t
leq_bool(fixed_bool_t a
, fixed_bool_t b
) {
538 // CHECK-LABEL: @leq_i8(
539 // CHECK-NEXT: entry:
540 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
541 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
542 // CHECK-NEXT: [[CMP:%.*]] = icmp sle <64 x i8> [[A]], [[B]]
543 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
544 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
545 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
547 fixed_int8_t
leq_i8(fixed_int8_t a
, fixed_int8_t b
) {
551 // CHECK-LABEL: @leq_i16(
552 // CHECK-NEXT: entry:
553 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
554 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
555 // CHECK-NEXT: [[CMP:%.*]] = icmp sle <32 x i16> [[A]], [[B]]
556 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
557 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
558 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
560 fixed_int16_t
leq_i16(fixed_int16_t a
, fixed_int16_t b
) {
564 // CHECK-LABEL: @leq_i32(
565 // CHECK-NEXT: entry:
566 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
567 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
568 // CHECK-NEXT: [[CMP:%.*]] = icmp sle <16 x i32> [[A]], [[B]]
569 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
570 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
571 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
573 fixed_int32_t
leq_i32(fixed_int32_t a
, fixed_int32_t b
) {
577 // CHECK-LABEL: @leq_i64(
578 // CHECK-NEXT: entry:
579 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
580 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
581 // CHECK-NEXT: [[CMP:%.*]] = icmp sle <8 x i64> [[A]], [[B]]
582 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
583 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
584 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
586 fixed_int64_t
leq_i64(fixed_int64_t a
, fixed_int64_t b
) {
590 // CHECK-LABEL: @leq_u8(
591 // CHECK-NEXT: entry:
592 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
593 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
594 // CHECK-NEXT: [[CMP:%.*]] = icmp ule <64 x i8> [[A]], [[B]]
595 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
596 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
597 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
599 fixed_int8_t
leq_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
603 // CHECK-LABEL: @leq_u16(
604 // CHECK-NEXT: entry:
605 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
606 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
607 // CHECK-NEXT: [[CMP:%.*]] = icmp ule <32 x i16> [[A]], [[B]]
608 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
609 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
610 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
612 fixed_int16_t
leq_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
616 // CHECK-LABEL: @leq_u32(
617 // CHECK-NEXT: entry:
618 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
619 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
620 // CHECK-NEXT: [[CMP:%.*]] = icmp ule <16 x i32> [[A]], [[B]]
621 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
622 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
623 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
625 fixed_int32_t
leq_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
629 // CHECK-LABEL: @leq_u64(
630 // CHECK-NEXT: entry:
631 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
632 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
633 // CHECK-NEXT: [[CMP:%.*]] = icmp ule <8 x i64> [[A]], [[B]]
634 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
635 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
636 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
638 fixed_int64_t
leq_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
642 // CHECK-LABEL: @leq_f16(
643 // CHECK-NEXT: entry:
644 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
645 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
646 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
647 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
648 // CHECK-NEXT: [[CMP:%.*]] = fcmp ole <32 x float> [[CONV]], [[CONV2]]
649 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
650 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
651 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
652 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
654 fixed_int16_t
leq_f16(fixed_float16_t a
, fixed_float16_t b
) {
658 // CHECK-LABEL: @leq_f32(
659 // CHECK-NEXT: entry:
660 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
661 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
662 // CHECK-NEXT: [[CMP:%.*]] = fcmp ole <16 x float> [[A]], [[B]]
663 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
664 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
665 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
667 fixed_int32_t
leq_f32(fixed_float32_t a
, fixed_float32_t b
) {
671 // CHECK-LABEL: @leq_f64(
672 // CHECK-NEXT: entry:
673 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
674 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
675 // CHECK-NEXT: [[CMP:%.*]] = fcmp ole <8 x double> [[A]], [[B]]
676 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
677 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
678 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
680 fixed_int64_t
leq_f64(fixed_float64_t a
, fixed_float64_t b
) {
686 // CHECK-LABEL: @gt_bool(
687 // CHECK-NEXT: entry:
688 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
689 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
690 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
691 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
692 // CHECK-NEXT: [[CMP:%.*]] = icmp ugt <8 x i8> [[A]], [[B]]
693 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
694 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
695 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
696 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
698 fixed_bool_t
gt_bool(fixed_bool_t a
, fixed_bool_t b
) {
702 // CHECK-LABEL: @gt_i8(
703 // CHECK-NEXT: entry:
704 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
705 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
706 // CHECK-NEXT: [[CMP:%.*]] = icmp sgt <64 x i8> [[A]], [[B]]
707 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
708 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
709 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
711 fixed_int8_t
gt_i8(fixed_int8_t a
, fixed_int8_t b
) {
715 // CHECK-LABEL: @gt_i16(
716 // CHECK-NEXT: entry:
717 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
718 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
719 // CHECK-NEXT: [[CMP:%.*]] = icmp sgt <32 x i16> [[A]], [[B]]
720 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
721 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
722 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
724 fixed_int16_t
gt_i16(fixed_int16_t a
, fixed_int16_t b
) {
728 // CHECK-LABEL: @gt_i32(
729 // CHECK-NEXT: entry:
730 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
731 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
732 // CHECK-NEXT: [[CMP:%.*]] = icmp sgt <16 x i32> [[A]], [[B]]
733 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
734 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
735 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
737 fixed_int32_t
gt_i32(fixed_int32_t a
, fixed_int32_t b
) {
741 // CHECK-LABEL: @gt_i64(
742 // CHECK-NEXT: entry:
743 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
744 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
745 // CHECK-NEXT: [[CMP:%.*]] = icmp sgt <8 x i64> [[A]], [[B]]
746 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
747 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
748 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
750 fixed_int64_t
gt_i64(fixed_int64_t a
, fixed_int64_t b
) {
754 // CHECK-LABEL: @gt_u8(
755 // CHECK-NEXT: entry:
756 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
757 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
758 // CHECK-NEXT: [[CMP:%.*]] = icmp ugt <64 x i8> [[A]], [[B]]
759 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
760 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
761 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
763 fixed_int8_t
gt_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
767 // CHECK-LABEL: @gt_u16(
768 // CHECK-NEXT: entry:
769 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
770 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
771 // CHECK-NEXT: [[CMP:%.*]] = icmp ugt <32 x i16> [[A]], [[B]]
772 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
773 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
774 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
776 fixed_int16_t
gt_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
780 // CHECK-LABEL: @gt_u32(
781 // CHECK-NEXT: entry:
782 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
783 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
784 // CHECK-NEXT: [[CMP:%.*]] = icmp ugt <16 x i32> [[A]], [[B]]
785 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
786 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
787 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
789 fixed_int32_t
gt_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
793 // CHECK-LABEL: @gt_u64(
794 // CHECK-NEXT: entry:
795 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
796 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
797 // CHECK-NEXT: [[CMP:%.*]] = icmp ugt <8 x i64> [[A]], [[B]]
798 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
799 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
800 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
802 fixed_int64_t
gt_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
806 // CHECK-LABEL: @gt_f16(
807 // CHECK-NEXT: entry:
808 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
809 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
810 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
811 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
812 // CHECK-NEXT: [[CMP:%.*]] = fcmp ogt <32 x float> [[CONV]], [[CONV2]]
813 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
814 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
815 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
816 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
818 fixed_int16_t
gt_f16(fixed_float16_t a
, fixed_float16_t b
) {
822 // CHECK-LABEL: @gt_f32(
823 // CHECK-NEXT: entry:
824 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
825 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
826 // CHECK-NEXT: [[CMP:%.*]] = fcmp ogt <16 x float> [[A]], [[B]]
827 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
828 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
829 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
831 fixed_int32_t
gt_f32(fixed_float32_t a
, fixed_float32_t b
) {
835 // CHECK-LABEL: @gt_f64(
836 // CHECK-NEXT: entry:
837 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
838 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
839 // CHECK-NEXT: [[CMP:%.*]] = fcmp ogt <8 x double> [[A]], [[B]]
840 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
841 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
842 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
844 fixed_int64_t
gt_f64(fixed_float64_t a
, fixed_float64_t b
) {
850 // CHECK-LABEL: @geq_bool(
851 // CHECK-NEXT: entry:
852 // CHECK-NEXT: [[A_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP0:%.*]] to <vscale x 2 x i8>
853 // CHECK-NEXT: [[A:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[A_COERCE]], i64 0)
854 // CHECK-NEXT: [[B_COERCE:%.*]] = bitcast <vscale x 16 x i1> [[TMP1:%.*]] to <vscale x 2 x i8>
855 // CHECK-NEXT: [[B:%.*]] = call <8 x i8> @llvm.vector.extract.v8i8.nxv2i8(<vscale x 2 x i8> [[B_COERCE]], i64 0)
856 // CHECK-NEXT: [[CMP:%.*]] = icmp uge <8 x i8> [[A]], [[B]]
857 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i8>
858 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i8> @llvm.vector.insert.nxv2i8.v8i8(<vscale x 2 x i8> undef, <8 x i8> [[SEXT]], i64 0)
859 // CHECK-NEXT: [[TMP2:%.*]] = bitcast <vscale x 2 x i8> [[CASTSCALABLESVE]] to <vscale x 16 x i1>
860 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
862 fixed_bool_t
geq_bool(fixed_bool_t a
, fixed_bool_t b
) {
866 // CHECK-LABEL: @geq_i8(
867 // CHECK-NEXT: entry:
868 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
869 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
870 // CHECK-NEXT: [[CMP:%.*]] = icmp sge <64 x i8> [[A]], [[B]]
871 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
872 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
873 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
875 fixed_int8_t
geq_i8(fixed_int8_t a
, fixed_int8_t b
) {
879 // CHECK-LABEL: @geq_i16(
880 // CHECK-NEXT: entry:
881 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
882 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
883 // CHECK-NEXT: [[CMP:%.*]] = icmp sge <32 x i16> [[A]], [[B]]
884 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
885 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
886 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
888 fixed_int16_t
geq_i16(fixed_int16_t a
, fixed_int16_t b
) {
892 // CHECK-LABEL: @geq_i32(
893 // CHECK-NEXT: entry:
894 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
895 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
896 // CHECK-NEXT: [[CMP:%.*]] = icmp sge <16 x i32> [[A]], [[B]]
897 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
898 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
899 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
901 fixed_int32_t
geq_i32(fixed_int32_t a
, fixed_int32_t b
) {
905 // CHECK-LABEL: @geq_i64(
906 // CHECK-NEXT: entry:
907 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
908 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
909 // CHECK-NEXT: [[CMP:%.*]] = icmp sge <8 x i64> [[A]], [[B]]
910 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
911 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
912 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
914 fixed_int64_t
geq_i64(fixed_int64_t a
, fixed_int64_t b
) {
918 // CHECK-LABEL: @geq_u8(
919 // CHECK-NEXT: entry:
920 // CHECK-NEXT: [[A:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[A_COERCE:%.*]], i64 0)
921 // CHECK-NEXT: [[B:%.*]] = call <64 x i8> @llvm.vector.extract.v64i8.nxv16i8(<vscale x 16 x i8> [[B_COERCE:%.*]], i64 0)
922 // CHECK-NEXT: [[CMP:%.*]] = icmp uge <64 x i8> [[A]], [[B]]
923 // CHECK-NEXT: [[SEXT:%.*]] = sext <64 x i1> [[CMP]] to <64 x i8>
924 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v64i8(<vscale x 16 x i8> undef, <64 x i8> [[SEXT]], i64 0)
925 // CHECK-NEXT: ret <vscale x 16 x i8> [[CASTSCALABLESVE]]
927 fixed_int8_t
geq_u8(fixed_uint8_t a
, fixed_uint8_t b
) {
931 // CHECK-LABEL: @geq_u16(
932 // CHECK-NEXT: entry:
933 // CHECK-NEXT: [[A:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[A_COERCE:%.*]], i64 0)
934 // CHECK-NEXT: [[B:%.*]] = call <32 x i16> @llvm.vector.extract.v32i16.nxv8i16(<vscale x 8 x i16> [[B_COERCE:%.*]], i64 0)
935 // CHECK-NEXT: [[CMP:%.*]] = icmp uge <32 x i16> [[A]], [[B]]
936 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i16>
937 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[SEXT]], i64 0)
938 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
940 fixed_int16_t
geq_u16(fixed_uint16_t a
, fixed_uint16_t b
) {
944 // CHECK-LABEL: @geq_u32(
945 // CHECK-NEXT: entry:
946 // CHECK-NEXT: [[A:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[A_COERCE:%.*]], i64 0)
947 // CHECK-NEXT: [[B:%.*]] = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> [[B_COERCE:%.*]], i64 0)
948 // CHECK-NEXT: [[CMP:%.*]] = icmp uge <16 x i32> [[A]], [[B]]
949 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
950 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
951 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
953 fixed_int32_t
geq_u32(fixed_uint32_t a
, fixed_uint32_t b
) {
957 // CHECK-LABEL: @geq_u64(
958 // CHECK-NEXT: entry:
959 // CHECK-NEXT: [[A:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[A_COERCE:%.*]], i64 0)
960 // CHECK-NEXT: [[B:%.*]] = call <8 x i64> @llvm.vector.extract.v8i64.nxv2i64(<vscale x 2 x i64> [[B_COERCE:%.*]], i64 0)
961 // CHECK-NEXT: [[CMP:%.*]] = icmp uge <8 x i64> [[A]], [[B]]
962 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
963 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
964 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
966 fixed_int64_t
geq_u64(fixed_uint64_t a
, fixed_uint64_t b
) {
970 // CHECK-LABEL: @geq_f16(
971 // CHECK-NEXT: entry:
972 // CHECK-NEXT: [[A:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[A_COERCE:%.*]], i64 0)
973 // CHECK-NEXT: [[B:%.*]] = call <32 x half> @llvm.vector.extract.v32f16.nxv8f16(<vscale x 8 x half> [[B_COERCE:%.*]], i64 0)
974 // CHECK-NEXT: [[CONV:%.*]] = fpext <32 x half> [[A]] to <32 x float>
975 // CHECK-NEXT: [[CONV2:%.*]] = fpext <32 x half> [[B]] to <32 x float>
976 // CHECK-NEXT: [[CMP:%.*]] = fcmp oge <32 x float> [[CONV]], [[CONV2]]
977 // CHECK-NEXT: [[SEXT:%.*]] = sext <32 x i1> [[CMP]] to <32 x i32>
978 // CHECK-NEXT: [[CONV3:%.*]] = trunc <32 x i32> [[SEXT]] to <32 x i16>
979 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 8 x i16> @llvm.vector.insert.nxv8i16.v32i16(<vscale x 8 x i16> undef, <32 x i16> [[CONV3]], i64 0)
980 // CHECK-NEXT: ret <vscale x 8 x i16> [[CASTSCALABLESVE]]
982 fixed_int16_t
geq_f16(fixed_float16_t a
, fixed_float16_t b
) {
986 // CHECK-LABEL: @geq_f32(
987 // CHECK-NEXT: entry:
988 // CHECK-NEXT: [[A:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[A_COERCE:%.*]], i64 0)
989 // CHECK-NEXT: [[B:%.*]] = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> [[B_COERCE:%.*]], i64 0)
990 // CHECK-NEXT: [[CMP:%.*]] = fcmp oge <16 x float> [[A]], [[B]]
991 // CHECK-NEXT: [[SEXT:%.*]] = sext <16 x i1> [[CMP]] to <16 x i32>
992 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> undef, <16 x i32> [[SEXT]], i64 0)
993 // CHECK-NEXT: ret <vscale x 4 x i32> [[CASTSCALABLESVE]]
995 fixed_int32_t
geq_f32(fixed_float32_t a
, fixed_float32_t b
) {
999 // CHECK-LABEL: @geq_f64(
1000 // CHECK-NEXT: entry:
1001 // CHECK-NEXT: [[A:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[A_COERCE:%.*]], i64 0)
1002 // CHECK-NEXT: [[B:%.*]] = call <8 x double> @llvm.vector.extract.v8f64.nxv2f64(<vscale x 2 x double> [[B_COERCE:%.*]], i64 0)
1003 // CHECK-NEXT: [[CMP:%.*]] = fcmp oge <8 x double> [[A]], [[B]]
1004 // CHECK-NEXT: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i64>
1005 // CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = call <vscale x 2 x i64> @llvm.vector.insert.nxv2i64.v8i64(<vscale x 2 x i64> undef, <8 x i64> [[SEXT]], i64 0)
1006 // CHECK-NEXT: ret <vscale x 2 x i64> [[CASTSCALABLESVE]]
1008 fixed_int64_t
geq_f64(fixed_float64_t a
, fixed_float64_t b
) {