]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Allow MMA built-in initialization regardless of compiler options
authorPeter Bergner <bergner@linux.ibm.com>
Thu, 9 Jul 2020 20:52:59 +0000 (15:52 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Thu, 9 Jul 2020 20:58:36 +0000 (15:58 -0500)
commitfd263be4b523ff1b7f7dda49d856cc57221e8d21
tree85310a062d8323bc89b344b9c9e5701c2630087d
parent9ddea9306251b7d4e4fd1d67a5941ef7448b2e66
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.
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr96125.c [new file with mode: 0644]