public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Mike Stump <mikestump@comcast.net>,
	Richard Biener <rguenther@suse.de>,	<gcc-patches@gcc.gnu.org>,
	<nd@arm.com>
Subject: Re: [PATCH] Fix wide_int unsigned division (PR tree-optimization/69546, take 2)
Date: Tue, 02 Feb 2016 15:49:00 -0000	[thread overview]
Message-ID: <87wpqni032.fsf@e105548-lin.cambridge.arm.com> (raw)
In-Reply-To: <20160201202527.GL3017@tucnak.redhat.com> (Jakub Jelinek's	message of "Mon, 1 Feb 2016 21:25:27 +0100")

Jakub Jelinek <jakub@redhat.com> writes:
> On Sat, Jan 30, 2016 at 02:04:45PM +0000, Richard Sandiford wrote:
>> Not sure what to call it.  Maybe canonize_uhwi?  Like canonize, except
>> that it takes a uhwi instead of a length.
>> 
>> > Can that be done as a follow-up?  Certainly it would need
>> > to take the uhwi to store, pointer to the array of hwis, and precision.
>> 
>> Yeah, guess it can wait.
>
> So like this?
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2016-02-01  Jakub Jelinek  <jakub@redhat.com>
>
> 	* wide-int.cc (canonize_uhwi): New function.
> 	(wi::divmod_internal): Use it.
>
> --- gcc/wide-int.cc.jj	2016-01-30 19:03:35.000000000 +0100
> +++ gcc/wide-int.cc	2016-02-01 12:28:23.501519292 +0100
> @@ -118,6 +118,20 @@ canonize (HOST_WIDE_INT *val, unsigned i
>    return 1;
>  }
>  
> +/* VAL[0] is unsigned result of operation.  Canonize it by adding
> +   another 0 block if needed, and return number of blocks needed.  */
> +
> +static inline unsigned int
> +canonize_uhwi (HOST_WIDE_INT *val, unsigned int precision)

s/is unsigned result of operation/is the unsigned result of an operation/

LGTM otherwise, thanks.

Richard

      reply	other threads:[~2016-02-02 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 14:20 [PATCH] Fix wide_int unsigned division (PR tree-optimization/69546) Jakub Jelinek
2016-01-30 12:31 ` Richard Sandiford
2016-01-30 13:15   ` [PATCH] Fix wide_int unsigned division (PR tree-optimization/69546, take 2) Jakub Jelinek
2016-01-30 14:04     ` Richard Sandiford
2016-02-01 20:25       ` Jakub Jelinek
2016-02-02 15:49         ` Richard Sandiford [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpqni032.fsf@e105548-lin.cambridge.arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=mikestump@comcast.net \
    --cc=nd@arm.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).