diff options
author | Peter Bergner <bergner@linux.ibm.com> | 2021-12-14 14:50:41 -0600 |
---|---|---|
committer | Peter Bergner <bergner@linux.ibm.com> | 2021-12-14 15:00:00 -0600 |
commit | 15c02ab2569b3c4e27d6f133c013b15a9fa70177 (patch) | |
tree | a9b858798df601d4bb12573763514d01f2861fb2 /gcc/builtins.c | |
parent | ca39102e10643a6b3f07d06934cc0907ba83d9ee (diff) | |
download | gcc-15c02ab2569b3c4e27d6f133c013b15a9fa70177.zip gcc-15c02ab2569b3c4e27d6f133c013b15a9fa70177.tar.gz gcc-15c02ab2569b3c4e27d6f133c013b15a9fa70177.tar.bz2 |
rs6000: Do not allow combining of multiple assemble quads [PR103548]
The compiler will gladly CSE the result of two __builtin_mma_build_acc
calls with the same four vector arguments, leading to illegal MMA
code being generated. The fix here is to make the mma_assemble_acc
pattern use a unspec_volatile to stop the CSE from happening.
2021-12-14 Peter Bergner <bergner@linux.ibm.com>
gcc/
PR target/103548
* config/rs6000/mma.md (UNSPEC_MMA_ASSEMBLE): Rename unspec from this...
(UNSPEC_VSX_ASSEMBLE): ...to this.
(UNSPECV_MMA_ASSEMBLE): New unspecv.
(vsx_assemble_pair): Use UNSPEC_VSX_ASSEMBLE.
(*vsx_assemble_pair): Likewise.
(mma_assemble_acc): Use UNSPECV_MMA_ASSEMBLE.
(*mma_assemble_acc): Likewise.
* config/rs6000/rs6000.c (rs6000_split_multireg_move): Handle
UNSPEC_VOLATILE. Use UNSPEC_VSX_ASSEMBLE and UNSPECV_MMA_ASSEMBLE.
gcc/testsuite/
PR target/103548
* gcc.target/powerpc/mma-builtin-10-pair.c: New test.
* gcc.target/powerpc/mma-builtin-10-quad.c: New test.
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions