public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Tejas Joshi <tejasjoshi9673@gmail.com>, gcc-patches@gcc.gnu.org
Cc: hubicka@ucw.cz, joseph@codesourcery.com
Subject: Re: [PATCH] Builtin function roundeven folding implementation
Date: Fri, 23 Aug 2019 12:21:00 -0000	[thread overview]
Message-ID: <ri6lfvkcdju.fsf@suse.cz> (raw)
In-Reply-To: <CACMrGjA3UyUYcShruM-tiT=rqBiSLX9cmSVmpX0G6SfOq_r4EQ@mail.gmail.com>

Hi,

On Fri, Aug 23 2019, Tejas Joshi wrote:
> Hi,
> This is a full patch for the roundeven variants along with
> documentation and additional testcases. The following code also
> conforms to GNU's coding standards.
>
> Thanks,
> Tejas
>
> 2019-08-22  Tejas Joshi  <tejasjoshi9673@gmail.com>
>             Martin Jambor  <mjambor@suse.cz>
>
>         * builtins.c (mathfn_built_in_2): Added CASE_MATHFN for ROUNDEVEN.
>         * builtins.def: Added function definitions for roundeven function
>         variants.
>         * fold-const-call.c (fold_const_call_ss): Added case for roundeven
>         function call.
>         * fold-const.c (negate_mathfn_p): Added case for roundeven function.
>         (tree_call_nonnegative_warnv_p): Added case for roundeven function.
>         (integer_valued_real_call_p): Added case for roundeven function.
>         * real.c (is_even): New function. Returns true if real number is even,
>         otherwise returns false.
>         (is_halfway_below): New function. Returns true if real number is
>         halfway between two integers, else return false.
>         (real_roundeven): New function. Round real number to nearest integer,
>         rounding halfway cases towards even.
>         * real.h (real_value): Added descriptive comments.  Added function
>         declaration for roundeven function.
>         * doc/extend.texi (Other Builtins): List roundeven variants among
>         functions which can be handled as builtins.
>
> gcc/testsuite/ChangeLog:
>
> 2019-08-21  Tejas Joshi  <tejasjoshi9673@gmail.com>
>
>         * gcc.dg/torture/builtin-round-roundeven.c: New test.
>         * gcc.dg/torture/builtin-round-roundevenf128.c: New test.

For the record, I bootstrapped and tested the patch on an x86_64-linux
and it passes both fine.

Joseph, please have a look and hopefully this is the version that I can
commit?

Thanks,

Martin

  reply	other threads:[~2019-08-23 11:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  3:40 Tejas Joshi
2019-07-29 16:49 ` Martin Jambor
2019-08-09 21:26 ` Joseph Myers
2019-08-14  7:24   ` Tejas Joshi
2019-08-21 11:52     ` Martin Jambor
2019-08-21 12:48       ` Joseph Myers
2019-08-21 19:10         ` Martin Jambor
2019-08-21 20:50           ` Joseph Myers
2019-08-22 14:40             ` Martin Jambor
2019-08-22 15:52               ` Joseph Myers
2019-08-22 21:39                 ` Tejas Joshi
2019-08-23 12:21                   ` Martin Jambor [this message]
2019-08-23 21:24                   ` Joseph Myers
2019-08-25 20:28                     ` Tejas Joshi
2020-02-12  6:20                     ` [PATCH] real: Fix roundeven on inf/nan [PR93663] Jakub Jelinek
2020-02-12 20:56                       ` Joseph Myers

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=ri6lfvkcdju.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=joseph@codesourcery.com \
    --cc=tejasjoshi9673@gmail.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).