public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h
@ 2020-08-28 15:08 Carl Love
  2020-08-31 15:56 ` will schmidt
  2020-08-31 16:17 ` Segher Boessenkool
  0 siblings, 2 replies; 4+ messages in thread
From: Carl Love @ 2020-08-28 15:08 UTC (permalink / raw)
  To: will schmidt, Segher Boessenkool, Peter Bergner
  Cc: dje.gcc, gcc-patches, Bill Schmidt, cel

GCC maintainers:

The defines for vec_popcnt, bvec_popcnth, vec_popcntw, vec_popcntd in
gcc/config/rs6000/altivec.h are not listed in the Power 64-Bi ELF V2
ABI specification revision 1.4, May 10, 2017.  They are not used by any
of the regression tests.  They also do not work as reported in:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830

The following patch removes the unsupported defines for the builtin
functions.

The patch has been tested on 

  powerpc64le-unknown-linux-gnu (Power 9 LE

with no regression errors.

Please let me know if this patch is acceptable for mainline.

                 Carl Love

------------------------------------------------------
 vec_popcntd is improperly defined in altivec.h

gcc/ChangeLog

2020-08-27  Carl Love  <cel@us.ibm.com>

	PR target/85830
	* config/rs6000/altivec.h (vec_popcntub, vec_popcntuh, vec_popcntuw,
	vec_popcntud): Remove defines.
---
 gcc/config/rs6000/altivec.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h
index bf2240f16a2..8a2dcda0144 100644
--- a/gcc/config/rs6000/altivec.h
+++ b/gcc/config/rs6000/altivec.h
@@ -407,10 +407,6 @@
 #define vec_vpopcnth __builtin_vec_vpopcnth
 #define vec_vpopcntw __builtin_vec_vpopcntw
 #define vec_popcnt __builtin_vec_vpopcntu
-#define vec_popcntb __builtin_vec_vpopcntub
-#define vec_popcnth __builtin_vec_vpopcntuh
-#define vec_popcntw __builtin_vec_vpopcntuw
-#define vec_popcntd __builtin_vec_vpopcntud
 #define vec_vrld __builtin_vec_vrld
 #define vec_vsld __builtin_vec_vsld
 #define vec_vsrad __builtin_vec_vsrad
-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h
  2020-08-28 15:08 [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h Carl Love
@ 2020-08-31 15:56 ` will schmidt
  2020-08-31 16:25   ` Carl Love
  2020-08-31 16:17 ` Segher Boessenkool
  1 sibling, 1 reply; 4+ messages in thread
From: will schmidt @ 2020-08-31 15:56 UTC (permalink / raw)
  To: Carl Love, Segher Boessenkool, Peter Bergner
  Cc: dje.gcc, gcc-patches, Bill Schmidt

On Fri, 2020-08-28 at 08:08 -0700, Carl Love wrote:
> GCC maintainers:
> 

Hi, 



> The defines for vec_popcnt, bvec_popcnth, vec_popcntw, vec_popcntd in

s/bvec/vec/

> gcc/config/rs6000/altivec.h are not listed in the Power 64-Bi ELF V2
> ABI specification revision 1.4, May 10, 2017.  They are not used by
> any
> of the regression tests.  They also do not work as reported in:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
> 


Can probably replace that URL with a reference to "PR 85830".

> The following patch removes the unsupported defines for the builtin
> functions.
> 
> The patch has been tested on 
> 
>   powerpc64le-unknown-linux-gnu (Power 9 LE
> 
> with no regression errors.
> 
> Please let me know if this patch is acceptable for mainline.
> 
>                  Carl Love
> 
> ------------------------------------------------------
>  vec_popcntd is improperly defined in altivec.h


^ stray line ? 

> 
> gcc/ChangeLog
> 
> 2020-08-27  Carl Love  <cel@us.ibm.com>
> 
> 	PR target/85830
> 	* config/rs6000/altivec.h (vec_popcntub, vec_popcntuh,
> vec_popcntuw,
> 	vec_popcntud): Remove defines.
> ---
>  gcc/config/rs6000/altivec.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/gcc/config/rs6000/altivec.h
> b/gcc/config/rs6000/altivec.h
> index bf2240f16a2..8a2dcda0144 100644
> --- a/gcc/config/rs6000/altivec.h
> +++ b/gcc/config/rs6000/altivec.h
> @@ -407,10 +407,6 @@
>  #define vec_vpopcnth __builtin_vec_vpopcnth
>  #define vec_vpopcntw __builtin_vec_vpopcntw
>  #define vec_popcnt __builtin_vec_vpopcntu
> -#define vec_popcntb __builtin_vec_vpopcntub
> -#define vec_popcnth __builtin_vec_vpopcntuh
> -#define vec_popcntw __builtin_vec_vpopcntuw
> -#define vec_popcntd __builtin_vec_vpopcntud

That looks OK within this context.

Are there any existing tests that use these named variations?  

Thanks,
-Will

>  #define vec_vrld __builtin_vec_vrld
>  #define vec_vsld __builtin_vec_vsld
>  #define vec_vsrad __builtin_vec_vsrad


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h
  2020-08-28 15:08 [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h Carl Love
  2020-08-31 15:56 ` will schmidt
@ 2020-08-31 16:17 ` Segher Boessenkool
  1 sibling, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-08-31 16:17 UTC (permalink / raw)
  To: Carl Love; +Cc: will schmidt, Peter Bergner, dje.gcc, gcc-patches, Bill Schmidt

Hi!

On Fri, Aug 28, 2020 at 08:08:05AM -0700, Carl Love wrote:
> The defines for vec_popcnt, bvec_popcnth, vec_popcntw, vec_popcntd in
> gcc/config/rs6000/altivec.h are not listed in the Power 64-Bi ELF V2
> ABI specification revision 1.4, May 10, 2017.  They are not used by any
> of the regression tests.

(s/Bi/Bit/, in addition to what Will found)

There is vec_vpopcntb etc. (note the "v"), maybe that confused things?

> They also do not work as reported in:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
> 
> The following patch removes the unsupported defines for the builtin
> functions.

Okay for trunk, and okay for any backports you think is good.  Thanks!


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h
  2020-08-31 15:56 ` will schmidt
@ 2020-08-31 16:25   ` Carl Love
  0 siblings, 0 replies; 4+ messages in thread
From: Carl Love @ 2020-08-31 16:25 UTC (permalink / raw)
  To: will schmidt, Segher Boessenkool, Peter Bergner
  Cc: dje.gcc, gcc-patches, Bill Schmidt

Will:

> That looks OK within this context.
> 
> Are there any existing tests that use these named variations?  
> 
> Thanks,
> -Will

I was not able to find any test cases for these named builtins.  I
fixed the other issues you mentioned in the message and patch below.

                   Carl Love

----------------------------------------------


GCC maintainers:

The defines for vec_popcnt, vec_popcnth, vec_popcntw, vec_popcntd in
gcc/config/rs6000/altivec.h are not listed in the Power 64-Bi ELF V2
ABI specification revision 1.4, May 10, 2017.  They are not used by any
of the regression tests.  They also do not work as reported in PR
85830.

The following patch removes the unsupported defines for the builtin
functions.

The patch has been tested on 

  powerpc64le-unknown-linux-gnu (Power 9 LE

with no regression errors.

Please let me know if this patch is acceptable for mainline.

                 Carl Love

-----------------------------------------------------
rs6000, fix improperly defined in builtins.

gcc/ChangeLog

2020-08-31  Carl Love  <cel@us.ibm.com>

	PR target/85830
	* config/rs6000/altivec.h (vec_popcntb, vec_popcnth,
vec_popcntw,
	vec_popcntd): Remove defines.
---
 gcc/config/rs6000/altivec.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h
index bf2240f16a2..8a2dcda0144 100644
--- a/gcc/config/rs6000/altivec.h
+++ b/gcc/config/rs6000/altivec.h
@@ -407,10 +407,6 @@
 #define vec_vpopcnth __builtin_vec_vpopcnth
 #define vec_vpopcntw __builtin_vec_vpopcntw
 #define vec_popcnt __builtin_vec_vpopcntu
-#define vec_popcntb __builtin_vec_vpopcntub
-#define vec_popcnth __builtin_vec_vpopcntuh
-#define vec_popcntw __builtin_vec_vpopcntuw
-#define vec_popcntd __builtin_vec_vpopcntud
 #define vec_vrld __builtin_vec_vrld
 #define vec_vsld __builtin_vec_vsld
 #define vec_vsrad __builtin_vec_vsrad
-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-31 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 15:08 [PATCH] rs6000, vec_popcntd is improperly defined in altivec.h Carl Love
2020-08-31 15:56 ` will schmidt
2020-08-31 16:25   ` Carl Love
2020-08-31 16:17 ` Segher Boessenkool

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).