[Bug target/102976] MMA test case emits wrong code when building a vector pair

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 15 06:00:45 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102976

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Peter Bergner
<bergner@gcc.gnu.org>:

https://gcc.gnu.org/g:7729d2c96d5eac9537c78d368bbc037bea13f988

commit r10-10399-g7729d2c96d5eac9537c78d368bbc037bea13f988
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Tue Nov 16 12:14:22 2021 -0600

    rs6000: MMA test case emits wrong code when building a vector pair
[PR102976]

    PR102976 shows a test case where we generate wrong code when building
    a vector pair from 2 vector registers.  The bug here is that with unlucky
    register assignments, we can clobber one of the input operands before
    we write both registers of the output operand.  The solution is to use
    early-clobbers in the assemble pair and accumulator patterns.

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

    gcc/
            PR target/102976
            * config/rs6000/mma.md (*vsx_assemble_pair): Add early-clobber for
            output operand.
            (*mma_assemble_acc): Likewise.

    gcc/testsuite/
            PR target/102976
            * gcc.target/powerpc/pr102976.c: New test.

    (cherry picked from commit 4cdf7db9a39d18bd536d816a5751d4d3cf23808b)


More information about the Gcc-bugs mailing list