]> gcc.gnu.org Git - 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>
Fri, 10 Jul 2020 15:12:22 +0000 (10:12 -0500)
commit45b7f80f2e591d4f674d2f0798d31d51a7e46a72
tree01bf3b3cc4f28e6c5f9a16d3eae4d3eb47c4bdc9
parentf83d1f7eaa77967e6395eef13cd12ca282f1d11a
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)
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr96125.c [new file with mode: 0644]
This page took 0.06761 seconds and 5 git commands to generate.