From: Joseph Myers <joseph@codesourcery.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>
Cc: Tamar Christina <tamar.christina@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
"jakub@redhat.com" <jakub@redhat.com>,
"rguenther@suse.de" <rguenther@suse.de>,
"law@redhat.com" <law@redhat.com>, nd <nd@arm.com>
Subject: Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible
Date: Wed, 21 Sep 2016 02:05:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1609210027050.13558@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20160920210324.GA8111@ibm-tiger.the-meissners.org>
On Tue, 20 Sep 2016, Michael Meissner wrote:
> It would be better to have a fpclassify<mode>2 pattern, and if it isn't
> defined, then do the machine independent processing. That is the way it is
> done elsewhere.
But note:
* The __builtin_fpclassify function takes arguments for all the possible
FP_* results, so the insn pattern would need to map the results to the
arguments passed to __builtin_fpclassify. (They are documented as needing
to be constants, of type int.)
* Then you want that mapping step to get optimized away in the case of a
comparison fpclassify (...) == FP_SUBNORMAL (for example), or a switch
over possible results. Will the RTL optimizers do that given the insns
structured appropriately?
(For that matter, I don't know if the GIMPLE optimizers will optimize away
such a mapping either, but they clearly should. I've wondered what the
right approach would be for making FLT_ROUNDS properly depend on the
rounding mode - bug 30569,
<https://gcc.gnu.org/ml/gcc/2013-11/msg00317.html> - where the same issues
apply. For boolean operations such as isnan you don't have such
complications.)
* If flag_signaling_nans, then any pattern should work for signaling NaNs.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2016-09-21 0:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 16:21 Tamar Christina
2016-09-12 22:33 ` Joseph Myers
2016-09-13 12:25 ` Tamar Christina
2016-09-12 22:41 ` Joseph Myers
2016-09-13 12:30 ` Tamar Christina
2016-09-13 12:44 ` Joseph Myers
2016-09-15 9:08 ` Tamar Christina
2016-09-15 11:21 ` Wilco Dijkstra
2016-09-15 12:56 ` Joseph Myers
2016-09-15 13:05 ` Joseph Myers
2016-09-12 22:49 ` Joseph Myers
2016-09-13 12:33 ` Tamar Christina
2016-09-13 12:48 ` Joseph Myers
2016-09-13 8:58 ` Jakub Jelinek
2016-09-13 16:16 ` Jeff Law
2016-09-14 8:31 ` Richard Biener
2016-09-15 16:02 ` Jeff Law
2016-09-15 16:28 ` Richard Biener
2016-09-16 19:53 ` Jeff Law
2016-09-20 12:14 ` Tamar Christina
2016-09-20 14:52 ` Jeff Law
2016-09-20 17:52 ` Joseph Myers
2016-09-21 7:13 ` Richard Biener
2016-09-19 22:43 ` Michael Meissner
[not found] ` <41217f33-3861-dbb8-2f11-950ab30a7021@arm.com>
2016-09-20 21:27 ` Michael Meissner
2016-09-21 2:05 ` Joseph Myers [this message]
2016-09-21 8:32 ` Richard Biener
2016-09-12 17:24 Moritz Klammler
2016-09-12 20:08 ` Andrew Pinski
2016-09-13 12:16 Wilco Dijkstra
2016-09-13 16:10 ` Joseph Myers
2016-09-21 14:51 ` Richard Earnshaw (lists)
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=alpine.DEB.2.20.1609210027050.13558@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=law@redhat.com \
--cc=meissner@linux.vnet.ibm.com \
--cc=nd@arm.com \
--cc=rguenther@suse.de \
--cc=tamar.christina@arm.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).