Re: [PATCH ix86] Fix rtx_costs for flag-setting adds

2019-11-24 Thread Bernd Schmidt
On 11/22/19 6:05 PM, Uros Bizjak wrote: > Indeed, this is a different case, an overflow test that results in one > CMP insn. I think, we should check if the second operand is either 0 > (then proceed as it is now), or if the second operand equals first > operand of PLUS insn, then we actually emit

Re: [PATCH ix86] Fix rtx_costs for flag-setting adds

2019-11-22 Thread Uros Bizjak
On Fri, Nov 22, 2019 at 5:39 PM Bernd Schmidt wrote: > > On 11/22/19 3:04 PM, Uros Bizjak wrote: > > On Fri, Nov 22, 2019 at 1:58 PM Bernd Schmidt > > wrote: > >> > >> A patch I posted recently fixes combine to take costs of JUMP_INSNs into > >> account. That causes the pr30315 test to fail with

Re: [PATCH ix86] Fix rtx_costs for flag-setting adds

2019-11-22 Thread Bernd Schmidt
On 11/22/19 3:04 PM, Uros Bizjak wrote: > On Fri, Nov 22, 2019 at 1:58 PM Bernd Schmidt wrote: >> >> A patch I posted recently fixes combine to take costs of JUMP_INSNs into >> account. That causes the pr30315 test to fail with -m32, since the cost >> of an add that sets the flags is estimated too

Re: [PATCH ix86] Fix rtx_costs for flag-setting adds

2019-11-22 Thread Uros Bizjak
On Fri, Nov 22, 2019 at 1:58 PM Bernd Schmidt wrote: > > A patch I posted recently fixes combine to take costs of JUMP_INSNs into > account. That causes the pr30315 test to fail with -m32, since the cost > of an add that sets the flags is estimated too high. > > The following seems to fix it. Boo

[PATCH ix86] Fix rtx_costs for flag-setting adds

2019-11-22 Thread Bernd Schmidt
A patch I posted recently fixes combine to take costs of JUMP_INSNs into account. That causes the pr30315 test to fail with -m32, since the cost of an add that sets the flags is estimated too high. The following seems to fix it. Bootstrapped and tested on x86_64-linux, ok? Bernd * config/i386