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][PING] Fix PR19807 and PR19639


On Tue, May 10, 2005 at 05:33:18PM +0200, Richard Guenther wrote:
> ! 	      /* Try if delta is a multiple of step.  */
> ! 	      tree mod = int_const_binop (TRUNC_MOD_EXPR, delta, step, 0);
> ! 	      if (!integer_zerop (mod))
> ! 		continue;
>   
> ! 	      delta = int_const_binop (EXACT_DIV_EXPR, delta, step, 0);

You can get both quotient and remainder from div_and_round_double.
You then test remainder against zero directly and create a new 
constant node with the itype you extract.

You can do this as a followup patch if you like.

Otherwise ok.



r~


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