public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wolfgang Gellerich <gellerich@de.ibm.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] middle end, s390: optimization for builtin isnan
Date: Tue, 07 Aug 2007 14:03:00 -0000	[thread overview]
Message-ID: <OF9BDC2098.614F0753-ONC1257330.002FB977-42257330.004CD302@de.ibm.com> (raw)
In-Reply-To: <m3myx4p22j.fsf@localhost.localdomain>

Ian Lance Taylor <iant@google.com> wrote on 07.08.2007 03:26:28:

> Wolfgang Gellerich<gellerich@de.ibm.com> writes:
>
> > This patch introduces a new target hook allowing to optimize the
> > implementation of builtin function isnan on platforms like s390 where
> > arithmetic operations set the condition code when the result was NaN.
It
> > bootstraps on Intel and s390 and does not introduce new test case
failures.
>
> It seems to me that we should handle this by treating isnan as a unary
> operator which may be implemented in the MD file.  E.g., implement
> isnansf1 and isnandf1, with optabs.  I don't see why a target hook is
> the right thing here.

Hi Ian, many for your comments! However, what would we gain from
implementing isnan as operator, and what do you consider as major
disadvantages of using the new target hook? The reason why I chose the
implementation I sent is that the current implementation was hard-wired at
a rather early stage. I thought that there might be a reason for this, it
may enable further optimizations in some cases or on some platforms. Also,
the target hook approach has the advantage that is allows s390 (and other
platforms) to add their optimizations while not causing any changes for
platforms that are happy with the current implementation.

Best regards, Wolfgang

  reply	other threads:[~2007-08-07 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 12:54 Wolfgang Gellerich
2007-08-07  1:27 ` Ian Lance Taylor
2007-08-07 14:03   ` Wolfgang Gellerich [this message]
2007-08-07 16:29     ` Ian Lance Taylor
2007-08-09 13:46       ` Wolfgang Gellerich

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=OF9BDC2098.614F0753-ONC1257330.002FB977-42257330.004CD302@de.ibm.com \
    --to=gellerich@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    /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).