On Mon, Jan 26, 2015 at 04:06:11PM +0100, Richard Biener wrote: > > This is the 2nd thing I came up with after looking at PR64277. > VRP does a poor job computing value-ranges of unrolled loop IVs > thus a very simple thing to do is to factor in previous VRP results > by intersecting what VRP2 computes with recorded SSA name range infos > (that also makes errors in those more likely to pop up... :/). > > This reduces the number of array bound warnings I get from the testcase > but doesn't fix it completely. It also ends up with saner value-ranges. > > Bootstrapped and tested on x86_64-unknown-linux-gnu (with one > libstdc++ runtime failure which I am now checking if caused by the patch, > and thus likely an existing latent issue with SSA name range info). > > Ok for trunk? Or should I delay this to GCC 6?
Does this work even without the other patch? What do you think about Ilya's patch to set TREE_NO_WARNING in the unrolled iterations where we had to keep the exit check? > 2015-01-26 Richard Biener <rguent...@suse.de> > > PR tree-optimization/64277 > * tree-vrp.c (update_value_range): Intersect the range with > old recorded SSA name range information. Jakub