public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/42436] VRP should mark non-trapping integer divisions
Date: Thu, 13 Jan 2022 07:13:02 +0000	[thread overview]
Message-ID: <bug-42436-4-yyGWEgNByJ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-42436-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think this was trying to cover things like

  if (d != 0)
    tem = a / d;

where the non-zero range of d on the division cannot be put in global ranges
for its SSA name since that would be incorrect for uses not guarded by the
condition.  So it would ask for a new flag on GIMPLE statements to mark the
division not trapping (like we have TREE_THIS_NOTRAP).  Transforms like
PRE or LIM that do code motion of course have to be careful to not move
the stmt outside of the condition that made it not trapping - something which
would be as hard to guarantee as computing the non-trappingness in the first
place.

So yes, the case that made me file this bug is fixed with global ranges.

Let's close this bug since it's quite unspecific.

  parent reply	other threads:[~2022-01-13  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-42436-4@http.gcc.gnu.org/bugzilla/>
2022-01-12 16:14 ` amacleod at redhat dot com
2022-01-13  7:13 ` rguenth at gcc dot gnu.org [this message]
2009-12-19 19:41 [Bug tree-optimization/42436] New: " rguenth at gcc dot gnu dot org
2009-12-19 19:42 ` [Bug tree-optimization/42436] " rguenth 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-42436-4-yyGWEgNByJ@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).