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 middle-end/90773] Improve piecewise operation
Date: Fri, 30 Jul 2021 17:35:56 +0000	[thread overview]
Message-ID: <bug-90773-4-hvJdA3wako@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-90773-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

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

commit r12-2633-ge5e164effa30fd2b5c5bc3e6883d63889e96d8da
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Mar 6 06:38:21 2016 -0800

    Add QI vector mode support to by-pieces for memset

    1. Replace scalar_int_mode with fixed_size_mode in the by-pieces
    infrastructure to allow non-integer mode.
    2. Rename widest_int_mode_for_size to widest_fixed_size_mode_for_size
    to return QI vector mode for memset.
    3. Add op_by_pieces_d::smallest_fixed_size_mode_for_size to return the
    smallest integer or QI vector mode.
    4. Remove clear_by_pieces_1 and use builtin_memset_read_str in
    clear_by_pieces to support vector mode broadcast.
    5. Add lowpart_subreg_regno, a wrapper around simplify_subreg_regno that
    uses subreg_lowpart_offset (mode, prev_mode) as the offset.
    6. Add TARGET_GEN_MEMSET_SCRATCH_RTX to allow the backend to use a hard
    scratch register to avoid stack realignment when expanding memset.

    gcc/

            PR middle-end/90773
            * builtins.c (builtin_memcpy_read_str): Change the mode argument
            from scalar_int_mode to fixed_size_mode.
            (builtin_strncpy_read_str): Likewise.
            (gen_memset_value_from_prev): New function.
            (builtin_memset_read_str): Change the mode argument from
            scalar_int_mode to fixed_size_mode.  Use gen_memset_value_from_prev
            and support CONST_VECTOR.
            (builtin_memset_gen_str): Likewise.
            (try_store_by_multiple_pieces): Use by_pieces_constfn to declare
            constfun.
            * builtins.h (builtin_strncpy_read_str): Replace scalar_int_mode
            with fixed_size_mode.
            (builtin_memset_read_str): Likewise.
            * expr.c (widest_int_mode_for_size): Renamed to ...
            (widest_fixed_size_mode_for_size): Add a bool argument to
            indicate if QI vector mode can be used.
            (by_pieces_ninsns): Call widest_fixed_size_mode_for_size
            instead of widest_int_mode_for_size.
            (pieces_addr::adjust): Change the mode argument from
            scalar_int_mode to fixed_size_mode.
            (op_by_pieces_d): Make m_len read-only.  Add a bool member,
            m_qi_vector_mode, to indicate that QI vector mode can be used.
            (op_by_pieces_d::op_by_pieces_d): Add a bool argument to
            initialize m_qi_vector_mode.  Call widest_fixed_size_mode_for_size
            instead of widest_int_mode_for_size.
            (op_by_pieces_d::get_usable_mode): Change the mode argument from
            scalar_int_mode to fixed_size_mode.  Call
            widest_fixed_size_mode_for_size instead of
            widest_int_mode_for_size.
            (op_by_pieces_d::smallest_fixed_size_mode_for_size): New member
            function to return the smallest integer or QI vector mode.
            (op_by_pieces_d::run): Call widest_fixed_size_mode_for_size
            instead of widest_int_mode_for_size.  Call
            smallest_fixed_size_mode_for_size instead of
            smallest_int_mode_for_size.
            (store_by_pieces_d::store_by_pieces_d): Add a bool argument to
            indicate that QI vector mode can be used and pass it to
            op_by_pieces_d::op_by_pieces_d.
            (can_store_by_pieces): Call widest_fixed_size_mode_for_size
            instead of widest_int_mode_for_size.  Pass memsetp to
            widest_fixed_size_mode_for_size to support QI vector mode.
            Allow all CONST_VECTORs for memset if vec_duplicate is supported.
            (store_by_pieces): Pass memsetp to
            store_by_pieces_d::store_by_pieces_d.
            (clear_by_pieces_1): Removed.
            (clear_by_pieces): Replace clear_by_pieces_1 with
            builtin_memset_read_str and pass true to store_by_pieces_d to
            support vector mode broadcast.
            (string_cst_read_str): Change the mode argument from
            scalar_int_mode to fixed_size_mode.
            * expr.h (by_pieces_constfn): Change scalar_int_mode to
            fixed_size_mode.
            (by_pieces_prev): Likewise.
            * rtl.h (lowpart_subreg_regno): New.
            * rtlanal.c (lowpart_subreg_regno): New.  A wrapper around
            simplify_subreg_regno.
            * target.def (gen_memset_scratch_rtx): New hook.
            * doc/tm.texi.in: Add TARGET_GEN_MEMSET_SCRATCH_RTX.
            * doc/tm.texi: Regenerated.

    gcc/testsuite/

            * gcc.target/i386/pr100865-3.c: Expect vmovdqu8 instead of
            vmovdqu.
            * gcc.target/i386/pr100865-4b.c: Likewise.

  parent reply	other threads:[~2021-07-30 17:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-90773-4@http.gcc.gnu.org/bugzilla/>
2021-04-27 15:23 ` cvs-commit at gcc dot gnu.org
2021-04-29 11:45 ` cvs-commit at gcc dot gnu.org
2021-04-30 11:35 ` cvs-commit at gcc dot gnu.org
2021-05-21 14:28 ` cvs-commit at gcc dot gnu.org
2021-07-30 17:35 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-01 17:20 ` hjl.tools at gmail dot com
2021-08-02 17:41 ` cvs-commit at gcc dot gnu.org
2021-08-02 17:41 ` cvs-commit at gcc dot gnu.org
2021-08-02 17:48 ` hjl.tools at gmail dot com
2021-08-02 17:52 ` hjl.tools at gmail dot com
2021-08-03  3:36 ` hjl.tools at gmail dot com
2021-08-05 12:31 ` hjl.tools at gmail dot com
2021-08-05 12:36 ` hjl.tools at gmail dot com
2021-08-07 14:52 ` hjl.tools at gmail dot com
2021-08-22  1:26 ` hjl.tools at gmail dot com
2021-10-06 23:48 ` hjl.tools at gmail dot com

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-90773-4-hvJdA3wako@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).