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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <[email protected]>:

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

commit r17-2740-gbaf658d80576de061320f136945fff90359ff7fd
Author: Uros Bizjak <[email protected]>
Date:   Tue Jul 28 08:41:57 2026 +0200

    i386: Avoid XCHGB %rH, %rL in bswaphi2 on non-pentium4 targets [PR126433]

    XCHGB has higher latency than ROLW for non-pentium4 targets, so it
    should be avoided. Switch from the preferred_for_size/preferred_for_speed
    attributes to the "enabled" attribute to hard-disable unwanted
alternatives.

            PR target/126433

    gcc/ChangeLog:

            * config/i386/i386.md (*bswaphi2_movbe) Use enabled attribute.
            Remove preferred_for_speed and preferred_for_size attributes.
            (*bswaphi2): Ditto.
            (*bswaphisi2_lowpart): Ditto.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/xchg-1.c: Scan for ROL instead of XCHG.
            * gcc.target/i386/xchg-2.c: Use -O2 -march=pentium4 to emit XCHG.

Reply via email to