[Bug target/126433] [17 Regression] 4% slowdown of imagick_r on Zen5 since r17-2486-g60b27d915e1474

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.