Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-31 Thread Aldy Hernandez
Sure. No problem. Thanks for looking at this. Aldy On Fri, May 31, 2019, 17:48 Marc Glisse wrote: > On Fri, 31 May 2019, Aldy Hernandez wrote: > > > I've never been too happy with the too large due to cast warnings. For > that > > matter, it seems like a lot of the unbounded alloca warning vari

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-31 Thread Marc Glisse
On Fri, 31 May 2019, Aldy Hernandez wrote: I've never been too happy with the too large due to cast warnings. For that matter, it seems like a lot of the unbounded alloca warning variants were artifacts of the way we couldn't get precise ranges after vrp asserts had disappeared and we were tryin

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-31 Thread Aldy Hernandez
I've never been too happy with the too large due to cast warnings. For that matter, it seems like a lot of the unbounded alloca warning variants were artifacts of the way we couldn't get precise ranges after vrp asserts had disappeared and we were trying to guess at what the actual range in the ori

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-31 Thread Richard Biener
On Wed, May 29, 2019 at 11:28 PM Marc Glisse wrote: > > On Mon, 20 May 2019, Richard Biener wrote: > > > On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: > >> > >> On Mon, 20 May 2019, Richard Biener wrote: > >> > >>> On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: > > Hello, > >

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-30 Thread Jeff Law
On 5/29/19 3:27 PM, Marc Glisse wrote: > On Mon, 20 May 2019, Richard Biener wrote: > >> On Mon, May 20, 2019 at 10:16 AM Marc Glisse >> wrote: >>> >>> On Mon, 20 May 2019, Richard Biener wrote: >>> On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: > > Hello, > > 2 pie

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-29 Thread Marc Glisse
On Mon, 20 May 2019, Richard Biener wrote: On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: On Mon, 20 May 2019, Richard Biener wrote: On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: Hello, 2 pieces: - the first one handles the case where the denominator is negative. It doesn't h

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-29 Thread Jeff Law
On 5/29/19 1:21 AM, Richard Biener wrote: > On Tue, May 28, 2019 at 5:34 PM Martin Sebor wrote: >> >> On 5/21/19 3:53 AM, Richard Biener wrote: >>> On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: On 5/20/19 3:16 AM, Richard Biener wrote: > On Mon, May 20, 2019 at 10:16 AM Marc G

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-29 Thread Richard Biener
On Tue, May 28, 2019 at 5:34 PM Martin Sebor wrote: > > On 5/21/19 3:53 AM, Richard Biener wrote: > > On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: > >> > >> On 5/20/19 3:16 AM, Richard Biener wrote: > >>> On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: > > On Mon, 20 May 201

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-28 Thread Martin Sebor
On 5/21/19 3:53 AM, Richard Biener wrote: On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: On 5/20/19 3:16 AM, Richard Biener wrote: On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: On Mon, 20 May 2019, Richard Biener wrote: On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: Hel

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-27 Thread Aldy Hernandez
I don't know if there's the -Walloca pass would benefit from merging with any of the others or vice versa, but superficially it seems like it might be worth thinking about integrating the -Walloc-larger-than warnings into the -Walloca pass, if only to keep similar functionality in the same plac

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-27 Thread Richard Biener
On Mon, May 27, 2019 at 3:09 PM Aldy Hernandez wrote: > > > > On 5/21/19 5:53 AM, Richard Biener wrote: > > On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: > >> > >> On 5/20/19 3:16 AM, Richard Biener wrote: > >>> On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: > > On Mon, 20 M

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-27 Thread Aldy Hernandez
On 5/21/19 5:53 AM, Richard Biener wrote: On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: On 5/20/19 3:16 AM, Richard Biener wrote: On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: On Mon, 20 May 2019, Richard Biener wrote: On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote:

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-21 Thread Richard Biener
On Tue, May 21, 2019 at 4:13 AM Martin Sebor wrote: > > On 5/20/19 3:16 AM, Richard Biener wrote: > > On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: > >> > >> On Mon, 20 May 2019, Richard Biener wrote: > >> > >>> On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: > > Hello, >

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Martin Sebor
On 5/20/19 3:16 AM, Richard Biener wrote: On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: On Mon, 20 May 2019, Richard Biener wrote: On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: Hello, 2 pieces: - the first one handles the case where the denominator is negative. It doesn't hap

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Jeff Law
On 5/20/19 11:37 AM, Marc Glisse wrote: > On Mon, 20 May 2019, Jeff Law wrote: > >> On 5/20/19 3:16 AM, Richard Biener wrote: >>> Given code sinkings obvious effects on SSA value-range representation >>> it may make sense to add another instance of that pass earlier. >> There is an early pass alre

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Marc Glisse
On Mon, 20 May 2019, Jeff Law wrote: On 5/20/19 3:16 AM, Richard Biener wrote: Given code sinkings obvious effects on SSA value-range representation it may make sense to add another instance of that pass earlier. There is an early pass already. IIUC Richard was talking about adding an early

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Jeff Law
On 5/20/19 2:04 AM, Richard Biener wrote: > On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: >> >> Hello, >> >> 2 pieces: >> >> - the first one handles the case where the denominator is negative. It >> doesn't happen often with exact_div, so I don't handle it everywhere, but >> this one looked t

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Jeff Law
On 5/20/19 3:16 AM, Richard Biener wrote: > On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: >> >> On Mon, 20 May 2019, Richard Biener wrote: >> >>> On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: Hello, 2 pieces: - the first one handles the case where the deno

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Richard Biener
On Mon, May 20, 2019 at 10:16 AM Marc Glisse wrote: > > On Mon, 20 May 2019, Richard Biener wrote: > > > On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: > >> > >> Hello, > >> > >> 2 pieces: > >> > >> - the first one handles the case where the denominator is negative. It > >> doesn't happen oft

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Marc Glisse
On Mon, 20 May 2019, Richard Biener wrote: On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: Hello, 2 pieces: - the first one handles the case where the denominator is negative. It doesn't happen often with exact_div, so I don't handle it everywhere, but this one looked trivial - handle t

Re: Simplify more EXACT_DIV_EXPR comparisons

2019-05-20 Thread Richard Biener
On Sun, May 19, 2019 at 6:16 PM Marc Glisse wrote: > > Hello, > > 2 pieces: > > - the first one handles the case where the denominator is negative. It > doesn't happen often with exact_div, so I don't handle it everywhere, but > this one looked trivial > > - handle the case where a pointer differe

Simplify more EXACT_DIV_EXPR comparisons

2019-05-19 Thread Marc Glisse
Hello, 2 pieces: - the first one handles the case where the denominator is negative. It doesn't happen often with exact_div, so I don't handle it everywhere, but this one looked trivial - handle the case where a pointer difference is cast to an unsigned type before being compared to a const