This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37449] [4.4 Regression] calculix gets wrong answer for -O1 -ffast-math
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2008 17:36:30 -0000
- Subject: [Bug tree-optimization/37449] [4.4 Regression] calculix gets wrong answer for -O1 -ffast-math
- References: <bug-37449-4503@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #20 from law at redhat dot com 2008-10-15 17:36 -------
Subject: Re: [4.4 Regression] calculix gets
wrong answer for -O1 -ffast-math
jakub at gcc dot gnu dot org wrote:
> ------- Comment #14 from jakub at gcc dot gnu dot org 2008-10-15 09:08 -------
> The problem is that thread_across_edge figures out that the fabs (al[0] -
> al[1])
> < 1.e-5 test is unnecessary, always yields false for +-1.0, by substituting the
> values in record_temporary_equivalences_from_stmts_at_dest, but doesn't
> actually optimize all the computations to constants.
It's not safe to actually optimize the computations because the
equivalences we use may be specific to a path through the CFG.
One could easily argue that when these situations arise we've actually
identified a missed optimization in PRE.
Or one could argue that the block in question ought to be a candidate
for duplication and tacking onto the end of its predecessor blocks
(super-block formation) which would expose the partial redundancy at the
cost of duplicating statements. I've generally not been a fan of
super-block formation as, IMHO, PRE catches the vast majority of things
super-block formation would and PRE doesn't have the code expansion
problems that the super-block approach does.
[ ... ]
> is quite clear and this testcase definitely relies on +0 vs. -0 difference
> heavily.
>
> So I'd say this should be closed as INVALID.
>
>
Or kept open as an enhancement request for PRE.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37449