Re: [PATCH] Improve code generation of v += (c == 0) etc. on x86 (PR target/92140)

2019-10-19 Thread Uros Bizjak
On Sat, Oct 19, 2019 at 7:54 AM Jakub Jelinek wrote: > > Hi! > > As mentioned in the PR, x == 0 can be equivalently tested as x < 1U > and the latter form has the advantage that it sets the carry flag and if it > is consumed by an instruction that can directly use the carry flag, it is a > win. >

[PATCH] Improve code generation of v += (c == 0) etc. on x86 (PR target/92140)

2019-10-18 Thread Jakub Jelinek
Hi! As mentioned in the PR, x == 0 can be equivalently tested as x < 1U and the latter form has the advantage that it sets the carry flag and if it is consumed by an instruction that can directly use the carry flag, it is a win. The following patch adds a couple of (pre-reload only) define_insn_an