This is the mail archive of the
mailing list for the GCC project.
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.