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

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

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

commit r13-6870-gf33fc0775706e4db80d584c477608e28f4da0a6f
Author: Kewen Lin <li...@linux.ibm.com>
Date:   Sun Mar 26 21:42:23 2023 -0500

    rs6000: Ensure vec_sld shift count in allowable range [PR109082]

    As PR109082 shows, some uses of vec_sld in emmintrin.h don't
    strictly guarantee the given shift count is in the range
    0-15 (inclusive).  This patch is to make the argument
    range constraint honored for those uses.

            PR target/109082

    gcc/ChangeLog:

            * config/rs6000/emmintrin.h (_mm_bslli_si128): Check __N is not
less
            than zero when calling vec_sld.
            (_mm_bsrli_si128): Return __A if __N is zero, check __N is bigger
than
            zero when calling vec_sld.
            (_mm_slli_si128): Return __A if _imm5 is zero, check _imm5 is
bigger
            than zero when calling vec_sld.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr109082.c: New test.

Reply via email to