diff mbox series

[3/4] rs6000, Remove redundant built-in __builtin_vsx_xvcvuxwdp

Message ID 2dbd42ec-844a-4479-956a-9454db0fae92@linux.ibm.com
State New
Headers show
Series rs6000, remove redundant built-ins and add more test cases | expand

Commit Message

Carl Love Aug. 7, 2024, 5:15 p.m. UTC
GCC maintainers:

The patch removed the built-in __builtin_vsx_xvcvuxwdp as it is covered 
by the overloaded vec_doubleo built-in.

The patch has been tested on Power 10 LE and BE with no regressions.

Please let me know if it is acceptable for mainline.  Thanks.

                       Carl
--------------------------------------------------------------------

rs6000, Remove redundant built-in __builtin_vsx_xvcvuxwdp

The built-in __builtin_vsx_xvcvuxwdp is a duplicate of the overloaded
built-in vec_doubleo.  There are no test cases or documentation for
__builtin_vsx_xvcvuxwdp.  This patch removes the redundant built-in.

gcc/ChangeLog:
     * config/rs6000/rs6000-builtins.def (__builtin_vsx_xvcvuxwdp):
     Remove built-in definition.
---
  gcc/config/rs6000/rs6000-builtins.def | 3 ---
  1 file changed, 3 deletions(-)

Comments

Kewen.Lin Aug. 9, 2024, 10:11 a.m. UTC | #1
Hi Carl,

on 2024/8/8 01:15, Carl Love wrote:
> 
> GCC maintainers:
> 
> The patch removed the built-in __builtin_vsx_xvcvuxwdp as it is covered by the overloaded vec_doubleo built-in.
> 
> The patch has been tested on Power 10 LE and BE with no regressions.
> 
> Please let me know if it is acceptable for mainline.  Thanks.
> 
>                       Carl
> --------------------------------------------------------------------
> 
> rs6000, Remove redundant built-in __builtin_vsx_xvcvuxwdp
> 
> The built-in __builtin_vsx_xvcvuxwdp is a duplicate of the overloaded
> built-in vec_doubleo.  There are no test cases or documentation for

I think this wording is wrong, __builtin_vsx_xvcvuxwdp is a bif doing
1-1 map to xvcvuxwdp, but vec_doubleo with vector unsigned int is only
mapped to xvcvuxwdp on LE while it's vec_doublee on BE.  So how about
"... __builtin_vsx_xvcvuxwdp can be covered with PVIPR function
vec_doubleo on LE and vec_doublee on BE...".

OK with this wording tweaked, thanks!

BR,
Kewen

> __builtin_vsx_xvcvuxwdp.  This patch removes the redundant built-in.
> 
> gcc/ChangeLog:
>     * config/rs6000/rs6000-builtins.def (__builtin_vsx_xvcvuxwdp):
>     Remove built-in definition.
> ---
>  gcc/config/rs6000/rs6000-builtins.def | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
> index 8bb7686bcc8..f2bebd299b2 100644
> --- a/gcc/config/rs6000/rs6000-builtins.def
> +++ b/gcc/config/rs6000/rs6000-builtins.def
> @@ -1613,9 +1613,6 @@
>    const vf __builtin_vsx_xvcvuxdsp (vull);
>      XVCVUXDSP vsx_xvcvuxdsp {}
> 
> -  const vd __builtin_vsx_xvcvuxwdp (vsi);
> -    XVCVUXWDP vsx_xvcvuxwdp {}
> -
>    const vf __builtin_vsx_xvcvuxwsp (vsi);
>      XVCVUXWSP vsx_floatunsv4siv4sf2 {}
>
Carl Love Sept. 30, 2024, 10:42 p.m. UTC | #2
GCC maintainers:

Here is my respnses to the review comments by Kewen.  Unfortunately, 
Kewen is no longer working on GCC power.

I will submit an updated version of the patch with Kewen's suggested 
changes.

                                      Carl


On 8/9/24 3:11 AM, Kewen.Lin wrote:
>> rs6000, Remove redundant built-in __builtin_vsx_xvcvuxwdp
>>
>> The built-in __builtin_vsx_xvcvuxwdp is a duplicate of the overloaded
>> built-in vec_doubleo.  There are no test cases or documentation for
> I think this wording is wrong, __builtin_vsx_xvcvuxwdp is a bif doing
> 1-1 map to xvcvuxwdp, but vec_doubleo with vector unsigned int is only
> mapped to xvcvuxwdp on LE while it's vec_doublee on BE.  So how about
> "... __builtin_vsx_xvcvuxwdp can be covered with PVIPR function
> vec_doubleo on LE and vec_doublee on BE...".
>
> OK with this wording tweaked, thanks!
Yes, the mapping is LE/BE dependent.  Updated the description as suggested.

                                         Carl
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000-builtins.def 
b/gcc/config/rs6000/rs6000-builtins.def
index 8bb7686bcc8..f2bebd299b2 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -1613,9 +1613,6 @@ 
    const vf __builtin_vsx_xvcvuxdsp (vull);
      XVCVUXDSP vsx_xvcvuxdsp {}

-  const vd __builtin_vsx_xvcvuxwdp (vsi);
-    XVCVUXWDP vsx_xvcvuxwdp {}
-
    const vf __builtin_vsx_xvcvuxwsp (vsi);
      XVCVUXWSP vsx_floatunsv4siv4sf2 {}