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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>:

https://gcc.gnu.org/g:7876cde25cbd2f026a0ae488e5263e72f8e9bfa0

commit r15-1047-g7876cde25cbd2f026a0ae488e5263e72f8e9bfa0
Author: liuhongt <hongtao....@intel.com>
Date:   Fri Apr 19 10:29:34 2024 +0800

    Simplify (AND (ASHIFTRT A imm) mask) to (LSHIFTRT A imm) for vector mode.

    When mask is (1 << (prec - imm) - 1) which is used to clear upper bits
    of A, then it can be simplified to LSHIFTRT.

    i.e Simplify
    (and:v8hi
      (ashifrt:v8hi A 8)
      (const_vector 0xff x8))
    to
    (lshifrt:v8hi A 8)

    gcc/ChangeLog:

            PR target/114428
            * simplify-rtx.cc
            (simplify_context::simplify_binary_operation_1):
            Simplify (AND (ASHIFTRT A imm) mask) to (LSHIFTRT A imm) for
            specific mask.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr114428-1.c: New test.

Reply via email to