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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Peter Bergner
<[email protected]>:

https://gcc.gnu.org/g:eeb72f26ea7e70baadf2e3b9e89e8f7055fec0a9

commit r12-10790-geeb72f26ea7e70baadf2e3b9e89e8f7055fec0a9
Author: Peter Bergner <[email protected]>
Date:   Fri Aug 23 11:45:40 2024 -0500

    rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

    Our power8 swap optimization pass has some special handling for optimizing
    swaps of TImode variables.  The test case reported in bugzilla uses a call
    to  __atomic_compare_exchange, which introduces a variable of PTImode and
    that does not get the same treatment as TImode leading to wrong code
    generation.  The simple fix is to treat PTImode identically to TImode.

    2024-08-23  Peter Bergner  <[email protected]>

    gcc/
            PR target/116415
            * config/rs6000/rs6000.h (TI_OR_PTI_MODE): New define.
            * config/rs6000/rs6000-p8swap.cc (rs6000_analyze_swaps): Use it to
            handle PTImode identically to TImode.

    gcc/testsuite/
            PR target/116415
            * gcc.target/powerpc/pr116415.c: New test.

    (cherry picked from commit 6e68c3df1540c5bafbb47343698bf4e270333fdb)

Reply via email to