rs6000: Fix invalid address used in MMA built-in function
commit2432c47970024db6410708b582a901259dabaae1
authorPeter Bergner <bergner@linux.ibm.com>
Thu, 11 Feb 2021 20:15:26 +0000 (11 14:15 -0600)
committerPeter Bergner <bergner@linux.ibm.com>
Thu, 11 Feb 2021 20:16:05 +0000 (11 14:16 -0600)
tree069e47893ec78ca29c60ddb3e2423c02fc4f327e
parentbc0f7db7ebb649fc4c290cb7327fba5c17d4ed28
rs6000: Fix invalid address used in MMA built-in function

The mma_assemble_input_operand predicate is too lenient on the memory
operands it will accept, leading to an ICE when illegitimate addresses
are passed in.  The solution is to only accept memory operands with
addresses that are valid for quad word memory accesses.  The test case
is a minimized test case from the Eigen library.  The creduced test case
is very noisy with respect to warnings, so the test case has added -w to
silence them.

2021-02-11  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR target/99041
* config/rs6000/predicates.md (mma_assemble_input_operand): Restrict
memory addresses that are legal for quad word accesses.

gcc/testsuite/
PR target/99041
* g++.target/powerpc/pr99041.C: New test.
gcc/config/rs6000/predicates.md
gcc/testsuite/g++.target/powerpc/pr99041.C [new file with mode: 0644]