From: Richard Sandiford <richard.sandiford@arm.com>
To: "juzhe.zhong\@rivai.ai" <juzhe.zhong@rivai.ai>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, rguenther <rguenther@suse.de>
Subject: Re: [PATCH] IFN: Fix vector extraction into promoted subreg.
Date: Wed, 16 Aug 2023 07:45:16 +0100 [thread overview]
Message-ID: <mptil9fmqo3.fsf@arm.com> (raw)
In-Reply-To: <A5B5119E73867E8D+2023081609314414050517@rivai.ai> (juzhe's message of "Wed, 16 Aug 2023 09:31:44 +0800")
"juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai> writes:
> Hi, Robin, Richard and Richi.
>
> I am wondering whether we can just simply replace the VEC_EXTRACT expander with binary?
>
> Like this :?
>
> DEF_INTERNAL_OPTAB_FN (VEC_EXTRACT, ECF_CONST | ECF_NOTHROW,
> - vec_extract, vec_extract)
> + vec_extract, binary)
>
> to fix the sign extend issue.
>
> And remove the vec_extract explicit expander in internal-fn.cc ?
I'm not sure how that would work. The vec_extract optab takes two
modes whereas binary optabs take one mode.
However:
| #define vec_extract_direct { 3, 3, false }
This looks wrong. The numbers are argument numbers (or -1 for a return
value). vec_extract only takes 2 arguments, so 3 looks to be out-of-range.
| #define direct_vec_extract_optab_supported_p direct_optab_supported_p
I would expect this to be convert_optab_supported_p.
On the promoted subreg thing, I think expand_vec_extract_optab_fn
should use expand_fn_using_insn.
Thanks,
Richard
next prev parent reply other threads:[~2023-08-16 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 1:31 juzhe.zhong
2023-08-16 6:45 ` Richard Sandiford [this message]
2023-08-16 9:37 ` Robin Dapp
2023-08-16 10:05 ` Richard Sandiford
-- strict thread matches above, loose matches on Subject: below --
2023-08-15 14:02 Robin Dapp
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=mptil9fmqo3.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=rguenther@suse.de \
/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).