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, 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?

> > 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


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