* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
@ 2020-07-08 20:10 ` bergner at gcc dot gnu.org
2020-07-08 20:55 ` bergner at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-08 20:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |bergner at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
CC| |dje at gcc dot gnu.org,
| |meissner at gcc dot gnu.org,
| |segher at gcc dot gnu.org,
| |wschmidt at gcc dot gnu.org
Last reconfirmed| |2020-07-08
Ever confirmed|0 |1
--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Mine. This also affects GCC10.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
2020-07-08 20:10 ` [Bug target/96125] " bergner at gcc dot gnu.org
@ 2020-07-08 20:55 ` bergner at gcc dot gnu.org
2020-07-08 22:09 ` bergner at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-08 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
--- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> ---
Looks like some missing code in rs6000_option_override_internal() to enable
TARGET_MMA by default when -mcpu=power10 is used, similar to how we handle
-mprefix. I'm testing a patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
2020-07-08 20:10 ` [Bug target/96125] " bergner at gcc dot gnu.org
2020-07-08 20:55 ` bergner at gcc dot gnu.org
@ 2020-07-08 22:09 ` bergner at gcc dot gnu.org
2020-07-09 20:59 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-08 22:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
Actually, it's more complicated than that. We only initialize the target
builtins once, using the command line option values and not again using the
target attribute/pragma values. That means we basically have to initialize the
builtins, even if TARGET_MMA is false, just in case the user uses a target
attribute/pragma that allows them.
Will fixed a similar issue in March (no bugzilla entry for it though):
https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542555.html
...which basically just always enables the builtins. I'll do something
similar.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
` (2 preceding siblings ...)
2020-07-08 22:09 ` bergner at gcc dot gnu.org
@ 2020-07-09 20:59 ` cvs-commit at gcc dot gnu.org
2020-07-09 23:20 ` bergner at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-09 20:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Peter Bergner <bergner@gcc.gnu.org>:
https://gcc.gnu.org/g:fd263be4b523ff1b7f7dda49d856cc57221e8d21
commit r11-1973-gfd263be4b523ff1b7f7dda49d856cc57221e8d21
Author: Peter Bergner <bergner@linux.ibm.com>
Date: Thu Jul 9 15:52:59 2020 -0500
rs6000: Allow MMA built-in initialization regardless of compiler options
Built-in initialization occurs only once and fairly early, when the
command line options are in force. If the -mcpu=<CPU> is pre-power10,
then we fail to initialize the MMA built-ins, so they are not
available to call in a #pragma target/attribute target function.
The fix is to basically always (on server type cpus) initialize the MMA
built-ins so we can use them in #pragma target/attribute target functions.
2020-07-09 Peter Bergner <bergner@linux.ibm.com>
gcc/
PR target/96125
* config/rs6000/rs6000-call.c (rs6000_init_builtins): Define the
MMA
specific types __vector_quad and __vector_pair, and initialize the
MMA built-ins if TARGET_EXTRA_BUILTINS is set.
(mma_init_builtins): Don't test for mask set in
rs6000_builtin_mask.
Remove now unneeded mask variable.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add the
OPTION_MASK_MMA flag for power10 if not already set.
gcc/testsuite/
PR target/96125
* gcc.target/powerpc/pr96125.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
` (3 preceding siblings ...)
2020-07-09 20:59 ` cvs-commit at gcc dot gnu.org
@ 2020-07-09 23:20 ` bergner at gcc dot gnu.org
2020-07-10 15:12 ` cvs-commit at gcc dot gnu.org
2020-07-10 15:29 ` bergner at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-09 23:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.2
--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
Fixed on trunk. I'll backport to GCC10 tomorrow, after our nightly regtesters
have blessed it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
` (4 preceding siblings ...)
2020-07-09 23:20 ` bergner at gcc dot gnu.org
@ 2020-07-10 15:12 ` cvs-commit at gcc dot gnu.org
2020-07-10 15:29 ` bergner at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-10 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Peter Bergner
<bergner@gcc.gnu.org>:
https://gcc.gnu.org/g:45b7f80f2e591d4f674d2f0798d31d51a7e46a72
commit r10-8458-g45b7f80f2e591d4f674d2f0798d31d51a7e46a72
Author: Peter Bergner <bergner@linux.ibm.com>
Date: Thu Jul 9 15:52:59 2020 -0500
rs6000: Allow MMA built-in initialization regardless of compiler options
Built-in initialization occurs only once and fairly early, when the
command line options are in force. If the -mcpu=<CPU> is pre-power10,
then we fail to initialize the MMA built-ins, so they are not
available to call in a #pragma target/attribute target function.
The fix is to basically always (on server type cpus) initialize the MMA
built-ins so we can use them in #pragma target/attribute target functions.
2020-07-09 Peter Bergner <bergner@linux.ibm.com>
gcc/
PR target/96125
* config/rs6000/rs6000-call.c (rs6000_init_builtins): Define the
MMA
specific types __vector_quad and __vector_pair, and initialize the
MMA built-ins if TARGET_EXTRA_BUILTINS is set.
(mma_init_builtins): Don't test for mask set in
rs6000_builtin_mask.
Remove now unneeded mask variable.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add the
OPTION_MASK_MMA flag for power10 if not already set.
gcc/testsuite/
PR target/96125
* gcc.target/powerpc/pr96125.c: New test.
(cherry picked from commit fd263be4b523ff1b7f7dda49d856cc57221e8d21)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/96125] __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
` (5 preceding siblings ...)
2020-07-10 15:12 ` cvs-commit at gcc dot gnu.org
@ 2020-07-10 15:29 ` bergner at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-10 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from Peter Bergner <bergner at gcc dot gnu.org> ---
Fixed on GCC10 now too.
^ permalink raw reply [flat|nested] 8+ messages in thread