public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23133] New: recip does not factor division by function parameter
@ 2005-07-29 13:36 rguenth at gcc dot gnu dot org
2005-07-29 13:50 ` [Bug tree-optimization/23133] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-07-29 13:36 UTC (permalink / raw)
To: gcc-bugs
The following testcase, compiled with -O2 -ffast-math should have
1/d factored out, but doesn't, because d is a function parameter
and recip walks SSA_NAME defs, and d does not have one.
double a, b;
int x;
double foo(double d)
{
if (x)
a/=d;
return a/d + b/d;
}
--
Summary: recip does not factor division by function parameter
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/23133] recip does not factor division by function parameter
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
@ 2005-07-29 13:50 ` pinskia at gcc dot gnu dot org
2005-07-29 14:45 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-29 13:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-29 13:45 -------
Confirmed, another testcase (which might be needed as the redundant load of a and b are not done):
double a, b;
int x;
double foo(double d)
{
double a1 = a, b1 = b;
if (x)
a1/=d;
return (a1/d) * (b1/d);
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-07-29 13:45:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/23133] recip does not factor division by function parameter
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
2005-07-29 13:50 ` [Bug tree-optimization/23133] " pinskia at gcc dot gnu dot org
@ 2005-07-29 14:45 ` rguenth at gcc dot gnu dot org
2005-08-01 8:58 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-07-29 14:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-07-29 14:28 -------
I have a patch for this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-07-29 13:45:43 |2005-07-29 14:28:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/23133] recip does not factor division by function parameter
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
2005-07-29 13:50 ` [Bug tree-optimization/23133] " pinskia at gcc dot gnu dot org
2005-07-29 14:45 ` rguenth at gcc dot gnu dot org
@ 2005-08-01 8:58 ` cvs-commit at gcc dot gnu dot org
2005-08-01 8:58 ` rguenth at gcc dot gnu dot org
2005-08-01 8:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-01 8:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-01 08:58 -------
Subject: Bug 23133
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rguenth@gcc.gnu.org 2005-08-01 08:58:25
Modified files:
gcc : ChangeLog tree-ssa-math-opts.c
Log message:
2005-08-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/23133
* tree-ssa-math-opts.c (execute_cse_reciprocals): Walk
current functions parameter decls to find defs to cse
reciprocals of.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9623&r2=2.9624
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-math-opts.c.diff?cvsroot=gcc&r1=2.3&r2=2.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/23133] recip does not factor division by function parameter
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-08-01 8:58 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-01 8:58 ` rguenth at gcc dot gnu dot org
2005-08-01 8:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-01 8:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-01 08:58 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/23133] recip does not factor division by function parameter
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-08-01 8:58 ` rguenth at gcc dot gnu dot org
@ 2005-08-01 8:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-01 8:59 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-01 8:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-29 13:36 [Bug tree-optimization/23133] New: recip does not factor division by function parameter rguenth at gcc dot gnu dot org
2005-07-29 13:50 ` [Bug tree-optimization/23133] " pinskia at gcc dot gnu dot org
2005-07-29 14:45 ` rguenth at gcc dot gnu dot org
2005-08-01 8:58 ` cvs-commit at gcc dot gnu dot org
2005-08-01 8:58 ` rguenth at gcc dot gnu dot org
2005-08-01 8:59 ` rguenth at gcc dot gnu dot 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).