From: Jeff Law <jeffreyalaw@gmail.com>
To: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org
Cc: rguenther@suse.de, richard.sandiford@arm.com
Subject: Re: [PATCH] LOOP IVOPTS: Apply LEN_MASK_{LOAD,STORE}
Date: Fri, 23 Jun 2023 13:14:04 -0600 [thread overview]
Message-ID: <29634b43-4d4d-7f94-d2ad-08ea2f5f79ae@gmail.com> (raw)
In-Reply-To: <20230623140537.4156063-1-juzhe.zhong@rivai.ai>
On 6/23/23 08:05, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> gcc/ChangeLog:
>
> * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Apply LEN_MASK_{LOAD,STORE}.
>
> ---
> gcc/tree-ssa-loop-ivopts.cc | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
> index 6671ff6db5a..2b66fe66bc7 100644
> --- a/gcc/tree-ssa-loop-ivopts.cc
> +++ b/gcc/tree-ssa-loop-ivopts.cc
> @@ -2442,6 +2442,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
> case IFN_MASK_LOAD:
> case IFN_MASK_LOAD_LANES:
> case IFN_LEN_LOAD:
> + case IFN_LEN_MASK_LOAD:
> if (op_p == gimple_call_arg_ptr (call, 0))
> return TREE_TYPE (gimple_call_lhs (call));
> return NULL_TREE;
> @@ -2449,8 +2450,11 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
> case IFN_MASK_STORE:
> case IFN_MASK_STORE_LANES:
> case IFN_LEN_STORE:
> + case IFN_LEN_MASK_STORE:
> if (op_p == gimple_call_arg_ptr (call, 0))
> - return TREE_TYPE (gimple_call_arg (call, 3));
> + return TREE_TYPE (
> + gimple_call_arg (call, internal_fn_stored_value_index (
> + gimple_call_internal_fn (call))));
Formatting nit. Compute the result of internal_fn_stored_value_index
into a temporary and pass that temporary into gimple_call_arg which
should clean up the formatting here.
In general, if you find yourself indenting after an open paren like
you've done here, compute the value into a temporary.
OK with the formatting fix.
jeff
next prev parent reply other threads:[~2023-06-23 19:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 14:05 juzhe.zhong
2023-06-23 19:14 ` Jeff Law [this message]
2023-06-23 23:20 ` 钟居哲
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=29634b43-4d4d-7f94-d2ad-08ea2f5f79ae@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=rguenther@suse.de \
--cc=richard.sandiford@arm.com \
/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).