Drop Z from X + Z < Y + Z

Jakub Jelinek jakub@redhat.com
Fri Apr 28 12:56:00 GMT 2017


On Fri, Apr 28, 2017 at 02:25:55PM +0200, Richard Biener wrote:
> On Fri, Apr 28, 2017 at 1:35 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> > Hello,
> >
> > surprisingly, this did not cause any Wstrict-overflow failure. Some of it
> > sounds more like reassoc's job, but it is convenient to handle simple cases
> > in match.pd. I think we could wait until there are reports of regressions
> > related to register pressure before adding single_use tests.
> >
> > For a std::vector<long> v, we now simplify v.size()==v.capacity() to a
> > single comparison (long)finish==(long)end_storage (I guess I could still try
> > to drop the casts to consider it really done). Handling
> > v.size()<v.capacity() seems much harder, because of C++'s questionable
> > choice to use unsigned types. I may still be able to remove the divisions,
> > I'll see if I can sprinkle some 'convert' in recent transformations.
> >
> > Bootstrap+regtest on powerpc64le-unknown-linux-gnu.
> 
> +(for cmp (eq ne minus)
> 
> Fat fingered 'minus' (in all places) or did you want to get fancy?
> (the transforms
> look valid even for cmp == minus)  Maybe adjust comments to reflect this.

If minus is intended, it might be better to use op instead of cmp for the
iterator.

	Jakub



More information about the Gcc-patches mailing list