Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-09 Thread Richard Biener
On April 9, 2016 1:29:51 PM GMT+02:00, Jakub Jelinek wrote: >On Sat, Apr 09, 2016 at 01:21:06PM +0200, Richard Biener wrote: >> To followup myself here - we can also make sure the function doesn't >become pure/const. >> >> Similar issues exist with pure/const functions with ops

Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-09 Thread Jakub Jelinek
On Sat, Apr 09, 2016 at 01:21:06PM +0200, Richard Biener wrote: > To followup myself here - we can also make sure the function doesn't become > pure/const. > > Similar issues exist with pure/const functions with ops with undefined > overflow (and code gen taking advantage of that). > So it's

Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-09 Thread Richard Biener
On April 9, 2016 1:17:51 PM GMT+02:00, Richard Biener wrote: >On April 8, 2016 10:00:58 PM GMT+02:00, Jakub Jelinek > wrote: >>On Fri, Apr 08, 2016 at 09:14:33PM +0200, Richard Biener wrote: >>> Hmm, I think this means GIMPLE_has_side_effects is to be fixed

Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-09 Thread Richard Biener
On April 8, 2016 10:00:58 PM GMT+02:00, Jakub Jelinek wrote: >On Fri, Apr 08, 2016 at 09:14:33PM +0200, Richard Biener wrote: >> Hmm, I think this means GIMPLE_has_side_effects is to be fixed then. > >> Note that honza had plans to compute things like 'uses FP' and >'contains

Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-08 Thread Jakub Jelinek
On Fri, Apr 08, 2016 at 09:14:33PM +0200, Richard Biener wrote: > Hmm, I think this means GIMPLE_has_side_effects is to be fixed then. > Note that honza had plans to compute things like 'uses FP' and 'contains > arith with undefined overflow' and propagate that alongside pure/const-ness. > >

Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-08 Thread Richard Biener
On April 8, 2016 7:16:48 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >The following testcase is miscompiled by tree-ssa-ifcombine.c, because >it sees: > if (_5 != 0) >goto ; > else >goto ; > > : > iftmp.0_12 = foo.part.0 (_11, _5); > _14 = iftmp.0_12 > 0; > _15 =

[PATCH] Fix ifcombine (PR tree-optimization/70586)

2016-04-08 Thread Jakub Jelinek
Hi! The following testcase is miscompiled by tree-ssa-ifcombine.c, because it sees: if (_5 != 0) goto ; else goto ; : iftmp.0_12 = foo.part.0 (_11, _5); _14 = iftmp.0_12 > 0; _15 = (int) _14; if (_5 != 0) goto ; else goto ; and bb_no_side_effects_p says that bb5