Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jeff Law
On 04/19/2017 08:59 AM, Eric Botcazou wrote: I know this attempts to be a copy of what is used elsewhere, but at least there it is a result of wi::sub etc. Wouldn't it be simpler to if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) min_ovf = 1; else if (sgn == UNSIGNED && w

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 04:59:50PM +0200, Eric Botcazou wrote: > > I know this attempts to be a copy of what is used elsewhere, but > > at least there it is a result of wi::sub etc. > > Wouldn't it be simpler to > > if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) > > min_ovf = 1

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Eric Botcazou
> I know this attempts to be a copy of what is used elsewhere, but > at least there it is a result of wi::sub etc. > Wouldn't it be simpler to > if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) > min_ovf = 1; > else if (sgn == UNSIGNED && wi::ne_p (min_op1, 0)) > min_ovf =

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 08:20:40AM +0200, Eric Botcazou wrote: > --- tree-vrp.c(revision 246960) > +++ tree-vrp.c(working copy) > @@ -2461,7 +2461,19 @@ extract_range_from_binary_expr_1 (value_ > else if (min_op0) > wmin = min_op0; > else if (min_op1) > -

[patch] Fix PR tree-optimization/80426

2017-04-18 Thread Eric Botcazou
Hi, this is a regression on the mainline, but the underlying issue is present on the branches too, and similar to PR tree-optimization/79666, but this time for the invariant part instead of the symbolic one. In extract_range_from_binary_expr_1, when the invariant part of the symbolic computati