Re: [PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-18 Thread Richard Biener via Gcc-patches
On Thu, Feb 18, 2021 at 1:21 PM Hans-Peter Nilsson wrote: > > > From: Richard Biener via Gcc-patches > > Date: Thu, 18 Feb 2021 11:12:26 +0100 > > > On Thu, Feb 18, 2021 at 12:35 AM Hans-Peter Nilsson via Gcc-patches > > wrote: > > > > > > If we're not going to eliminate the clz, it's better for

Re: [PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-18 Thread Hans-Peter Nilsson via Gcc-patches
> From: Richard Biener via Gcc-patches > Date: Thu, 18 Feb 2021 11:12:26 +0100 > On Thu, Feb 18, 2021 at 12:35 AM Hans-Peter Nilsson via Gcc-patches > wrote: > > > > If we're not going to eliminate the clz, it's better for the > > comparison to use that result than its input, so we don't > > ext

Re: [PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-18 Thread Richard Biener via Gcc-patches
On Thu, Feb 18, 2021 at 11:22 AM Jakub Jelinek wrote: > > On Thu, Feb 18, 2021 at 11:12:26AM +0100, Richard Biener via Gcc-patches > wrote: > > On Thu, Feb 18, 2021 at 12:35 AM Hans-Peter Nilsson via Gcc-patches > > wrote: > > > > > > If we're not going to eliminate the clz, it's better for the

Re: [PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-18 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 18, 2021 at 11:12:26AM +0100, Richard Biener via Gcc-patches wrote: > On Thu, Feb 18, 2021 at 12:35 AM Hans-Peter Nilsson via Gcc-patches > wrote: > > > > If we're not going to eliminate the clz, it's better for the > > comparison to use that result than its input, so we don't > > exte

Re: [PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-18 Thread Richard Biener via Gcc-patches
On Thu, Feb 18, 2021 at 12:35 AM Hans-Peter Nilsson via Gcc-patches wrote: > > If we're not going to eliminate the clz, it's better for the > comparison to use that result than its input, so we don't > extend the lifetime of the input. Also, an additional use > of the result is more likely cheape

[PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-17 Thread Hans-Peter Nilsson via Gcc-patches
If we're not going to eliminate the clz, it's better for the comparison to use that result than its input, so we don't extend the lifetime of the input. Also, an additional use of the result is more likely cheaper than a compare of the input, in particular considering that the clz may have made av