Skip to content

Conversation

@TheNumbat
Copy link
Contributor

@TheNumbat TheNumbat commented Jan 7, 2026

  • _mm_min_pd/_mm_max_pd had incorrect NaN behavior. The implementations of the four min/max functions were all slightly different; they now use the same logic. The NaN bug also applied to other architectures.

  • _mm_round_pd wasn't doing half-to-even rounding in _MM_FROUND_TO_NEAREST_INT mode. It now uses the correct NEON intrinsic. This also applied to ppc.

  • _mm_cvtpd_pi32 /_mm_cvtpd_epi32 wasn't doing half-to-even rounding. It now uses the corrected implementation of simde_x_mm_round_pd (moved over from sse4.1.h).

    Technically, the conversions (along with _mm_cvtps_epi32) should use the current rounding mode rather than specifically half-to-even, but it looked like always using half-to-even is intentional.

Adds tests that fail without each of the fixes.

@mr-c mr-c merged commit ac0ce43 into simd-everywhere:master Jan 9, 2026
122 checks passed
@mr-c
Copy link
Collaborator

mr-c commented Jan 9, 2026

Thank you @TheNumbat !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants