public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-22326-6528@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/22326] New: promotions (from float to double) are not removed when they should be able to
@ 2005-07-06 15:40 pinskia at gcc dot gnu dot org
  2005-07-12 20:37 ` [Bug tree-optimization/22326] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 22+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-06 15:40 UTC (permalink / raw)
  To: gcc-bugs

Take the following code:
#include <math.h>

float foo(float f, float x, float y) {
return (fabs(f)*x+y);
}

on PPC, we should be able to produce:
        fabs f1,f1
        fmadds f1,f1,f2,f3
        blr

But right now we produce:
        fabs f1,f1
        fmadd f1,f1,f2,f3
        frsp f1,f1
        blr

This is because we don't remove promotions we should be able to remove.
If we do:
#include <math.h>

float foo(float f, float x, float y) {
return (fabs(f)*x);
}

The promotions are removed.

-- 
           Summary: promotions (from float to double) are not removed when
                    they should be able to
           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: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-12-14  7:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22326-4@http.gcc.gnu.org/bugzilla/>
2020-11-17  7:07 ` [Bug tree-optimization/22326] promotions (from float to double) are not removed when they should be able to luoxhu at gcc dot gnu.org
2020-11-17  7:10 ` luoxhu at gcc dot gnu.org
2020-11-17 10:21 ` pinskia at gcc dot gnu.org
2020-11-17 21:56 ` joseph at codesourcery dot com
2020-11-18 15:22 ` segher at gcc dot gnu.org
2020-11-23  8:39 ` luoxhu at gcc dot gnu.org
2020-11-23  8:44 ` luoxhu at gcc dot gnu.org
2020-11-23 12:09 ` rguenther at suse dot de
2020-11-24 10:00 ` rsandifo at gcc dot gnu.org
2020-11-27  6:20 ` luoxhu at gcc dot gnu.org
2020-11-27  6:27 ` luoxhu at gcc dot gnu.org
2020-11-27  7:12 ` rguenther at suse dot de
2020-11-27  9:24 ` rsandifo at gcc dot gnu.org
2020-11-30  8:31 ` luoxhu at gcc dot gnu.org
2020-12-11 13:49 ` segher at gcc dot gnu.org
2020-12-11 14:24 ` rguenth at gcc dot gnu.org
2020-12-11 17:51 ` segher at gcc dot gnu.org
2020-12-11 19:24 ` rguenther at suse dot de
2020-12-14  7:21 ` luoxhu at gcc dot gnu.org
     [not found] <bug-22326-6528@http.gcc.gnu.org/bugzilla/>
2006-08-21  6:08 ` pinskia at gcc dot gnu dot org
2007-07-09  6:08 ` pinskia at gcc dot gnu dot org
2005-07-06 15:40 [Bug tree-optimization/22326] New: " pinskia at gcc dot gnu dot org
2005-07-12 20:37 ` [Bug tree-optimization/22326] " pinskia 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).