Re: [PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-04 Thread Richard Biener
On Fri, 4 Dec 2015, Jakub Jelinek wrote: > On Fri, Dec 04, 2015 at 09:15:25AM +0100, Richard Biener wrote: > > > + modified one, up to and including last_bb, to be executed even if > > > + they would not be in the original program. If the value ranges of > > > + assignment lhs' in those bbs we

Re: [PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-04 Thread Jakub Jelinek
On Fri, Dec 04, 2015 at 09:15:25AM +0100, Richard Biener wrote: > > +modified one, up to and including last_bb, to be executed even if > > +they would not be in the original program. If the value ranges of > > +assignment lhs' in those bbs were dependent on the conditions > > +guar

Re: [PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-04 Thread Richard Biener
On Thu, 3 Dec 2015, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, maybe_optimize_range_tests considers basic blocks > with not just the final GIMPLE_COND (or for last_bb store feeding into PHI), > but also assign stmts that don't trap, don't have side-effects and where > the SSA_NAMEs th

[PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)

2015-12-03 Thread Jakub Jelinek
Hi! As mentioned in the PR, maybe_optimize_range_tests considers basic blocks with not just the final GIMPLE_COND (or for last_bb store feeding into PHI), but also assign stmts that don't trap, don't have side-effects and where the SSA_NAMEs they set are used only in their own bb. Now, if we decid