public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "danglin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/17578] Missed optimization--failure of gcc.c-torture/execute/ieee/compare-fp-3.c at -O1 and above
Date: Tue, 21 Sep 2004 04:33:00 -0000	[thread overview]
Message-ID: <20040921043315.2347.qmail@sourceware.org> (raw)
In-Reply-To: <20040921015638.17578.danglin@gcc.gnu.org>


------- Additional Comments From danglin at gcc dot gnu dot org  2004-09-21 04:33 -------
> The generated code for this function is ok.  It's just not optimized.
> As far as I can tell, neither comparison should trap, so -ftrapping-math
> shouldn't affect the optimization.

I take this back.  The compares can trap if x or y is a signalling NaN.
Thus, the compares can't be optimized without -fno-trapping-math.

I see gcc.c-torture/execute/ieee/compare-fp-3.x tries to set -fno-trapping-math
but it doesn't work.  For example,

Executing on host: /home/dave/gnu/gcc-4.0/objdir/gcc/xgcc -B/home/dave/gnu/gcc-4
.0/objdir/gcc/ /home/dave/gnu/gcc-4.0/gcc/gcc/testsuite/gcc.c-torture/execute/ie
ee/compare-fp-3.c  -w  -O1  -ffloat-store  -lm   -o /home/dave/gnu/gcc-4.0/objdi
r/gcc/testsuite/compare-fp-3.x1    (timeout = 300)
PASS: gcc.c-torture/execute/ieee/compare-fp-3.c compilation,  -O1
PASS: gcc.c-torture/execute/ieee/compare-fp-3.c execution,  -O1

On x86, link_error0 get optimized away in the compare-fp-3.c.16.life
pass.

There seems to be a bunch of bugs here.  We have link_error0 being
optimized away in test2 and test3 during tree optimization when
-fno-trapping-math is not set.  link_error0 is also being optimized
away in the life pass on x86 with -fno-trapping-math not set.  The
test isn't using the -fno-trapping-math.


-- 


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


  reply	other threads:[~2004-09-21  4:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-21  1:56 [Bug tree-optimization/17578] New: " danglin at gcc dot gnu dot org
2004-09-21  4:33 ` danglin at gcc dot gnu dot org [this message]
2004-09-21  4:35 ` [Bug tree-optimization/17578] " pinskia at gcc dot gnu dot org
2004-09-21  6:20 ` dave at hiauly1 dot hia dot nrc dot ca
2004-09-23  3:18 ` danglin at gcc dot gnu dot org
2004-12-23  2:11 ` pinskia at gcc dot gnu dot org
2004-12-26 20:49 ` cvs-commit at gcc dot gnu dot org
2004-12-26 21:00 ` danglin at gcc dot gnu dot org
2005-01-07 14:15 ` pinskia at gcc dot gnu dot org
2005-01-15  5:26 ` 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=20040921043315.2347.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).