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

--- Comment #4 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:89b3c97eed75c1e7c492bc727e0016003c5809cc

commit r12-2550-g89b3c97eed75c1e7c492bc727e0016003c5809cc
Author: Kewen Lin <li...@linux.ibm.com>
Date:   Tue Jul 27 22:04:22 2021 -0500

    vect: Fix wrong check in vect_recog_mulhs_pattern [PR101596]

    As PR101596 showed, vect_recog_mulhs_pattern uses target_precision to
    check the scale_term is expected or not, it could be wrong when the
    precision of the actual used new_type larger than target_precision as
    shown by the example.

    This patch is to use precision of new_type instead of target_precision
    for the scale_term matching check.

    Bootstrapped & regtested on powerpc64le-linux-gnu P10,
    powerpc64-linux-gnu P8, x86_64-redhat-linux and aarch64-linux-gnu.

    gcc/ChangeLog:

            PR tree-optimization/101596
            * tree-vect-patterns.c (vect_recog_mulhs_pattern): Fix wrong check
            by using new_type's precision instead.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/101596
            * gcc.target/powerpc/pr101596-1.c: New test.
            * gcc.target/powerpc/pr101596-2.c: Likewise.
            * gcc.target/powerpc/pr101596-3.c: Likewise.

Reply via email to