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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by HaoChen Gui <guih...@gcc.gnu.org>:

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

commit r14-4835-gf08ca5903c7a02b450b93143467f70b9fd8e0085
Author: Haochen Gui <guih...@gcc.gnu.org>
Date:   Mon Oct 23 09:14:13 2023 +0800

    Expand: Enable vector mode for by pieces compares

    Vector mode compare instructions are efficient for equality compare on
    rs6000. This patch refactors the codes of by pieces operation to enable
    vector mode for compare.

    gcc/
            PR target/111449
            * expr.cc (can_use_qi_vectors): New function to return true if
            we know how to implement OP using vectors of bytes.
            (qi_vector_mode_supported_p): New function to check if optabs
            exists for the mode and certain by pieces operations.
            (widest_fixed_size_mode_for_size): Replace the second argument
            with the type of by pieces operations.  Call can_use_qi_vectors
            and qi_vector_mode_supported_p to do the check.  Call
            scalar_mode_supported_p to check if the scalar mode is supported.
            (by_pieces_ninsns): Pass the type of by pieces operation to
            widest_fixed_size_mode_for_size.
            (class op_by_pieces_d): Remove m_qi_vector_mode.  Add m_op to
            record the type of by pieces operations.
            (op_by_pieces_d::op_by_pieces_d): Change last argument to the
            type of by pieces operations, initialize m_op with it.  Pass
            m_op to function widest_fixed_size_mode_for_size.
            (op_by_pieces_d::get_usable_mode): Pass m_op to function
            widest_fixed_size_mode_for_size.
            (op_by_pieces_d::smallest_fixed_size_mode_for_size): Call
            can_use_qi_vectors and qi_vector_mode_supported_p to do the
            check.
            (op_by_pieces_d::run): Pass m_op to function
            widest_fixed_size_mode_for_size.
            (move_by_pieces_d::move_by_pieces_d): Set m_op to MOVE_BY_PIECES.
            (store_by_pieces_d::store_by_pieces_d): Set m_op with the op.
            (can_store_by_pieces): Pass the type of by pieces operations to
            widest_fixed_size_mode_for_size.
            (clear_by_pieces): Initialize class store_by_pieces_d with
            CLEAR_BY_PIECES.
            (compare_by_pieces_d::compare_by_pieces_d): Set m_op to
            COMPARE_BY_PIECES.
  • [Bug target/111449] memcmp (p,q... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to