https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127274

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by jeevitha <[email protected]>:

https://gcc.gnu.org/g:b51e191dfdb9ae0bb98e7926498cc103670ff928

commit r17-5812-gb51e191dfdb9ae0bb98e7926498cc103670ff928
Author: Jeevitha <[email protected]>
Date:   Mon Nov 2 06:01:10 2026 -0500

    rs6000: Fix _mm_movemask intrinsics on Power10BE [PR127274]

    The Power10 implementation of the SSE movemask intrinsics uses
    vec_extractm(). On big-endian PowerPC, the vector element order
    causes vec_extractm() to produce the mask bits in a different
    order than required by the SSE movemask intrinsics.

    Reverse the vector element order with vec_reve() on big-endian Power10
    before calling vec_extractm(). This ensures that _mm_movemask_pd(),
    _mm_movemask_ps(), and _mm_movemask_epi8() produce the same results on
    both big and little endian targets.

    2026-11-02  Jeevitha Palanisamy  <[email protected]>

    gcc/
            PR target/127274
            * config/rs6000/emmintrin.h (_mm_movemask_pd): Reverse vector
            element order on big-endian Power10 before calling vec_extractm().
            (_mm_movemask_epi8): Likewise.
            * config/rs6000/xmmintrin.h (_mm_movemask_ps): Likewise.

Reply via email to