Re: [x86 PATCH] Avoid andn and generate shorter not;and with -Oz.

2022-04-13 Thread Michael Matz via Gcc-patches
Hello, On Wed, 13 Apr 2022, Roger Sayle wrote: > The x86 instruction encoding for SImode andn is longer than the > equivalent notl/andl sequence when the source for the not operand > is the same register as the destination. _And_ when no REX prefixes are necessary for the notl,andn, which they

[x86 PATCH] Avoid andn and generate shorter not;and with -Oz.

2022-04-13 Thread Roger Sayle
The x86 instruction encoding for SImode andn is longer than the equivalent notl/andl sequence when the source for the not operand is the same register as the destination. This patch adds post_reload splitters to i386.md to avoid "-mbmi" (which enables andn) increasing code size with "-Oz". One