Re: [PATCH] x86: Shrink writing 0/-1 to memory using and/or with -Oz.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Tue, Dec 21, 2021 at 4:08 PM Roger Sayle wrote: > > > This is the second part of my fix to PR target/103773 where -Oz shouldn't > use push/pop on x86 to shrink writing small integer constants to memory. > Instead clang uses "andl $0, mem" for writing zero, and "orl $-1, mem" > when writing -1 t

[PATCH] x86: Shrink writing 0/-1 to memory using and/or with -Oz.

2021-12-21 Thread Roger Sayle
This is the second part of my fix to PR target/103773 where -Oz shouldn't use push/pop on x86 to shrink writing small integer constants to memory. Instead clang uses "andl $0, mem" for writing zero, and "orl $-1, mem" when writing -1 to memory when using -Oz. This patch implements this via peepho