public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55950] New: Invalid sqrt constant propagation with -frounding-mode
@ 2013-01-11 22:13 glisse at gcc dot gnu.org
2013-01-14 13:22 ` [Bug rtl-optimization/55950] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-01-11 22:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55950
Bug #: 55950
Summary: Invalid sqrt constant propagation with -frounding-mode
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: glisse@gcc.gnu.org
simplify_const_unary_operation (in simplify-rtx.c) does constant propagation
for SQRT protected only by:
if (HONOR_SNANS (mode) && real_isnan (&d))
return 0;
With -frounding-math, it should check whether sqrt was exact and only propagate
in that case (sqrt(1)=1, sqrt(.25)=.5, but sqrt(2) should wait for execution).
(note that this doesn't happen on a trivial sqrt(2.) example, but I've already
seen it happen)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/55950] Invalid sqrt constant propagation with -frounding-mode
2013-01-11 22:13 [Bug rtl-optimization/55950] New: Invalid sqrt constant propagation with -frounding-mode glisse at gcc dot gnu.org
@ 2013-01-14 13:22 ` rguenth at gcc dot gnu.org
2013-11-21 16:20 ` jsm28 at gcc dot gnu.org
2013-11-21 16:21 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-14 13:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55950
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-14
Ever Confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-14 13:21:45 UTC ---
Confirmed. real.c has all the bells and whistles to implement this I think.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/55950] Invalid sqrt constant propagation with -frounding-mode
2013-01-11 22:13 [Bug rtl-optimization/55950] New: Invalid sqrt constant propagation with -frounding-mode glisse at gcc dot gnu.org
2013-01-14 13:22 ` [Bug rtl-optimization/55950] " rguenth at gcc dot gnu.org
@ 2013-11-21 16:20 ` jsm28 at gcc dot gnu.org
2013-11-21 16:21 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-11-21 16:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55950
--- Comment #2 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Author: jsm28
Date: Thu Nov 21 16:20:28 2013
New Revision: 205223
URL: http://gcc.gnu.org/viewcvs?rev=205223&root=gcc&view=rev
Log:
PR rtl-optimization/55950
* real.c (real_sqrt): Remove function.
* real.h (real_sqrt): Remove prototype.
* simplify-rtx.c (simplify_const_unary_operation): Do not fold
SQRT using real_sqrt.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/real.c
trunk/gcc/real.h
trunk/gcc/simplify-rtx.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/55950] Invalid sqrt constant propagation with -frounding-mode
2013-01-11 22:13 [Bug rtl-optimization/55950] New: Invalid sqrt constant propagation with -frounding-mode glisse at gcc dot gnu.org
2013-01-14 13:22 ` [Bug rtl-optimization/55950] " rguenth at gcc dot gnu.org
2013-11-21 16:20 ` jsm28 at gcc dot gnu.org
@ 2013-11-21 16:21 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-11-21 16:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55950
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #3 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 4.9 by removing this optimization, in the expectation that any
important cases of sqrt constant folding are handled at the GIMPLE level which
has proper checks for this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-21 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 22:13 [Bug rtl-optimization/55950] New: Invalid sqrt constant propagation with -frounding-mode glisse at gcc dot gnu.org
2013-01-14 13:22 ` [Bug rtl-optimization/55950] " rguenth at gcc dot gnu.org
2013-11-21 16:20 ` jsm28 at gcc dot gnu.org
2013-11-21 16:21 ` jsm28 at gcc dot gnu.org
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).