Vector compare greater than (>) is compiled to fcmgt when compiling with clang-15 and flags -O3 -ffast-math -fno-finite-math-only -ffp-contract=off -fno-unsafe-math-optimizations (for example https://godbolt.org/z/9nhPhzc1n). However, clang-16 generates different code sequence as shown below. (for example https://godbolt.org/z/s4ba1xd74)
Vector compare greater than (
>
) is compiled tofcmgt
when compiling with clang-15 and flags-O3 -ffast-math -fno-finite-math-only -ffp-contract=off -fno-unsafe-math-optimizations
(for example https://godbolt.org/z/9nhPhzc1n). However, clang-16 generates different code sequence as shown below. (for example https://godbolt.org/z/s4ba1xd74)This PR uses
vcagtq_f32
to replacevabsq_f32
and>
, to avoid the long code sequence.Test with clang-16: