This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve x % y to x VRP optimization (PR tree-optimization/79408)


On Mon, 13 Feb 2017, Jakub Jelinek wrote:

> On Mon, Feb 13, 2017 at 12:24:08PM +0100, Richard Biener wrote:
> > You'd of course allocate it on the stack.  But yeah, sth like your patch
> > works for me.
> 
> Now bootstrapped/regtested successfully on x86_64-linux and i686-linux.
> So is this ok for trunk and perhaps we can add new APIs later?

Yes.

Thanks,
Richard.

> > > 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
> > > 
> > > 	PR tree-optimization/79408
> > > 	* tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
> > > 	case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
> > > 	(simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
> > > 	also if rhs1 is INTEGER_CST.
> > > 
> > > 	* gcc.dg/tree-ssa/pr79408-2.c: New test.
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]