public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/24021] VRP does not work with floating points
Date: Tue, 08 Nov 2022 15:54:07 +0000	[thread overview]
Message-ID: <bug-24021-4-RQJzPKMhPL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-24021-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24021

--- Comment #27 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:9d96a286992a0fd9ecdd6a58cd9a413c8c49f477

commit r13-3812-g9d96a286992a0fd9ecdd6a58cd9a413c8c49f477
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Oct 13 08:14:16 2022 +0200

    [PR24021] Implement PLUS_EXPR range-op entry for floats.

    This is the range-op entry for floating point PLUS_EXPR.  It's the
    most intricate range entry we have so far, because we need to keep
    track of rounding and target FP formats.  This will be the last FP
    entry I commit, mostly to avoid disturbing the tree any further, and
    also because what we have so far is enough for a solid VRP.

    So far we track NANs and signs correctly.  We also handle relationals
    (symbolics and numeric), both ordered and unordered, ABS_EXPR and
    NEGATE_EXPR which are used to fold __builtin_isinf, and __builtin_sign
    (__builtin_copysign is coming up).  All in all, I think this provide
    more than enough for basic VRP on floats, as well as provide a basis
    to flesh out the rest if there's interest.

    My goal with this entry is to provide a template for additional binary
    operators, as they tend to follow a similar pattern: handle NANs, do
    the arithmetic while keeping track of rounding, and adjust for NAN.  I
    may abstract the general parts as we do for irange's fold_range and
    wi_fold.

            PR tree-optimization/24021

    gcc/ChangeLog:

            * range-op-float.cc (propagate_nans): New.
            (frange_nextafter): New.
            (frange_arithmetic): New.
            (class foperator_plus): New.
            (floating_op_table::floating_op_table): Add PLUS_EXPR entry.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/vrp-float-plus.c: New test.

  parent reply	other threads:[~2022-11-08 15:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-24021-4@http.gcc.gnu.org/bugzilla/>
2021-08-25 20:29 ` amacleod at redhat dot com
2022-02-07 16:07 ` aldyh at gcc dot gnu.org
2022-02-09 16:35 ` aldyh at gcc dot gnu.org
2022-02-09 17:04 ` law at gcc dot gnu.org
2022-02-09 17:27 ` aldyh at gcc dot gnu.org
2022-02-09 17:29 ` vincent-gcc at vinc17 dot net
2022-02-09 17:31 ` vincent-gcc at vinc17 dot net
2022-02-09 18:30 ` jakub at gcc dot gnu.org
2022-02-09 18:31 ` amacleod at redhat dot com
2022-02-09 18:35 ` amacleod at redhat dot com
2022-02-09 19:05 ` vincent-gcc at vinc17 dot net
2022-02-10  9:33 ` rguenth at gcc dot gnu.org
2022-02-10 12:02 ` jakub at gcc dot gnu.org
2022-02-10 12:21 ` rguenther at suse dot de
2022-02-10 14:17 ` vincent-gcc at vinc17 dot net
2022-04-05 19:34 ` amacleod at redhat dot com
2022-04-06  9:34 ` aldyh at gcc dot gnu.org
2022-04-06  9:46 ` jakub at gcc dot gnu.org
2022-04-06  9:57 ` aldyh at gcc dot gnu.org
2022-04-06 10:30 ` aldyh at gcc dot gnu.org
2022-04-06 10:47 ` jakub at gcc dot gnu.org
2022-08-01 13:27 ` aldyh at gcc dot gnu.org
2022-08-01 14:30 ` aldyh at gcc dot gnu.org
2022-11-08 15:54 ` cvs-commit at gcc dot gnu.org [this message]
2022-11-08 15:57 ` aldyh at gcc dot gnu.org
2022-11-28 22:15 ` pinskia at gcc dot gnu.org
     [not found] <bug-24021-6528@http.gcc.gnu.org/bugzilla/>
2005-10-23 23:43 ` pinskia at gcc dot gnu dot org

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=bug-24021-4-RQJzPKMhPL@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).