public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111449] memcmp (p,q,16) == 0 can be optimized better on ppc64 with vector comparison instructions
Date: Mon, 23 Oct 2023 01:17:38 +0000	[thread overview]
Message-ID: <bug-111449-4-Pgy3bvsjJe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111449-4@http.gcc.gnu.org/bugzilla/>

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 <guihaoc@gcc.gnu.org>:

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

commit r14-4835-gf08ca5903c7a02b450b93143467f70b9fd8e0085
Author: Haochen Gui <guihaoc@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.

  reply	other threads:[~2023-10-23  1:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18  2:37 [Bug target/111449] New: " guihaoc at gcc dot gnu.org
2023-10-23  1:17 ` cvs-commit at gcc dot gnu.org [this message]
2023-10-30  3:03 ` [Bug target/111449] " cvs-commit at gcc dot gnu.org
2023-11-17  9:20 ` cvs-commit at gcc dot gnu.org
2023-11-17  9:25 ` guihaoc at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111449-4-Pgy3bvsjJe@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).