Re: [PATCH] Add peephole for -Os lock; dec (PR target/70821)

2016-04-28 Thread Uros Bizjak
On Thu, Apr 28, 2016 at 5:42 PM, Jakub Jelinek wrote: > Hi! > > Optimizing atomic_fetch_add followed by comparison into just testing > the flags of the lock; sub is handled by a peephole2, which works usually > fine, except that for -Os we have another peephole2 that transforms > movl $-1, %reg in

[PATCH] Add peephole for -Os lock; dec (PR target/70821)

2016-04-28 Thread Jakub Jelinek
Hi! Optimizing atomic_fetch_add followed by comparison into just testing the flags of the lock; sub is handled by a peephole2, which works usually fine, except that for -Os we have another peephole2 that transforms movl $-1, %reg into orl $-1, %reg and that causes the above mentioned peephole2 not