simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.28k stars 237 forks source link

re-implement some of the FCVTZS/FCVTMS/FCVTPS/FCVTNS #1150

Open mr-c opened 4 months ago

mr-c commented 4 months ago

Recent Qemu confirms the different behavior that was seen on mac M1 and a Pixel 4a 5g phone versus our previous implementation.

To fix this:

  1. Revert https://github.com/simd-everywhere/simde/commit/339ffe4ca89bf6698cab0c8420fe813a4e293aec
  2. Adjust the test vectors to match the hardware behavior (or that of a recent Qemu version)
  3. Adjust the software implementations of those intrinsics to match the new test vectors

Note that Arm defines Round towards Zero (RZ) mode as

Means that results are rounded to the nearest representable number that is no greater in magnitude than the unrounded result.

mr-c commented 4 months ago

@yyctw Is this something you have time to do?