public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
@ 2020-08-27 18:08 ` cel at us dot ibm.com
2020-08-27 18:15 ` cel at us dot ibm.com
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cel at us dot ibm.com @ 2020-08-27 18:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
Carl Love <cel at us dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cel at us dot ibm.com
--- Comment #1 from Carl Love <cel at us dot ibm.com> ---
The Power 64-Bi ELF V2 ABI specification revision 1.4 May 10, 2017 has the
following builtins defined for popcount
vector signed char vec_vpopcnt (vector signed char);
vector unsigned char vec_vpopcnt (vector unsigned char);
vector unsigned int vec_vpopcnt (vector int);
vector signed long long vec_vpopcnt (vector signed long long);
vector unsigned long long vec_vpopcnt (vector unsigned long long);
vector unsigned short vec_vpopcnt (vector unsigned short);
vector int vec_vpopcnt (vector int);
vector short vec_vpopcnt (vector short);
vector signed char vec_vpopcntb (vector signed char);
vector unsigned char vec_vpopcntb (vector unsigned char);
vector signed long long vec_vpopcntd (vector signed long long);
vector unsigned long long vec_vpopcntd (vector unsigned long long)
vector unsigned short vec_vpopcnth (vector unsigned short);
vector short vec_vpopcnth (vector short);
vector unsigned int vec_vpopcntw (vector unsigned int);
vector int vec_vpopcntw (vector int);
The functions vec_popcntb, vec_popcnth, vec_popcntw, vec_popcntd do not
appear in the ABI as supported or depricated functions.
In altivec.h they are defined as:
#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
It does appear they should be removed from altivec.h.
The user should use the builtin vec_popcnt(a) where a is the unsigned long long
or unsigned int as desired. These builtins are support on at least
gcc version 8.3.1 and later.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
2020-08-27 18:08 ` [Bug target/85830] vec_popcntd is improperly defined in altivec.h cel at us dot ibm.com
@ 2020-08-27 18:15 ` cel at us dot ibm.com
2020-08-27 19:30 ` munroesj at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cel at us dot ibm.com @ 2020-08-27 18:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #2 from Carl Love <cel at us dot ibm.com> ---
Hit the save button a little too fast missed putting in everything I intended
to put in. Lets try to get it all in.
(In reply to Carl Love from comment #1)
> The Power 64-Bi ELF V2 ABI specification revision 1.4 May 10, 2017 has the
> following builtins defined for popcount
>
VEC_POPCNT (ARG1) Purpose: Returns a vector containing the number of bits set
in each element of the input vector.
Result value:The value of each element of the result is the
number of bits set in the corresponding input
element.
vector unsigned char vec_popcnt (vector signed char);
vector unsigned char vec_popcnt (vector unsigned char);
vector unsigned int vec_popcnt (vector signed int);
vector unsigned int vec_popcnt (vector unsigned int);
vector unsigned long long vec_popcnt (vector signed long long);
vector unsigned long long vec_popcnt (vector unsigned long long);
vector unsigned short vec_popcnt (vector signed short);
vector unsigned short vec_popcnt (vector unsigned short);
In section A.6. Deprecated Compatibility Functions we have listed:
> vector signed char vec_vpopcnt (vector signed char);
> vector unsigned char vec_vpopcnt (vector unsigned char);
> vector unsigned int vec_vpopcnt (vector int);
> vector signed long long vec_vpopcnt (vector signed long long);
> vector unsigned long long vec_vpopcnt (vector unsigned long long);
> vector unsigned short vec_vpopcnt (vector unsigned short);
> vector int vec_vpopcnt (vector int);
> vector short vec_vpopcnt (vector short);
> vector signed char vec_vpopcntb (vector signed char);
> vector unsigned char vec_vpopcntb (vector unsigned char);
> vector signed long long vec_vpopcntd (vector signed long long);
> vector unsigned long long vec_vpopcntd (vector unsigned long long)
> vector unsigned short vec_vpopcnth (vector unsigned short);
> vector short vec_vpopcnth (vector short);
> vector unsigned int vec_vpopcntw (vector unsigned int);
> vector int vec_vpopcntw (vector int);
>
> The functions vec_popcntb, vec_popcnth, vec_popcntw, vec_popcntd do not
> appear in the ABI as supported or depricated functions.
>
> In altivec.h they are defined as:
>
> #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
>
> It does appear they should be removed from altivec.h.
>
> The user should use the builtin vec_popcnt(a) where a is the unsigned long
> long
> or unsigned int as desired. These builtins are support on at least
> gcc version 8.3.1 and later.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
2020-08-27 18:08 ` [Bug target/85830] vec_popcntd is improperly defined in altivec.h cel at us dot ibm.com
2020-08-27 18:15 ` cel at us dot ibm.com
@ 2020-08-27 19:30 ` munroesj at gcc dot gnu.org
2020-08-27 19:38 ` cel at us dot ibm.com
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: munroesj at gcc dot gnu.org @ 2020-08-27 19:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #3 from Steven Munroe <munroesj at gcc dot gnu.org> ---
(In reply to Carl Love from comment #2)
> Hit the save button a little too fast missed putting in everything I
> intended to put in. Lets try to get it all in.
>
> > In altivec.h they are defined as:
> >
> > #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
> >
> > It does appear they should be removed from altivec.h.
> >
> > The user should use the builtin vec_popcnt(a) where a is the unsigned long
> > long
> > or unsigned int as desired. These builtins are support on at least
> > gcc version 8.3.1 and later.
I assume you mean, remove the defines for; vec_popcntb, vec_popcnth,
vec_popcntw, and vec_popcntd.
While retaining vec_popcnt ??
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-08-27 19:30 ` munroesj at gcc dot gnu.org
@ 2020-08-27 19:38 ` cel at us dot ibm.com
2020-08-28 15:46 ` bergner at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cel at us dot ibm.com @ 2020-08-27 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #4 from Carl Love <cel at us dot ibm.com> ---
Just remove
#define vec_popcntb __builtin_vec_vpopcntub
#define vec_popcnth __builtin_vec_vpopcntuh
#define vec_popcntw __builtin_vec_vpopcntuw
#define vec_popcntd __builtin_vec_vpopcntud
from altivec.h.
We need to keep the definition for vec_popcnt as it is the currently defined
ABI builtin.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-08-27 19:38 ` cel at us dot ibm.com
@ 2020-08-28 15:46 ` bergner at gcc dot gnu.org
2020-08-31 23:24 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-08-28 15:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |carll at gcc dot gnu.org
Last reconfirmed| |2020-08-28
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2020-August/
| |552891.html
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
Carl has confirmed this and has posted a patch, so assigning to him.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2020-08-28 15:46 ` bergner at gcc dot gnu.org
@ 2020-08-31 23:24 ` cvs-commit at gcc dot gnu.org
2020-09-04 18:23 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-31 23:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Carl Love <carll@gcc.gnu.org>:
https://gcc.gnu.org/g:1da918e153b60ef81686dc5cd110d8608d962c79
commit r11-2958-g1da918e153b60ef81686dc5cd110d8608d962c79
Author: Carl Love <cel@us.ibm.com>
Date: Thu Aug 27 13:36:13 2020 -0500
rs6000, remove improperly defined and unsupported 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2020-08-31 23:24 ` cvs-commit at gcc dot gnu.org
@ 2020-09-04 18:23 ` cvs-commit at gcc dot gnu.org
2020-09-04 18:28 ` carll at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-04 18:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Carl Love <carll@gcc.gnu.org>:
https://gcc.gnu.org/g:e86814328251ea7da83038605df01d8def8d873a
commit r10-8710-ge86814328251ea7da83038605df01d8def8d873a
Author: Carl Love <cel@us.ibm.com>
Date: Thu Aug 27 13:36:13 2020 -0500
rs6000, remove improperly defined and unsupported 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2020-09-04 18:23 ` cvs-commit at gcc dot gnu.org
@ 2020-09-04 18:28 ` carll at gcc dot gnu.org
2020-09-04 18:29 ` carll at gcc dot gnu.org
2020-09-07 12:59 ` segher at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: carll at gcc dot gnu.org @ 2020-09-04 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
Carl Love <carll at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Carl Love <carll at gcc dot gnu.org> ---
The fix has been applied to the current mainline and backported to GCC 10.
Closing the bug as fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2020-09-04 18:28 ` carll at gcc dot gnu.org
@ 2020-09-04 18:29 ` carll at gcc dot gnu.org
2020-09-07 12:59 ` segher at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: carll at gcc dot gnu.org @ 2020-09-04 18:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
Carl Love <carll at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #9 from Carl Love <carll at gcc dot gnu.org> ---
Issue fixed, closing.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/85830] vec_popcntd is improperly defined in altivec.h
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2020-09-04 18:29 ` carll at gcc dot gnu.org
@ 2020-09-07 12:59 ` segher at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: segher at gcc dot gnu.org @ 2020-09-07 12:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85830
--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Thanks Carl!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-09-07 12:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-85830-4@http.gcc.gnu.org/bugzilla/>
2020-08-27 18:08 ` [Bug target/85830] vec_popcntd is improperly defined in altivec.h cel at us dot ibm.com
2020-08-27 18:15 ` cel at us dot ibm.com
2020-08-27 19:30 ` munroesj at gcc dot gnu.org
2020-08-27 19:38 ` cel at us dot ibm.com
2020-08-28 15:46 ` bergner at gcc dot gnu.org
2020-08-31 23:24 ` cvs-commit at gcc dot gnu.org
2020-09-04 18:23 ` cvs-commit at gcc dot gnu.org
2020-09-04 18:28 ` carll at gcc dot gnu.org
2020-09-04 18:29 ` carll at gcc dot gnu.org
2020-09-07 12:59 ` segher at gcc dot gnu.org
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).