https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103069
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Hongyu Wang <hong...@gcc.gnu.org>: https://gcc.gnu.org/g:522f25e90c781d284f8347a04940db8b41c42fd5 commit r12-8136-g522f25e90c781d284f8347a04940db8b41c42fd5 Author: Hongyu Wang <hongyu.w...@intel.com> Date: Wed Apr 13 14:51:36 2022 +0800 i386: Fix infinite loop under -mrelax-cmpxchg-loop [PR 103069] For -mrelax-cmpxchg-loop which relaxes atomic_fetch_<logic> loops, there is a missing set to %eax when compare fails, which would result in infinite loop in some benchmark. Add set to %eax to avoid it. gcc/ChangeLog: PR target/103069 * config/i386/i386-expand.cc (ix86_expand_cmpxchg_loop): Add missing set to target_val at pause label.