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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:94ca071cba4078aa783e6c134277515a4e46709e

commit r15-10164-g94ca071cba4078aa783e6c134277515a4e46709e
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Tue Jul 29 11:22:35 2025 -0700

    x86: Transform to "pushq $-1; popq reg" for -Oz

    commit 4c80062d7b8c272e2e193b8074a8440dbb4fe588
    Author: H.J. Lu <hjl.to...@gmail.com>
    Date:   Sun May 25 07:40:29 2025 +0800

        x86: Enable *mov<mode>_(and|or) only for -Oz

    disabled transformation from "movq $-1,reg" to "pushq $-1; popq reg" for
    -Oz.  But for legacy integer registers, the former is 4 bytes and the
    latter is 3 bytes.  Enable such transformation for -Oz.

    gcc/

            PR target/120427
            * config/i386/i386.md (peephole2): Transform "movq $-1,reg" to
            "pushq $-1; popq reg" for -Oz if reg is a legacy integer register.

    gcc/testsuite/

            PR target/120427
            * gcc.target/i386/pr120427-5.c: New test.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>
    (cherry picked from commit 71dae74158d05b75e367629ce21da3f0a2945576)

Reply via email to