Re: [PATCH] Optimize a >= 0 && a < b if VR info says b >= 0 (PR tree-optimization/77664)

2016-10-07 Thread Richard Biener
On Thu, 6 Oct 2016, Jakub Jelinek wrote: > Hi! > > For signed a, if we see a >= 0 && a < b and from VR know that b >= 0, > we can optimize those 2 comparisons into one unsigned - > (unsigned) a < (unsigned) b. Similarly for a < 0 || a > b (and also > for a <= b in the first and a >= b in the

Re: [PATCH] Optimize a >= 0 && a < b if VR info says b >= 0 (PR tree-optimization/77664)

2016-10-06 Thread Jakub Jelinek
On Thu, Oct 06, 2016 at 11:55:00PM +0200, Marc Glisse wrote: > On Thu, 6 Oct 2016, Jakub Jelinek wrote: > > >For signed a, if we see a >= 0 && a < b and from VR know that b >= 0, > >we can optimize those 2 comparisons into one unsigned - > >(unsigned) a < (unsigned) b. Similarly for a < 0 || a >

Re: [PATCH] Optimize a >= 0 && a < b if VR info says b >= 0 (PR tree-optimization/77664)

2016-10-06 Thread Marc Glisse
On Thu, 6 Oct 2016, Jakub Jelinek wrote: For signed a, if we see a >= 0 && a < b and from VR know that b >= 0, we can optimize those 2 comparisons into one unsigned - (unsigned) a < (unsigned) b. Similarly for a < 0 || a > b (and also for a <= b in the first and a >= b in the second). I

[PATCH] Optimize a >= 0 && a < b if VR info says b >= 0 (PR tree-optimization/77664)

2016-10-06 Thread Jakub Jelinek
Hi! For signed a, if we see a >= 0 && a < b and from VR know that b >= 0, we can optimize those 2 comparisons into one unsigned - (unsigned) a < (unsigned) b. Similarly for a < 0 || a > b (and also for a <= b in the first and a >= b in the second). The patch implements it in the reassoc