public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	 David Edelsohn via Gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] Inline IBM long double __gcc_qsub
Date: Thu, 26 Aug 2021 19:07:50 -0400	[thread overview]
Message-ID: <CAGWvnynDMgeSxNzOKDTdmy-RwVnbPGNZYrKHZUu2bgsLW3BVWQ@mail.gmail.com> (raw)
In-Reply-To: <20210826225116.GJ1583@gate.crashing.org>

On Thu, Aug 26, 2021 at 6:53 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> Hi!
>
> On Thu, Aug 26, 2021 at 02:57:35PM -0400, David Edelsohn wrote:
> >             * config/rs6000/ibm-ldouble.c (ldouble_qadd_internal): Rename from
> >             __gcc_qadd.
> >             (__gcc_qadd): Call ldouble_qadd_internal.
> >             (__gcc_qsub): Call ldouble_qadd_internal with second long double
> >             argument negated.
>
> Still looks good, please commit.  Thanks :-)
>
> > +static inline IBM128_TYPE
> > +ldouble_qadd_internal (double a, double aa, double c, double cc)
>
> Does it end up actually inlined, or as one static function that both
> __gcc_qadd and __gcc_qsub use?  This is fine for complexity, it is just
> a simple tail-call jump, just wondering what the compiler thinks is best
> here (it matters in other cases, if the inline function has conditional
> branches for example).

I confirmed that the implementation is inlined in both functions when
compiled with optimization, and the negation is propagated into qsub.

Thanks, David

  reply	other threads:[~2021-08-26 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  0:23 [PATCH] " David Edelsohn
2021-08-26  7:35 ` Andreas Schwab
2021-08-26  7:40 ` Andreas Schwab
2021-08-26 18:57   ` [PATCH v2] " David Edelsohn
2021-08-26 22:51     ` Segher Boessenkool
2021-08-26 23:07       ` David Edelsohn [this message]
2021-08-26 12:15 ` [PATCH] " Segher Boessenkool

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=CAGWvnynDMgeSxNzOKDTdmy-RwVnbPGNZYrKHZUu2bgsLW3BVWQ@mail.gmail.com \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=schwab@linux-m68k.org \
    --cc=segher@kernel.crashing.org \
    /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).