public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/32183] reassoc can more extra calculations into a loop
Date: Sat, 02 Jun 2007 00:21:00 -0000 [thread overview]
Message-ID: <20070602002127.6569.qmail@sourceware.org> (raw)
In-Reply-To: <bug-32183-682@http.gcc.gnu.org/bugzilla/>
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-06-02 00:21 -------
(In reply to comment #5)
> We moved a multiply, which is outside of loop in source, into
> a loop. I don't think gcc should do it with any optimization
> flag, including -ffast-math.
Yes but this is still just a missed optimization rather than a wrong code
issue.
reassoc2 is not checking if it is going to move stuff in the loop.
--- foo.c.107t.recip 2007-06-01 17:18:04.000000000 -0700
+++ foo.c.108t.reassoc2 2007-06-01 17:18:04.000000000 -0700
@@ -178,15 +178,15 @@ cmn_prior (incep, varnorm, nfr, ceplen,
goto <bb 8> (<L64>);
<L102>:;
- D.1857_156 = nframe_lsm.64_93 + 1;
D.1858_191 = (unsigned int) nfr_17(D);
D.1859_190 = D.1858_191 + 0x0ffffffff;
D.1860_52 = (int32) D.1859_190;
+ D.1857_156 = nframe_lsm.64_93 + 1;
nframe_lsm.64_35 = D.1857_156 + D.1860_52;
- D.1861_38 = nframe_lsm.64_93 + 1;
D.1862_37 = (unsigned int) nfr_17(D);
D.1863_155 = D.1862_37 + 0x0ffffffff;
D.1864_6 = (int) D.1863_155;
+ D.1861_38 = nframe_lsm.64_93 + 1;
nframe.8_36 = D.1861_38 + D.1864_6;
# nframe_73 = VDEF <nframe_134>
nframe = nframe_lsm.64_35;
@@ -217,7 +217,7 @@ cmn_prior (incep, varnorm, nfr, ceplen,
D.1890_104 = (unsigned int) i_14;
# VUSE <SMT.14_63>
D.1709_89 = MEM[base: sum.6_87, index: D.1890_104, step: 4];
- D.1710_90 = D.1709_89 * sf_77;
+ D.1710_90 = sf_77 * D.1709_89;
D.1891_102 = (unsigned int) i_14;
# SMT.14_183 = VDEF <SMT.14_63>
MEM[base: cur_mean.3_82, index: D.1891_102, step: 4] = D.1710_90;
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2007-06-02 00:21:27
date| |
Summary|-fast-math moves multiply |reassoc can more extra
|into a loop |calculations into a loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32183
next prev parent reply other threads:[~2007-06-02 0:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 21:35 [Bug tree-optimization/32183] New: Gcc 4.3 revision 125030 miscompiles 482.sphinx3 in SPEC CPU 2006 hjl at lucon dot org
2007-06-01 22:13 ` [Bug tree-optimization/32183] " hjl at lucon dot org
2007-06-01 23:09 ` hjl at lucon dot org
2007-06-01 23:13 ` rakdver at gcc dot gnu dot org
2007-06-02 0:01 ` [Bug tree-optimization/32183] -fast-math causes a missed optimization to happen pinskia at gcc dot gnu dot org
2007-06-02 0:11 ` hjl at lucon dot org
2007-06-02 0:21 ` pinskia at gcc dot gnu dot org [this message]
2007-06-02 0:24 ` [Bug tree-optimization/32183] reassoc can more extra calculations into a loop pinskia at gcc dot gnu dot org
2007-06-02 0:26 ` pinskia at gcc dot gnu dot org
2007-06-02 0:38 ` [Bug tree-optimization/32183] [4.3 Regression] reassoc2 " pinskia at gcc dot gnu dot org
2007-06-02 0:43 ` hjl at lucon dot org
2007-06-02 0:46 ` pinskia at gcc dot gnu dot org
2007-06-02 0:56 ` pinskia at gcc dot gnu dot org
2007-06-02 0:59 ` pinskia at gcc dot gnu dot org
2007-06-02 2:00 ` hjl at lucon dot org
2007-06-02 2:24 ` pinskia at gcc dot gnu dot org
2007-06-02 7:49 ` rakdver at kam dot mff dot cuni dot cz
2007-06-02 14:20 ` hjl at lucon dot org
2007-06-03 22:41 ` hjl at lucon dot org
2007-06-04 21:14 ` hjl at lucon dot org
2007-06-04 21:39 ` hjl at lucon dot org
2007-06-04 22:15 ` rakdver at kam dot mff dot cuni dot cz
2007-06-04 22:19 ` hjl at lucon dot org
2007-06-04 22:39 ` rakdver at kam dot mff dot cuni dot cz
2007-06-04 22:45 ` rakdver at gcc dot gnu dot org
2007-06-04 23:01 ` dberlin at dberlin dot org
2007-06-04 23:23 ` rakdver at kam dot mff dot cuni dot cz
2007-06-04 23:34 ` rakdver at gcc dot gnu dot org
2007-06-04 23:35 ` rakdver at gcc dot gnu dot org
2007-06-05 0:12 ` dberlin at dberlin dot org
2007-06-05 0:15 ` hjl at lucon dot org
2007-06-05 16:45 ` hjl at lucon dot org
2007-06-07 3:16 ` hjl at lucon dot org
2007-06-29 18:38 ` mmitchel at gcc dot gnu dot org
2007-09-08 6:47 ` hjl at gcc dot gnu dot org
2007-10-10 4:08 ` hjl at lucon dot org
2007-10-10 8:58 ` steven at gcc dot gnu dot org
2007-10-10 17:43 ` Daniel Berlin
2007-10-10 17:44 ` dberlin at dberlin 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=20070602002127.6569.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).