Re: [PATCH] i386: Fix infinite loop under -mrelax-cmpxchg-loop [PR 103069]

2022-04-13 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 13, 2022 at 9:07 AM Hongyu Wang wrote: > > Hi, > > For -mrelax-cmpxchg-loop which relaxes atomic_fetch_ 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. > > Bootstraped/regtested on x86_64-

[PATCH] i386: Fix infinite loop under -mrelax-cmpxchg-loop [PR 103069]

2022-04-13 Thread Hongyu Wang via Gcc-patches
Hi, For -mrelax-cmpxchg-loop which relaxes atomic_fetch_ 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. Bootstraped/regtested on x86_64-pc-linux-gnu{-m32,} Ok for master? gcc/ChangeLog: PR ta