From: Robin Dapp <rdapp.gcc@gmail.com>
To: 钟居哲 <juzhe.zhong@rivai.ai>, "Jeff Law" <jeffreyalaw@gmail.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rdapp.gcc@gmail.com,
"richard.sandiford" <richard.sandiford@arm.com>,
rguenther <rguenther@suse.de>
Subject: Re: [PATCH V6] VECT: Support LEN_MASK_{LOAD,STORE} ifn && optabs
Date: Mon, 19 Jun 2023 08:56:17 +0200 [thread overview]
Message-ID: <3c5cd2c6-8b65-6405-c8cf-b02b04c4cd88@gmail.com> (raw)
In-Reply-To: <E56C897F4D2C6690+2023061806570138674930@rivai.ai>
>>>If the pattern is not allowed to fail, then what code enforces the bias
>>>argument's restrictions? I don't see it in the generic expander code.
>
> I have no ideal since this is just copied from len_load/len_store which is
> s390 target dependent stuff.
>
> I have sent V7 patch with fixing doc by following your suggestion.
>
We have:
signed char
internal_len_load_store_bias (internal_fn ifn, machine_mode mode)
{
optab optab = direct_internal_fn_optab (ifn);
insn_code icode = direct_optab_handler (optab, mode);
if (icode != CODE_FOR_nothing)
{
/* For now we only support biases of 0 or -1. Try both of them. */
if (insn_operand_matches (icode, 3, GEN_INT (0)))
return 0;
if (insn_operand_matches (icode, 3, GEN_INT (-1)))
return -1;
}
return VECT_PARTIAL_BIAS_UNSUPPORTED;
}
This is used here:
static bool
vect_verify_loop_lens (loop_vec_info loop_vinfo)
{
[..]
signed char partial_load_bias = internal_len_load_store_bias
(IFN_LEN_LOAD, len_load_mode);
signed char partial_store_bias = internal_len_load_store_bias
(IFN_LEN_STORE, len_store_mode);
gcc_assert (partial_load_bias == partial_store_bias);
if (partial_load_bias == VECT_PARTIAL_BIAS_UNSUPPORTED)
return false;
/* If the backend requires a bias of -1 for LEN_LOAD, we must not emit
len_loads with a length of zero. In order to avoid that we prohibit
more than one loop length here. */
if (partial_load_bias == -1
&& LOOP_VINFO_LENS (loop_vinfo).length () > 1)
return false;
Regards
Robin
next prev parent reply other threads:[~2023-06-19 6:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 10:29 juzhe.zhong
2023-06-17 14:19 ` Jeff Law
2023-06-17 22:57 ` 钟居哲
2023-06-19 6:56 ` Robin Dapp [this message]
2023-06-19 11:43 ` Jeff Law
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=3c5cd2c6-8b65-6405-c8cf-b02b04c4cd88@gmail.com \
--to=rdapp.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--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).