public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/29186] optimzation breaks floating point exception flag reading
Date: Sun, 19 Nov 2006 12:14:00 -0000	[thread overview]
Message-ID: <20061119121438.22162.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29186-1882@http.gcc.gnu.org/bugzilla/>



------- Comment #19 from rguenth at gcc dot gnu dot org  2006-11-19 12:14 -------
The problem is that the division is in no ways special to optimizers.  One
possibility I see would be to introduce either a builtin function or a new
tree-code to access the exception flags.  Of course the fact that flags are
supposed to accumulate doesn't help to simplify things here...

It would be the frontends task to emit compound expressions.  Like instead
of

  D.2529 = x / y;

emit

  { D.2529 = x / y; __builtin_update_except (D.2529); }

(note that __builtin_update_except has to be subject to read/write global
memory to support exception flow across the call-graph).

I bet it's a mess to optimize this stuff correctly without some "clever"
hacks.  Like

  { D.2529 = x / y; *__builtin_flags = __builtin_update_except (D.2529,
*__builtin_flags); }

where we can then make __builtin_update_except const [ideally *__builtin_flags
would just be a special alias tag used and clobbered by the various
exception functions]


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29186


  parent reply	other threads:[~2006-11-19 12:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-22 19:13 [Bug c/29186] New: " kreckel at ginac dot de
2006-09-22 19:24 ` [Bug c/29186] " pinskia at gcc dot gnu dot org
2006-09-22 19:25 ` pinskia at gcc dot gnu dot org
2006-09-22 19:28 ` pinskia at gcc dot gnu dot org
2006-09-22 22:34 ` kreckel at ginac dot de
2006-09-23 21:41 ` kreckel at ginac dot de
2006-09-23 21:52 ` joseph at codesourcery dot com
2006-09-23 22:11 ` kreckel at ginac dot de
2006-09-23 22:19 ` joseph at codesourcery dot com
2006-09-23 22:58 ` kreckel at ginac dot de
2006-09-23 23:02 ` joseph at codesourcery dot com
2006-09-24  0:35 ` pinskia at gmail dot com
2006-09-24 16:51 ` kreckel at ginac dot de
2006-09-25  7:40 ` kreckel at ginac dot de
2006-10-25  7:54 ` kreckel at ginac dot de
2006-10-25  7:57 ` pinskia at gcc dot gnu dot org
2006-10-25 13:22 ` kreckel at ginac dot de
2006-10-31 11:49 ` kreckel at ginac dot de
2006-11-06 22:23 ` kreckel at ginac dot de
2006-11-19 11:22 ` kreckel at ginac dot de
2006-11-19 12:14 ` rguenth at gcc dot gnu dot org [this message]
2009-05-04  6:47 ` kreckel at ginac dot de
2009-12-29 21:48 ` fxcoudert at gcc dot gnu dot org
     [not found] <bug-29186-4@http.gcc.gnu.org/bugzilla/>
2020-11-09 11:55 ` kreckel at ginac dot de
2020-11-09 12:41 ` rguenth at gcc dot gnu.org
2021-06-14 19:06 ` pinskia at gcc dot gnu.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=20061119121438.22162.qmail@sourceware.org \
    --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).