From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Carl Love <cel@linux.ibm.com>
Cc: gcc-patches@gcc.gnu.org,
"bergner@linux.ibm.com" <bergner@linux.ibm.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH 4/13] rs6000, extend the current vec_{un,}signed{e,o} built-ins
Date: Mon, 20 May 2024 09:10:45 +0800 [thread overview]
Message-ID: <ae9da106-d924-8571-938c-bf7081b0e58b@linux.ibm.com> (raw)
In-Reply-To: <b369724f-aa43-48ca-8e31-f2a91b26fb75@linux.ibm.com>
Hi Carl,
on 2024/5/18 04:20, Carl Love wrote:
> Kewen:
>
> I am working thru the patches. I made the changes as requested for this patch but have a question about
> one of your comments.
>
> On 5/14/24 00:53, Kewen.Lin wrote:
>> Hi,
>>
>> on 2024/4/20 05:17, Carl Love wrote:
>>> rs6000, extend the current vec_{un,}signed{e,o} built-ins
>>>
>>> The built-ins __builtin_vsx_xvcvspsxds and __builtin_vsx_xvcvspuxds
>>> convert a vector of floats to signed/unsigned long long ints. Extend the
>>> existing vec_{un,}signed{e,o} built-ins to handle the argument
>>> vector of floats to return the even/odd signed/unsigned integers.
>>>
>>> Add testcases and update documentation.
>>>
>>> gcc/ChangeLog:
>>> * config/rs6000/rs6000-builtins.def (__builtin_vsx_xvcvspsxds_low,
>>> __builtin_vsx_xvcvspuxds_low): New built-in definitions.
>>> * config/rs6000/rs6000-overload.def (vec_signede, vec_signedo):
>>> Add new overloaded specifications.
>>> * config/rs6000/vsx.md (vsx_xvcvsp<su>xds_low): New define_expand.
>>> * doc/extend.texi (vec_signedo, vec_signede): Add documentation.
>>>
>>> gcc/testsuite/ChangeLog:
>>> * gcc.target/powerpc/builtins-3-runnable: New tests for the added
>
>
> <snip>
>>
>> As the existing instances for vec_signed and vec_unsigned are with
>> names like VEC_V{UN,}SIGNED{O,E}_V2DF, I prefer these are updated
>> with similar style, maybe something like:
>>
>> VEC_V{UN,}SIGNED{E,O}_V4SF v{un,}signed{e,o}_v4sf
>
> Yes, sounds reasonable. Changed XVCVSPUXDS -> VEC_VUNSIGNEDE_V4SF
> XVCVSPUXDSO -> VEC_VUNSIGNEDO_V4SF
> XVCVSPSXDS -> VEC_VSIGNEDE_V4SF
> XVCVSPSXDSO -> VEC_VSIGNEDO_V4SF
>
> QUESTION:
> I am not sure what you want changed to v{un,}signed{e,o}_v4sf?? The overloaded instance entry names
It's about the expander name, just like the existing *vunsignede_v2df* and *vunsignedo_v2df*:
const vsi __builtin_vsx_vunsignede_v2df (vd);
VEC_VUNSIGNEDE_V2DF vunsignede_v2df {}
const vsi __builtin_vsx_vunsignedo_v2df (vd);
VEC_VUNSIGNEDO_V2DF vunsignedo_v2df {}
, not for the actual builtin names, sorry for the confusion.
BR,
Kewen
> for vd, vf have to match the first line of the definition. The name can't be type specific, i.e. v4sf.
> So not sure where you want the v{un,}signed{e,o}_v4sf name used?
>
> For example, file rs6000-overloaded.def now looks like:
>
> [VEC_SIGNEDE, vec_signede, __builtin_vec_vsignede]
> vsi __builtin_vec_vsignede (vd);
> VEC_VSIGNEDE_V2DF
> + vsll __builtin_vec_vsignede (vf);
> + VEC_VSIGNEDE_V4SF
>
> [VEC_SIGNEDO, vec_signedo, __builtin_vec_vsignedo]
> vsi __builtin_vec_vsignedo (vd);
> VEC_VSIGNEDO_V2DF
> + vsll __builtin_vec_vsignedo (vf);
> + VEC_VSIGNEDO_V4SF
>
>
>
> <snip>
>
> Carl
next prev parent reply other threads:[~2024-05-20 1:11 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 21:04 [PATCH 0/13] rs6000, built-in cleanup patch series Carl Love
2024-04-19 21:16 ` [PATCH 1/13] rs6000, Remove __builtin_vsx_cmple* builtins Carl Love
2024-05-13 6:28 ` Kewen.Lin
2024-04-19 21:17 ` [PATCH 2/13] rs6000, Remove __builtin_vsx_xvcvspsxws built-in Carl Love
2024-05-14 8:43 ` Kewen.Lin
2024-05-24 20:18 ` Carl Love
2024-05-27 1:43 ` Kewen.Lin
2024-04-19 21:17 ` [PATCH 3/13] rs6000, fix error in unsigned vector float to unsigned int built-in definitions Carl Love
2024-05-14 7:00 ` Kewen.Lin
2024-05-24 20:19 ` Carl Love
2024-04-19 21:17 ` [PATCH 4/13] rs6000, extend the current vec_{un,}signed{e,o} built-ins Carl Love
2024-05-14 7:53 ` Kewen.Lin
2024-05-17 20:20 ` Carl Love
2024-05-20 1:10 ` Kewen.Lin [this message]
2024-05-24 20:19 ` Carl Love
2024-04-19 21:17 ` [PATCH 5/13] rs6000, remove duplicated built-ins of vecmergl and vec_mergeh Carl Love
2024-05-14 2:06 ` Kewen.Lin
2024-04-19 21:17 ` [PATCH 6/13] rs6000, add overloaded vec_sel with int128 arguments Carl Love
2024-05-14 2:54 ` Kewen.Lin
2024-05-22 0:13 ` Carl Love
2024-05-22 3:05 ` Kewen.Lin
2024-05-24 20:19 ` Carl Love
2024-04-19 21:18 ` [PATCH 7/13] rs6000, remove the vec_xxsel built-ins, they are duplicates Carl Love
2024-05-14 2:55 ` Kewen.Lin
2024-05-24 20:19 ` Carl Love
2024-04-19 21:18 ` [PATCH 8/13] rs6000, remove __builtin_vsx_vperm_* built-ins Carl Love
2024-05-14 2:59 ` Kewen.Lin
2024-05-24 20:20 ` Carl Love
2024-04-19 21:18 ` [PATCH 9/13] rs6000, remove __builtin_vsx_xvnegdp and __builtin_vsx_xvnegsp built-ins Carl Love
2024-05-14 3:01 ` Kewen.Lin
2024-04-19 21:18 ` [PATCH 10/13] rs6000, extend vec_xxpermdi built-in for __int128 args Carl Love
2024-05-14 5:14 ` Kewen.Lin
2024-05-24 20:20 ` Carl Love
2024-04-19 21:18 ` [PATCH 11/13] rs6000, remove __builtin_vsx_xvcmpeqsp_p built-in Carl Love
2024-05-14 5:26 ` Kewen.Lin
2024-05-24 20:20 ` Carl Love
2024-04-19 21:18 ` [PATCH 12/13] rs6000, remove __builtin_vsx_xvcmpeqsp built-in Carl Love
2024-05-14 5:37 ` Kewen.Lin
2024-05-23 18:21 ` Carl Love
2024-05-24 10:43 ` Kewen.Lin
2024-05-24 15:19 ` Carl Love
2024-04-19 21:18 ` [PATCH 13/13] rs6000, remove vector set and vector init built-ins Carl Love
2024-05-14 5:44 ` Kewen.Lin
2024-05-23 0:29 ` Carl Love
2024-05-23 2:27 ` Kewen.Lin
2024-05-10 15:15 ` [PING} Re: [PATCH 0/13] rs6000, built-in cleanup patch series Carl Love
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=ae9da106-d924-8571-938c-bf7081b0e58b@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=cel@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.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).