Re: [PATCH] i386: Optimize blsi followed by comparison [PR98567]

2021-01-07 Thread Uros Bizjak via Gcc-patches
On Thu, Jan 7, 2021 at 10:14 AM Uros Bizjak wrote: > > On Thu, Jan 7, 2021 at 9:56 AM Jakub Jelinek wrote: > > > > Hi! > > > > The BLSI instruction sets SF and ZF based on the result and clears OF. > > CF is set to something unrelated. > > > > The following patch optimizes BLSI followed by compar

Re: [PATCH] i386: Optimize blsi followed by comparison [PR98567]

2021-01-07 Thread Uros Bizjak via Gcc-patches
On Thu, Jan 7, 2021 at 9:56 AM Jakub Jelinek wrote: > > Hi! > > The BLSI instruction sets SF and ZF based on the result and clears OF. > CF is set to something unrelated. > > The following patch optimizes BLSI followed by comparison, so we don't need > to emit a TEST insn in between. > > Bootstrap

[PATCH] i386: Optimize blsi followed by comparison [PR98567]

2021-01-07 Thread Jakub Jelinek via Gcc-patches
Hi! The BLSI instruction sets SF and ZF based on the result and clears OF. CF is set to something unrelated. The following patch optimizes BLSI followed by comparison, so we don't need to emit a TEST insn in between. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2021-01-0