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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Kewen Lin <li...@gcc.gnu.org>:

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

commit r12-9405-gd39451523912981e897faa7942a2634c058524fb
Author: Kewen Lin <li...@linux.ibm.com>
Date:   Mon Apr 3 21:47:54 2023 -0500

    rs6000: Fix vector_set_var_p9 by considering BE [PR108807]

    As PR108807 exposes, the current handling in function
    rs6000_expand_vector_set_var_p9 doesn't take care of big
    endianness.  Currently the function is to rotate the
    target vector by moving element to-be-set to element 0,
    set element 0 with the given val, then rotate back.  To
    get the permutation control vector for the rotation, it
    makes use of lvsr and lvsl, but the element ordering is
    different for BE and LE (like element 0 is the most
    significant one on BE while the least significant one on
    LE), this patch is to add consideration for BE and make
    sure permutation control vectors for rotations are expected.

    As tested, it helped to fix the below failures:

    FAIL: gcc.target/powerpc/pr79251-run.p9.c execution test
    FAIL: gcc.target/powerpc/pr89765-mc.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test
    FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test
            PR target/108807

    gcc/ChangeLog:

            * config/rs6000/rs6000.cc (rs6000_expand_vector_set_var_p9): Fix
gen
            function for permutation control vector by considering big
endianness.

    (cherry picked from commit d634e6088f139ee700d79ec73b1ad6436096a6ff)

Reply via email to