aboutsummaryrefslogtreecommitdiff
path: root/c++tools
diff options
context:
space:
mode:
authorPeter Bergner <bergner@linux.ibm.com>2021-09-14 10:47:18 -0500
committerPeter Bergner <bergner@linux.ibm.com>2021-09-14 13:04:08 -0500
commitf80b9be083e0e7d49e7744b7e531b9aa52acd563 (patch)
tree6cf63e620d1db0638a9acbf6238492d530356882 /c++tools
parentfb32372651882adee2d41052f1e59012e8bb32a7 (diff)
downloadgcc-f80b9be083e0e7d49e7744b7e531b9aa52acd563.zip
gcc-f80b9be083e0e7d49e7744b7e531b9aa52acd563.tar.gz
gcc-f80b9be083e0e7d49e7744b7e531b9aa52acd563.tar.bz2
rs6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz
Fwprop will happily optimize two xxsetaccz instructions into one xxsetaccz by propagating the results of the first to the uses of the second. We really don't want that to happen given the late priming/depriming of accumulators. I fixed this by making the xxsetaccz source operand an unspec volatile. I also removed the mma_xxsetaccz define_expand and define_insn_and_split and replaced it with a simple define_insn. The expand and splitter patterns were leftovers from the pre opaque mode code when the xxsetaccz code was part of the movpxi pattern, and we don't need them now. Rather than a new test case, I was able to just modify the current test case to add another __builtin_mma_xxsetaccz call which shows the bad code gen with unpatched compilers. 2021-09-14 Peter Bergner <bergner@linux.ibm.com> gcc/ * config/rs6000/mma.md (unspec): Delete UNSPEC_MMA_XXSETACCZ. (unspecv): Add UNSPECV_MMA_XXSETACCZ. (*mma_xxsetaccz): Delete. (mma_xxsetaccz): Change to define_insn. Remove operand 1. Use UNSPECV_MMA_XXSETACCZ. Update comment. * config/rs6000/rs6000.c (rs6000_rtx_costs): Use UNSPECV_MMA_XXSETACCZ. gcc/testsuite/ * gcc.target/powerpc/mma-builtin-6.c: Add second call to xxsetacc built-in. Update instruction counts.
Diffstat (limited to 'c++tools')
0 files changed, 0 insertions, 0 deletions